Repository navigation
feat(publish): push to staging/<ns>/<name> and sync the served name - #15
Closed
eddie-knight wants to merge 1 commit into
Closed
eddie-knight wants to merge 1 commit into
eddie-knight wants to merge 1 commit into
Conversation
Pins grc-store-protocol v0.28.1 and uses its staging package to name the upload repository. Catalog and EvaluationLog publishes push the bundle and its signature to staging/<namespace>/<name> and then sync <namespace>/<name>; the hub copies an accepted bundle into the served repository, and nothing pushes a served repository directly. There is no fallback. The hub client timeout rises from 60 seconds to 3 minutes, above the hub's 120-second catalog sync deadline, so a slow sync ends with the hub's answer rather than a client timeout. A registry 401/403 on the staging push names the staging repository and the namespace to own; a refused sync shows the hub's error code and says whether to publish again. Breaking: a grcli from before this change gets 401 UNAUTHORIZED at its first blob push against a hub that only accepts staging pushes, and this release cannot publish to a hub from before the cutover. Signed-off-by: Julian Vance <julianvance242@gmail.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.
What changed
grcli publishnow pushes every bundle and its signature to the staging repositorystaging/<namespace>/<name>and then callsPOST /v1/bundles/syncfor<namespace>/<name>. The hub checks the staged bundle and copies an accepted one into the served repository; nothing pushes a served repository directly, and there is no fallback. The staging repository name comes from thestagingpackage ofgrc-store-protocolv0.28.1, which this PR pins.Supporting changes:
401/403on the staging push names the staging repository and the namespace you need to own (or be the trusted CI publisher for).grcli publishagain. Afetch_failedmeans the staged upload never finished or was removed (staging is cleared after about 24 hours), so the fix is to publish again.--repository staging/...is refused: the flag names the served repository.publish-gemara.ymlworkflow header describe the new flow.Why
The hub stopped granting push on served repositories. Every upload lands in staging and only the hub's sync moves bytes into
<namespace>/<name>, so a bundle is served only after the hub has checked it. grcli has to follow that or it cannot publish at all.How to test
End to end, against a hub that accepts staging pushes:
Expected: the push log shows
staging/<namespace>/<name>, the sync succeeds, andgrcli versions <namespace>/<name>lists the new version. With a namespace you do not own, the push fails with a401that names the staging repository and the namespace.Breaking change
A grcli release from before this change pushes the served repository directly. A hub that only accepts staging pushes answers its first blob push with
401 UNAUTHORIZED, so older grcli releases cannot publish to it; upgrade grcli (in CI, setgrcli-versionto a release that includes this change). Conversely, this release cannot publish to a hub from before the cutover.