Repository navigation
fix(recovery): journal release bundles so a rebuild keeps their blobs pinned - #420
Merged
Merged
Conversation
… pinned Release bundle items pin their blobs by sha256, so a rebuild that lost release_bundles/release_bundle_items let the blob GC delete the bytes of sealed releases. Journal promotion_pipelines, release_bundles and release_bundle_items (migration 014, user columns excluded) and correct the NotJournaled reasons of the derived and transient tables.
Coverage
Go by area
Web by area (lines)
|
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.
Problem
NotJournaledlistedrelease_bundle_itemsas "covered by database backups". Items pin their blobs by sha256 (blobRefSpecs, cleanupbundledfact), so afteropenartifact rebuildalone the bundles were gone and the orphan/cleanup passes could delete the bytes of sealed releases.Per-table decision
release_bundle_itemsadder_idexcludedrelease_bundlespromotion_pipelinesrelease_bundles.pipeline_id);creator_idexcludedbundle_promotionsnix_pending_narsproxy_cache_entries,sbom_resultsrepository_metadata,package_deltasblobsrow so GC never treats them as orphans. Reasons made precisedocker_uploadsMigration
014_recovery_bundles.sqladds therecovery_journaltriggers (forward-only); the reconcile backfills existing rows.Tests
TestRebuildRestoresReleaseBundles(bundle + items + pipeline restored into an empty DB, user columns NULL, item still pins the restored blob, later changes journaled).TestRegistryCoversSchemaand the fullinternal/recoveryintegration suite pass;make lint,make deadcodepass.Docs: rebuild-from-storage.md, disaster-recovery.md.