Skip to content

fix(release-publish-oci): discard release lookup capture on HTTP error - #95

Open
sebasnallar wants to merge 1 commit into
mainfrom
fix/finalize-release-lookup
Open

fix(release-publish-oci): discard release lookup capture on HTTP error#95
sebasnallar wants to merge 1 commit into
mainfrom
fix/finalize-release-lookup

Conversation

@sebasnallar

Copy link
Copy Markdown
Contributor

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 create all green — and then died on:

Get "repos/nullplatform/scopes-lambda/releases/%7B%22message%22:%22Not%20Found%22...": unsupported protocol scheme ""

gh api prints the error body to stdout on an HTTP error. The direct releases/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 as RELEASE_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

  • YAML + actionlint clean.
  • After merge: re-run scopes-lambda's release workflow with existing_tag for the affected tag — publish/registration re-converge (idempotent) and the release ends published with the Artifact table.

🤖 Generated with Claude Code

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>
@sebasnallar
sebasnallar requested a review from fedemaleh August 26, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant