Releases: sync endpoint reports whether the named version is registered - #86
Closed
adamshiervani wants to merge 1 commit into
Closed
adamshiervani wants to merge 1 commit into
adamshiervani wants to merge 1 commit into
Conversation
…gistered The counts cover every version scanned, so a caller that named a version could not tell whether that version was registered. The response now carries registered: whether a row for it exists once the run is over.
Contributor
Author
|
Not needed: the release script validates the artifact layout before upload, and the tick retries anyway. The workflow checks HTTP 200 only. |
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.
The counts in the sync response cover every version scanned, so a caller that named a version could not tell whether that version was registered.
created: 1can be a different release. The response now answers that directly.registeredis whether a row for the named version exists once the run is over, whichever run created it. A bare call, with no body, answers with the counts only.Sync(runner) parse body → settled stats = runner({ settled }) "busy" → 409 + if settled + registered = releaseExists(settled.type, settled.version) # exported from release-sync + → { ...stats, registered } → statsThe release workflow in kvm-mini fails its job on
registered: false.Note
Low Risk
Additive API field on an optional sync body path; behavior for unsettled sync and core sync logic is unchanged aside from one extra DB lookup after named-version runs.
Overview
When
POST /releases/syncis called with{ type, version }, the JSON response now includesregistered: whether a DB row for that exact version exists after the run finishes. Aggregate counts likecreatedcan refer to other versions scanned in the same run, so this field lets upload workflows (e.g. kvm-mini) fail clearly when the vouched release never landed.Bare sync calls (no body) still return only the outcome counts—no
registeredfield.releaseExistsis exported fromrelease-syncand used by theSynchandler for the post-run check.Reviewed by Cursor Bugbot for commit ead931b. Bugbot is set up for automated code reviews on this repo. Configure here.