fix(known_good): make update_module_latest.py work on grouped modules - #371
Open
hskang-amelia wants to merge 1 commit into
Open
hskang-amelia wants to merge 1 commit into
hskang-amelia wants to merge 1 commit into
Conversation
update_module_latest.py iterated `known_good.modules.values()` as if it
held Module objects, but KnownGood.modules is grouped
({"target_sw": {...}, "tooling": {...}}), so every run died with
`AttributeError: 'dict' object has no attribute 'pin_version'`. It now
walks both levels, as known_good_to_workspace_metadata.py already does.
KnownGood.write() and override_known_good_repo.py also appended "Z" to
an aware datetime's isoformat(), which already ends in "+00:00", giving
timestamps like "2026-09-28T05:39:55+00:00Z". Both now write
"YYYY-MM-DDTHH:MM:SSZ", matching the timestamp committed in
known_good.json.
Adds scripts/known_good/tests/test_update_module_latest.py covering both
(a module in each group is updated, a pinned one is skipped, and the
written timestamp has a single Z); the first test fails without the fix.
hskang-amelia
requested review from
AlexanderLanin,
FScholPer,
MaximilianSoerenPollak,
PiotrKorkus,
antonkri,
dcalavrezo-qorix,
lurtz,
nradakovic,
opajonk and
pawelrutkaq
as code owners
September 28, 2026 06:35
|
The created documentation from the pull request is available at: docu-html |
This branch has not been deployed
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
Two bugs in the
known_goodscripts.1.
update_module_latest.pycrashes on every runKnownGood.modulesis grouped ({"target_sw": {...}, "tooling": {...}}), butupdate_module_latest.pyiteratedknown_good.modules.values()as if it yieldedModuleobjects:It now walks both levels, as
known_good_to_workspace_metadata.pyalready does. This is the script the (currently disabled) "build latest mains" workflow andreusable_integration-build.ymlcall, so it has probably been broken silently since the grouping was introduced.2. Malformed timestamps
KnownGood.write()andoverride_known_good_repo.pyappended"Z"to an aware datetime'sisoformat(), which already ends in+00:00. The result was2026-09-28T05:39:55+00:00Z, and that value also ends up in the "Generated from known_good.json at …" banners. Both now writeYYYY-MM-DDTHH:MM:SSZ, the same format as the timestamp committed inknown_good.json.Tests
New
scripts/known_good/tests/test_update_module_latest.py:pin_versionmodule is skipped (fails without fix 1);^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$.bazel test //scripts/known_good:known_good_tests //scripts/tooling:tooling_testspasses locally (124 + 66). With the fix,python3 scripts/known_good/update_module_latest.py --output known_good.updated.jsonruns through and updates 13 of 16 modules.