Repository navigation
ci: save the resource summary cache after every self-analysis - #194
Merged
Merged
Conversation
The resource summary cache was restored and saved by one actions/cache step under a key that depends only on the resource models. actions/cache saves only on a primary-key miss, so the entry written on 2026-09-21 was restored by every run and never replaced: a module changed since then cannot reuse it, and since the cache schema moved to v5 (#190) none can. Every self-analysis computed all its resource summaries again. As for the test caches, restore and save are now split, the key carries the run id, and restore-keys restore the latest entry for the same models, then any. The cache is saved even when the self-analysis fails. Refs #193
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.
The CI self-analysis restored a resource summary cache that was never saved again (#193). Its key depended only on the resource models, and
actions/cachesaves only on a primary-key miss. The entry written on 2026-09-21 was therefore restored by every run and never replaced. Since #190 moved the cache to schema v5, none of its entries can be read, and every self-analysis computes all its resource summaries again.Change
The test caches of the same workflow already work this way:
actions/cache/restore,actions/cache/save);${{ github.run_id }}, so every run saves what it ends with;restore-keysrestore the latest entry for the same models, then any entry;The analyzer itself is unchanged. Its per-module keys (schema, model, external summaries, filters, compile arguments, IR) still decide which entries can be reused, so an entry left by another run is never read for a changed module.
Validation
CI of this PR, head 5bf5d5e, run 37725435310:
resource-cache-Linux-eb37cff8…, the 2026-09-21 entry, throughrestore-keysresource-cache-Linux-eb37cff8…-37725435310(643 080 bytes)resource-cache-Linux-eb37cff8…-37725435310, the primary keymainyet. Without perf(ownership): compute the ownership summaries with fewer solves and rounds #187, the self-analysis still has the working-directory race of Self-analysis: the ResourceLifetime cross-file summary pass sometimes runs for minutes on the same files #184: whether the resource model loads changes from run to run, and with it the work done. That noise hides the effect of the cache (58 s, then 79 s). Once perf(ownership): compute the ownership summaries with fewer solves and rounds #187 is merged, the model loads in every run, and successive runs ofmaincan be compared.Known limit
Entries of modules that changed are never removed, so the saved directory grows over time, as the test caches do. Pruning can be added if it becomes large.
Closes #193