You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2023/04/10 22:40:34 UTC

[superset] 03/07: chore: allow logs to show error levels for ssh tunnel (#23536)

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

hugh pushed a commit to branch 2023.13.1
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 7c993ace148c8d5e2215bb7f2ed4431b1760823e
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Thu Mar 30 18:23:22 2023 -0400

    chore: allow logs to show error levels for ssh tunnel (#23536)
    
    (cherry picked from commit 81b32d104566313ad5bf9cba17b533da0137cffd)
---
 superset/extensions/ssh.py                  | 4 +++-
 tests/integration_tests/csv_upload_tests.py | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/superset/extensions/ssh.py b/superset/extensions/ssh.py
index 8fb235618c..6a852ea7cd 100644
--- a/superset/extensions/ssh.py
+++ b/superset/extensions/ssh.py
@@ -16,6 +16,7 @@
 # under the License.
 
 import importlib
+import logging
 from io import StringIO
 from typing import TYPE_CHECKING
 
@@ -53,8 +54,9 @@ class SSHManager:
         params = {
             "ssh_address_or_host": (ssh_tunnel.server_address, ssh_tunnel.server_port),
             "ssh_username": ssh_tunnel.username,
-            "remote_bind_address": (url.host, url.port),  # bind_port, bind_host
+            "remote_bind_address": (url.host, url.port),
             "local_bind_address": (self.local_bind_address,),
+            "debug_level": logging.getLogger("flask_appbuilder").level,
         }
 
         if ssh_tunnel.password:
diff --git a/tests/integration_tests/csv_upload_tests.py b/tests/integration_tests/csv_upload_tests.py
index f8781a3649..59fd3c1ef5 100644
--- a/tests/integration_tests/csv_upload_tests.py
+++ b/tests/integration_tests/csv_upload_tests.py
@@ -513,4 +513,4 @@ def test_import_parquet(mock_event_logger):
 
     with test_db.get_sqla_engine_with_context() as engine:
         data = engine.execute(f"SELECT * from {PARQUET_UPLOAD_TABLE}").fetchall()
-        assert data == [("john", 1), ("paul", 2), ("max", 3), ("bob", 4)]
+        assert data == [("max", 3), ("bob", 4), ("john", 1), ("paul", 2)]