You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/06/03 09:34:10 UTC

(superset) 02/05: fix(ssh_tunnel): use unique migration revision id and update filter SQL snapshot

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch feat/ssh-tunnel-host-key-checking
in repository https://gitbox.apache.org/repos/asf/superset.git

commit f2b8ab126c5c093d4f72e824783f592b88248dda
Author: Evan <ev...@preset.io>
AuthorDate: Tue Jun 2 08:27:43 2026 -0700

    fix(ssh_tunnel): use unique migration revision id and update filter SQL snapshot
    
    The new ssh_tunnels migration reused the existing revision id a1b2c3d4e5f6
    (already used by add_granular_export_permissions), which created an Alembic
    revision cycle (33d7e0e21daa -> a1b2c3d4e5f6 -> ce6bd21901ab -> a1b2c3d4e5f6)
    and broke every job that runs db upgrade. Assign a unique revision id and
    rename the file accordingly.
    
    Also update test_database_filter's compiled-SQL snapshot to include the new
    ssh_tunnels.server_host_key column.
    
    Co-Authored-By: Claude Opus 4.8 <no...@anthropic.com>
---
 ...26-06-01_10-00_78a40c08b4be_add_server_host_key_to_ssh_tunnels.py} | 4 ++--
 tests/unit_tests/databases/filters_test.py                            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/superset/migrations/versions/2026-06-01_10-00_a1b2c3d4e5f6_add_server_host_key_to_ssh_tunnels.py b/superset/migrations/versions/2026-06-01_10-00_78a40c08b4be_add_server_host_key_to_ssh_tunnels.py
similarity index 96%
rename from superset/migrations/versions/2026-06-01_10-00_a1b2c3d4e5f6_add_server_host_key_to_ssh_tunnels.py
rename to superset/migrations/versions/2026-06-01_10-00_78a40c08b4be_add_server_host_key_to_ssh_tunnels.py
index 7fe94a6b429..7d635cea1bc 100644
--- a/superset/migrations/versions/2026-06-01_10-00_a1b2c3d4e5f6_add_server_host_key_to_ssh_tunnels.py
+++ b/superset/migrations/versions/2026-06-01_10-00_78a40c08b4be_add_server_host_key_to_ssh_tunnels.py
@@ -22,7 +22,7 @@ operators can opt in to verifying the SSH server's host key before a tunnel is o
 This is a public key and is stored in plaintext (not encrypted). The column is
 nullable, so existing tunnels are unaffected.
 
-Revision ID: a1b2c3d4e5f6
+Revision ID: 78a40c08b4be
 Revises: 33d7e0e21daa
 Create Date: 2026-06-01 10:00:00.000000
 
@@ -33,7 +33,7 @@ import sqlalchemy as sa
 from superset.migrations.shared.utils import add_columns, drop_columns
 
 # revision identifiers, used by Alembic.
-revision = "a1b2c3d4e5f6"
+revision = "78a40c08b4be"
 down_revision = "33d7e0e21daa"
 
 
diff --git a/tests/unit_tests/databases/filters_test.py b/tests/unit_tests/databases/filters_test.py
index 066c31a63d8..db6b69e0252 100644
--- a/tests/unit_tests/databases/filters_test.py
+++ b/tests/unit_tests/databases/filters_test.py
@@ -119,5 +119,5 @@ def test_database_filter(mocker: MockerFixture) -> None:
     )
     assert (
         str(compiled_query)
-        == "SELECT dbs.uuid, dbs.created_on, dbs.changed_on, dbs.id, dbs.verbose_name, dbs.database_name, dbs.sqlalchemy_uri, dbs.password, dbs.cache_timeout, dbs.select_as_create_table_as, dbs.expose_in_sqllab, dbs.configuration_method, dbs.allow_run_async, dbs.allow_file_upload, dbs.allow_ctas, dbs.allow_cvas, dbs.allow_dml, dbs.force_ctas_schema, dbs.extra, dbs.encrypted_extra, dbs.impersonate_user, dbs.server_cert, dbs.is_managed_externally, dbs.external_url, dbs.created_by_fk, dbs.c [...]
+        == "SELECT dbs.uuid, dbs.created_on, dbs.changed_on, dbs.id, dbs.verbose_name, dbs.database_name, dbs.sqlalchemy_uri, dbs.password, dbs.cache_timeout, dbs.select_as_create_table_as, dbs.expose_in_sqllab, dbs.configuration_method, dbs.allow_run_async, dbs.allow_file_upload, dbs.allow_ctas, dbs.allow_cvas, dbs.allow_dml, dbs.force_ctas_schema, dbs.extra, dbs.encrypted_extra, dbs.impersonate_user, dbs.server_cert, dbs.is_managed_externally, dbs.external_url, dbs.created_by_fk, dbs.c [...]
     )