Repository navigation
test(semantic-layer): make date export parametrization deterministic - #46449
Merged
rusackas merged 1 commit intoNov 21, 2026
Merged
Conversation
mikebridge
requested review from
aminghadersohi,
fitzee,
gabotorresruiz and
rebenitez1802
November 21, 2026 17:40
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #46449 +/- ##
===========================================
+ Coverage 65.70% 85.92% +20.22%
===========================================
Files 3122 3122
Lines 216867 216867
Branches 51420 51420
===========================================
+ Hits 142486 186340 +43854
+ Misses 71103 27110 -43993
- Partials 3278 3417 +139
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aminghadersohi
approved these changes
Nov 21, 2026
aminghadersohi
left a comment
Contributor
There was a problem hiding this comment.
Sorting the table_like() set gives every worker the same collection order, and the export cases are unchanged.
6 tasks
9 tasks
9 tasks
jprinet
added a commit
to jprinet/superset
that referenced
this pull request
Nov 23, 2026
* origin/master: (393 commits) fix(a11y): name the semantic view description input (apache#46458) docs(semantic): explain datasource list modification eligibility (apache#46462) docs(semantic-layer): document NULL-preserving exclusion filters (apache#46447) fix(uploads): skip folder and system entries in columnar ZIP uploads (apache#45617) fix(i18n-es): promote 47 of the zero-context backfill entries (apache#45847) fix(mcp): return structured ChartError on SQLAlchemyError in get_chart_sql (apache#44351) fix(datasets): follow semantic view modification permissions (apache#46448) fix(docker): account for container memory limits in frontend-mem-nag.sh (apache#46373) fix(reports): carry the report's native filters in the email and Slack link (apache#46062) fix(explore): apply the dataset timezone to grained temporal filter values (apache#46175) fix(i18n): enforce the do-not-translate registry across the catalogs (apache#45974) chore(logging): log unparseable virtual dataset SQL at debug in the RLS lookup (apache#46139) fix(i18n): split parameter-suggestion plural into two messages (apache#46049) test(partition-mapping): cover Hive/Impala mirrored SQL, cache outage and migration (apache#46319) perf(dashboard): look up the dashboard once per filter_state read (apache#46314) fix(i18n): load the dayjs locale for every language with a catalog (apache#45982) test(semantic-layer): make date export parametrization deterministic (apache#46449) fix(oauth2): idempotent OAuth2 completion and resilient listener (apache#40292) fix(explore): prevent full table scan when SQL expression is used as x-axis (apache#41339) feat(mcp): radar chart type plugin (apache#43571) ... # Conflicts: # .github/workflows/docker.yml # .github/workflows/superset-frontend.yml
1 of 9 tasks
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Master's unit tests intermittently fail before running because different pytest workers collect the date-export cases in different orders.
ChartDataResultFormat.table_like()returns a set, and wrapping it inlist()preserves hash-dependent CSV/XLSX order.Sort the formats before parametrizing the test. This keeps the same CSV, XLSX and JSON cases, with and without resampling, and changes no production behavior.
Observed on master's Python-Unit run at
29b6d4c193.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Different tests were collected between gw0 and gw1, with CSV and XLSX cases reversed. After: both workers collect the same cases in the same order. No UI changes.TESTING INSTRUCTIONS
pytest -n 2controls launched workers with distinct interpreter hash seeds (1/2, then 2/3). Both failed at collection before the change; both passed all 27 module tests afterward. A temporary launcher only set worker interpreter seeds; it did not alter collection and is not part of this change.tests/unit_tests/semantic_layers: 2,620 passed with two workers using different hash seeds.PYTHONHASHSEED=random python -m pytest -n 2 tests/unit_tests/semantic_layers/date_result_test.py -q. Before the fix, failure depends on the workers choosing different set orders.ADDITIONAL INFORMATION