fix(release-publish-oci): discard release lookup capture on HTTP error - #95
Open
sebasnallar wants to merge 1 commit into
Open
fix(release-publish-oci): discard release lookup capture on HTTP error#95sebasnallar wants to merge 1 commit into
sebasnallar wants to merge 1 commit into
Conversation
gh api prints the error BODY to stdout on failure, so the direct
releases/tags/<tag> lookup captured a 404's JSON as the release id and
fed it into the next request ("unsupported protocol scheme"), failing
the finalize job before the list fallback could run. Reset the capture
on non-zero exit so the fallback (and the create-release upsert path)
actually execute. Hit on scopes-lambda's first real run — publish and
artifact registration succeeded; only the release body step died.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Summary
scopes-lambda's first real run through the chained pipeline got all the way to finalize — OIDC (with the fixed role), image push, and
np artifact createall green — and then died on:gh apiprints the error body to stdout on an HTTP error. The directreleases/tags/<tag>lookup 404'd (release-please drafts are invisible on that endpoint — the exact case the list fallback exists for), the capture kept the 404 JSON asRELEASE_ID, and the follow-up request was garbage — masking the working fallback.Change
Discard the capture on non-zero exit (
if ! RELEASE_ID=$(gh api …)→ reset to empty), letting the list fallback / create-release upsert run. Also stops swallowing gh's stderr, so future lookup failures are visible in the run log.Test plan
existing_tagfor the affected tag — publish/registration re-converge (idempotent) and the release ends published with the Artifact table.🤖 Generated with Claude Code