Repository navigation
fix(ci): bound sync-issues re-sync on cache miss - #981
Merged
Merged
Conversation
The scaffolded sync-issues workflow keyed its incremental-state cache by repository name and passed updated-since='' to the sync action when no state was restored, so any cache miss (a repo rename, or the routine 7-day cache eviction) made the action re-fetch the entire issue/PR history from epoch. On a large archive that exhausts the GitHub API rate limit before state is saved, so the workflow fails every run and never self-heals. On a cache miss, compute a bounded 14-day look-back cutoff and pass it as updated-since instead of epoch: the sync stays small, completes under the rate limit, saves state, and self-heals to incremental. Cache hits still read the restored state file; force-update still forces a full rebuild. Applied to this repo's workflow and the scaffold template so every consumer gets the fix. Refs: #980
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
Fixes #980: the scaffolded
sync-issuesworkflow re-synced the entire issue/PR history from epoch on any cache miss, exhausting the GitHub API rate limit and failing every run. Hit in production right after thevig-os/devcontainer→vig-os/devkitrename (#781) orphaned the repo-name-keyed state cache.Fix
On a cache miss, compute a bounded 14-day look-back and pass it as
updated-sinceinstead of epoch:force-update→ still a full rebuild (unchanged).Applied to both
.github/workflows/sync-issues.ymland the scaffold templateassets/workspace/.github/workflows/sync-issues.yml, so every consumer gets it (this is a general cache-miss fragility, not rename-specific).Not in scope
Defense-in-depth rate-limit-aware checkpointing belongs in
vig-os/sync-issues-action— a separate, lower-priority issue there.Testing
just precommit(full suite incl. actionlint / yamllint) — green. Logic:force-update ? epoch : (cache-hit ? '' (use state file) : 14d-lookback).Refs: #980