Repository navigation
fix(backup): protect a freshness copy that can't be restored - #499
Merged
MoonBoi9001 merged 2 commits intoDec 1, 2026
Merged
MoonBoi9001 merged 2 commits into
MoonBoi9001 merged 2 commits into
Conversation
At startup the service fetches a missing freshness history from its backup bucket. If it could not save that to disk, it started again with no history, and later copied that over the good backup. It now stops copying until the next restart, as when the fetch itself fails.
Copying the freshness file stops when its backup was fetched but could not be written to disk. Tests now also cover startup doing so, and that other files are still copied, and the guide says plainly that the write isn't tried again.
MoonBoi9001
marked this pull request as ready for review
December 1, 2026 19:02
MoonBoi9001
deleted the
mb9/keep-the-freshness-backup-when-a-restore-cannot-be-written
branch
December 1, 2026 23:32
MoonBoi9001
pushed a commit
that referenced
this pull request
Dec 1, 2026
**Merge order:** If a `chore(k8s): update cronjob image` PR is open, land it first. After that PR lands, wait 1-2 minutes for release-please to force-push this one with the new SHA bump — otherwise you'll need to land a third PR. --- ## [2.18.0](v2.17.1...v2.18.0) (2026-12-01) ### Added * **health:** say whether the cache file backups are working ([#500](#500)) ([69aa529](69aa529)) ### Fixed * **backup:** give up sooner on addresses that don't answer ([#498](#498)) ([713bbf6](713bbf6)) * **backup:** never upload scores the service could not use ([#497](#497)) ([51d913d](51d913d)) * **backup:** protect a freshness copy that can't be restored ([#499](#499)) ([9bd532d](9bd532d)) ### Changed * **deps:** bump the actions group with 5 updates ([#502](#502)) ([57550f6](57550f6)) * **k8s:** update cronjob image to sha-57550f6 ([#504](#504)) ([84afd27](84afd27)) --- **Deploy after merge:** Merging this PR tags the release and triggers the `Build Release Image` workflow to publish the versioned service image. Wait for that workflow to finish, then roll it out from an up-to-date `main`: `kubectl apply -f k8s/deployment.yaml`. Applying before the build completes leaves the rollout stuck in `ImagePullBackOff`. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
This PR stops copying the freshness history to the backup bucket until the next restart when startup downloads the backup but can't write it to disk, as it already does when the download fails. Before, the service started again with no history, and its next hourly copy replaced the good backup.