Skip to content

Commit 8b07e69

Browse files
author
ci bot
committed
Merge branch 'qa-fixes' into 'enterprise'
Fix slow load in customer instances & snowflake connection form See merge request dkinternal/testgen/dataops-testgen!212
2 parents b86f2e4 + 8cefbce commit 8b07e69

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

testgen/ui/navigation/router.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ def run(self) -> None:
5959
# This hack is needed because the auth cookie is not retrieved on the first run
6060
# We have to store the page and wait until cookies are ready
6161
session.page_pending_cookies = current_page
62-
st.rerun()
62+
63+
# Don't use st.rerun() here!
64+
# It will work fine locally, but cause a long initial load on deployed instances
65+
# The time.sleep somehow causes the cookie to be detected quicker
66+
time.sleep(0.3)
6367

6468
def queue_navigation(self, /, to: str, with_args: dict | None = None) -> None:
6569
self._pending_navigation = {"to": to, "with_args": with_args or {}}

testgen/ui/views/connections/page.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def show_connection_form(self, selected_connection: dict, _mode: str, project_co
9898
FlavorForm = BaseConnectionForm.for_flavor(sql_flavor)
9999
if connection:
100100
connection["password"] = connection["password"] or ""
101+
connection["private_key"] = connection["private_key"] or ""
101102

102103
form_kwargs = connection or {"sql_flavor": sql_flavor, "connection_id": connection_id, "connection_name": connection_name}
103104
form = FlavorForm(**form_kwargs)

0 commit comments

Comments
 (0)