Repository navigation
Stamp each object with a hash of its own content - #149
Merged
Merged
Conversation
The deploy-id hashed the builder version and config commit, so the same objects generated by two builder versions differed in every changed file and could not be compared byte for byte. It also meant unchanged files had to be detected and restored with a text mask. A manifest-id depends only on the object's generated content, so it is the same whichever builder writes it, and an unchanged object is written back byte-identical. It is also a truer thing for a caller to wait on: a live object carrying it holds that content. The first generation with this rewrites every manifest, swapping the deploy-id for a manifest-id. Callers get the expected id of each changed object from GenerationResult.manifest_ids; deploy_id remains as one id for the change.
It was only a hash of manifest_ids and removed, which callers already have. relcoord, the only caller, stops using it in the same release.
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.
Replaces the
noa.re/deploy-idannotation withnoa.re/manifest-id, a hash of the object's own generated content.The deploy-id hashed the builder version and config commit. So the same objects generated by two builder versions differed in every changed file and couldn't be compared byte for byte. Unchanged files also had to be found and restored with a text mask. A manifest-id depends only on content, so the output doesn't depend on which builder version wrote it, an unchanged object is written back identically, and the restore code goes away.
GenerationResult.manifest_idsgives the expected id of each created or modified object. relcoord needs this to wait on each object; its change is a follow-up draft PR.deploy_idis removed fromGenerationResult. It was only a hash ofmanifest_idsand the removals, which callers already have. relcoord, its only caller, stops using it in the release that takes this.Validation: all 311 tests pass, as do
ruff check,ruff format --checkandty check. I also generated the system repo's platform-dev target into a copy of manifests, with this branch and with main: