chore: allow logs to show error levels for ssh tunnel (#23536)

This commit is contained in:
Hugh A. Miles II 2023-03-30 18:23:22 -04:00 committed by GitHub
parent ce3ba67cf6
commit 81b32d1045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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:

View File

@ -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)]