Repository navigation
test(telemetry): tz region test no longer depends on the runner's zone database - #1215
Merged
Merged
Conversation
…ne database Ubuntu 24.04's tzdata 2026e moves backward links (Atlantic/Faeroe, Portugal, Eire, Iceland, Poland) into tzdata-legacy, which the CI runners do not install. ZoneInfo then refuses the alias, consent_region() fails closed, and the Atlantic/Faeroe row (expected False) went red on every PR, develop included; the three legacy rows expecting True passed for the wrong reason. The mapping test now stubs the zone lookup, so every row checks the name-to-region mapping on any machine. A separate test pins the fail-closed behaviour for an alias the installed zone database cannot load.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 10, 2026
Merged
This was referenced Nov 10, 2026
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.
Why
tests/test_telemetry_notice.py::test_consent_region_from_iana_timezone[Atlantic/Faeroe-False]fails on every CI run since tonight's runner image, develop included: it failed on a re-run of #1207, a docs-only PR with develop's code, and on #1208, #1210 and #1214.Root cause (reproduced)
Ubuntu 24.04 ships tzdata 2026e with the backward-compatibility links moved into
tzdata-legacy, which the runners don't install. Measured in an Ubuntu 24.04.2 WSL with that tzdata and no tzdata-legacy:_env_timezone_nameonly trustsTZwhenZoneInfoloads it. Otherwiseconsent_region()fails closed (True), so theAtlantic/Faeroerow (expectedFalse) goes red. ThePortugal/Eire/Icelandrows (expectedTrue) passed for the wrong reason.The product behaviour is right: an alias the system cannot load asks for consent instead of guessing. The test was wrong, because it measured the machine's zone database instead of the mapping.
Change (test-only)
test_tz_name_the_zone_database_cannot_load_fails_closedpins the fail-closed behaviour.1 failed, 20 passed) before the fix.Gates
The six
scripts/cichecks ✅ · ruff ✅ · ruff format ✅ · pyright ✅ · pytest (offline,-n 8 --dist worksteal, coverage): 6060 passed, 30 skipped, 93%.E2E
Test-only, so no Flow surface is touched.
Unblocks CI on the #1191 milestone PRs.