Skip to content

Commit 6016ff4

Browse files
author
ci bot
committed
Merge branch 'aarthy/qa-fixes' into 'enterprise'
More QA fixes See merge request dkinternal/testgen/dataops-testgen!332
2 parents e8145cb + d2e2246 commit 6016ff4

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

testgen/common/models/profiling_run.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,13 @@ def select_summary(
160160
SUM(
161161
CASE
162162
WHEN COALESCE(profile_anomaly_results.disposition, 'Confirmed') = 'Confirmed'
163-
AND profile_anomaly_types.issue_likelihood = 'Possible' THEN 1
163+
AND profile_anomaly_types.issue_likelihood IN ('Possible', 'Potential PII') THEN 1
164164
ELSE 0
165165
END
166166
) AS possible_ct,
167167
SUM(
168168
CASE
169-
WHEN COALESCE(profile_anomaly_results.disposition, 'Confirmed') IN ('Dismissed', 'Inactive')
170-
AND profile_anomaly_types.issue_likelihood <> 'Potential PII' THEN 1
169+
WHEN COALESCE(profile_anomaly_results.disposition, 'Confirmed') IN ('Dismissed', 'Inactive') THEN 1
171170
ELSE 0
172171
END
173172
) AS dismissed_ct

testgen/common/models/table_group.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,13 @@ def select_summary(cls, project_code: str, for_dashboard: bool = False) -> Itera
143143
SUM(
144144
CASE
145145
WHEN COALESCE(latest_anomalies.disposition, 'Confirmed') = 'Confirmed'
146-
AND anomaly_types.issue_likelihood = 'Possible' THEN 1
146+
AND anomaly_types.issue_likelihood IN ('Possible', 'Potential PII') THEN 1
147147
ELSE 0
148148
END
149149
) AS possible_ct,
150150
SUM(
151151
CASE
152-
WHEN COALESCE(latest_anomalies.disposition, 'Confirmed') IN ('Dismissed', 'Inactive')
153-
AND anomaly_types.issue_likelihood <> 'Potential PII' THEN 1
152+
WHEN COALESCE(latest_anomalies.disposition, 'Confirmed') IN ('Dismissed', 'Inactive') THEN 1
154153
ELSE 0
155154
END
156155
) AS dismissed_ct

testgen/ui/navigation/router.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ def run(self) -> None:
3030

3131
current_page = st.navigation(streamlit_pages, position="hidden")
3232

33+
if not session.initialized:
34+
# Clear cache on initial load or page refresh
35+
st.cache_data.clear()
36+
session.initialized = True
37+
3338
# This hack is needed because the auth cookie is not set if navigation happens immediately after login
3439
# We have to navigate on the next run
3540
if session.auth.logging_in:

testgen/ui/session.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class TestgenSession(Singleton):
2323
# streamlit_authenticator sets this attribute implicitly
2424
authentication_status: bool
2525

26+
initialized: bool
2627
page_pending_cookies: st.Page # type: ignore
2728
page_pending_login: str
2829
page_args_pending_login: dict

0 commit comments

Comments
 (0)