Repository navigation
fix(cold-store): keep the Turso export inside the nightly's time - #12112
Merged
Merged
Conversation
On 2026-11-20 cold-store-nightly was killed at its 120m start timeout while still downloading atlas's dump (past 10 GB). atlas is listed first, so none of the other 49 Turso databases were filed, the D1 prune, manifest sync and status steps never ran, and the killed run left the 10 GB dump and a minted token in /tmp until the next night. - export-turso.sh exports TURSO_EXPORT_LAST (default atlas) after every other database. - A whole-step budget, TURSO_EXPORT_DEADLINE_SECONDS (default 3h): no database starts once it is spent, and each dump's --max-time and --retry-max-time are clamped to what is left. - Dump --max-time default 1800 -> 3600. - The scratch dir is 0700 under umask 077, and a TERM/INT trap lets the EXIT cleanup run when systemd stops the unit. - laptop-backups.nix: cold-store-nightly TimeoutStartSec 120m -> 360m. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 45 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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Before: on Nov 20 the cold-store nightly was stopped at its 2-hour limit while it was still downloading the atlas Turso dump, which is now past 10 GB. atlas is first in the list, so none of the other 49 Turso databases were backed up that night, the prune, manifest sync and status steps never ran, and the stopped run left the 10 GB dump and a minted database token in /tmp until the next night.
After: atlas is exported last, the Turso step keeps inside a 3-hour budget so the steps after it still run, and a stopped run cleans up its scratch, which is now private to the user.
How:
export-turso.sh:TURSO_EXPORT_LAST(defaultatlas) moves the named databases to the end.TURSO_EXPORT_DEADLINE_SECONDS(default 10800) stops new databases from starting once spent and clamps each dump's--max-timeand--retry-max-timeto what is left. The dump--max-timedefault goes from 1800 to 3600. The scratch dir is 0700 underumask 077, and a TERM/INT trap lets the EXIT cleanup run when systemd stops the unit.nixos/home/laptop-backups.nix:cold-store-nightlyTimeoutStartSec120m to 360m. This part takes effect at the next Home Manager switch on the laptop.TURSO_EXPORT_LASTkeeping list order, deadline clamping, no start after the deadline, deadline validation, and a SIGTERM mid-download removing the 0700 scratch.python3 -m unittest discover -s testsinpkgs/cold-store-reaper: 213 tests pass (1 skipped). shellcheck and ruff find nothing new against main.Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.