Skip to content

ci: skip the release pipeline when R2 release infrastructure is absent - #10

Closed
thomaswillner wants to merge 1 commit into
mainfrom
claude/claude-rc-fdqbyw
Closed

ci: skip the release pipeline when R2 release infrastructure is absent#10
thomaswillner wants to merge 1 commit into
mainfrom
claude/claude-rc-fdqbyw

Conversation

@thomaswillner

Copy link
Copy Markdown
Owner

Problem

The Release Prime Agent workflow (build-binaries.yml) runs on every push to main and has failed on all 4 runs in this repo — the latest two being the doc-only merges of #6 and #9. The build and npm run check steps pass; the failure is always the same:

Run test -n "$PRIME_AGENT_DOWNLOAD_BASE_URL"
  PRIME_AGENT_DOWNLOAD_BASE_URL:            <- empty
Process completed with exit code 1.

PRIME_AGENT_DOWNLOAD_BASE_URL comes from vars.R2_PUBLIC_BASE_URL, which is upstream release infrastructure (together with the R2_* secrets used by the publish job). Neither exists on this fork, so the pipeline can never succeed here — every push to main produces a failed run and the README's Build Binaries badge stays permanently red.

Change

One job-level if on release-context (the root job — build and publish depend on it via needs, so they inherit the skip):

  • Push- and tag-triggered runs skip cleanly when R2_PUBLIC_BASE_URL is not configured, instead of failing. The run concludes green with all jobs skipped.
  • Repos with the variable configured are byte-for-byte unaffected — the condition is true and everything runs as before, so the change is upstreamable.
  • workflow_dispatch is exempt from the gate: an explicit manual release request without infrastructure still runs and fails loudly on the existing test -n guards, rather than silently skipping.

Validation

  • YAML parses (yaml.safe_load).
  • The condition uses only documented job-level if contexts (vars, github.event_name); undefined repository variables evaluate to '' in expressions, so absence ⇒ skip.
  • npm run check clean on the branch (biome 901 files, tsgo, installer render, browser smoke — also re-run by the pre-commit hook at commit time).
  • No behavior of the packaging/publish steps themselves is touched; the diff is 5 added lines (comment + condition).

Generated by Claude Code

The Release Prime Agent workflow runs on every push to main and hard-fails
at 'test -n "$PRIME_AGENT_DOWNLOAD_BASE_URL"' on any repo that lacks the
R2_PUBLIC_BASE_URL variable and R2 secrets - on this fork that is every
run (4/4 failed), leaving a permanently red Build Binaries badge for a
pipeline that cannot succeed here.

Gate the release-context job (and via needs, build and publish) on
R2_PUBLIC_BASE_URL being configured. Push- and tag-triggered runs now
skip cleanly without the infrastructure; repos with it configured behave
exactly as before. Explicit workflow_dispatch runs are exempt from the
gate so a manual release request without infrastructure still fails
loudly on the existing guards instead of silently skipping.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJM8XQpjcfq41HUGvLMsqZ
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.

2 participants