snapshot: caller annotations on push, export the envelope marshal - #15
Merged
Conversation
PushOptions.Annotations rides into the manifest at build time so callers stop amending the manifest in a second registry round trip after the push. MarshalEnvelope exposes the snapshot.json construction pull already used internally, so downstream stops hand-copying the schema.
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.
Two contract additions for the vk-cocoon peer-restore path (cocoonstack/vk-cocoon#63):
PushOptions.Annotations— caller-supplied annotations are merged into the manifest at build time. vk-cocoon currently stamps itsfrom-nodeannotation by re-getting and re-putting the manifest after every hibernate push; with this field the stamp rides in the single push, closing the window where a concurrent wake reads an unstamped manifest.MarshalEnvelope— exports thesnapshot.jsonconstruction the pull path already uses internally. vk-cocoon's peer staging currently hand-copies the envelope schema; this gives both sides one source of truth.Behavior of existing callers is unchanged: an empty
Annotationsmap merges nothing, andwriteSnapshotEnvelopenow delegates toMarshalEnvelopewith byte-identical output.Verified:
go test -race ./...,make lint(GOOS=linux+darwin, 0 issues),asl ./...clean.