Skip to content

ci(repo): report a setup-cli npm fallback in Slack instead of failing the release - #7542

Open
Coly010 wants to merge 2 commits into
developfrom
ci/setup-cli-smoke-npm-fallback-notify
Open

Coly010 wants to merge 2 commits into
developfrom
ci/setup-cli-smoke-npm-fallback-notify

Conversation

@Coly010

@Coly010 Coly010 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Current Behavior

The setup-cli smoke test fails a v3 job when setup-cli installs from the GitHub release instead of npm. Because that job runs inside the release workflow, the whole release run goes red: the "released" Slack message is skipped and a generic "release failed" message is sent, even though every channel published and the fallback installed the right version.

Expected Behavior

A fallback to the GitHub release emits a warning annotation and the job stays green. The fallback is also exported as a workflow output, passed through release-shared.yml to release.yml, and added as a notice to the "released" Slack message, so the signal is kept without marking the release as failed. The dedicated fallback job still checks that the fallback path works, and a fallback that installs the wrong version still fails the version check.

The workflow change needs a cherry-pick to active v*.x branches.

@Coly010
Coly010 requested review from a team and supabase-oss as code owners November 9, 2026 13:29
@Coly010
Coly010 requested a review from Prashansa-K November 9, 2026 13:29

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both independent reviews were available. Verified Claude’s naming nit: both npm-source steps now warn on fallback but retain assertion-style names. Version checks and the forced GitHub-release fallback assertion remain intact. No additional defects or conflicts with pending next-branch work were found.

Findings

Severity Location Category Sources Claim
⚪ NIT .github/workflows/setup-cli-smoke-test.yml:100 naming claude Both steps still say "Verify setup-cli installed from npm", although fallback now only emits a warning and succeeds. Their names misleadingly suggest that a passing step confirms npm installation.

Stats

Claude findings: 1 · Codex findings: 0 · Confirmed: 1 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

if [ "${INSTALL_SOURCE}" != "npm" ]; then
echo "::error::setup-cli fell back to ${INSTALL_SOURCE} because installing supabase@${VERSION#v} from npm failed; check the setup-cli step log"
exit 1
echo "::warning::setup-cli fell back to ${INSTALL_SOURCE} because installing supabase@${VERSION#v} from npm failed; check the setup-cli step log"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ NIT · naming · source: claude

Both steps still say "Verify setup-cli installed from npm", although fallback now only emits a warning and succeeds. Their names misleadingly suggest that a passing step confirms npm installation.

Evidence: Step names at lines 92 and 174 claim to verify npm installation, while lines 99–101 and 181–183 only emit ::warning:: when INSTALL_SOURCE differs from npm.

Suggested fix: Rename both steps to "Warn if setup-cli fell back from npm".

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

Commit 61ace10 against develop at d4fc0e5 · 10 runs each · report only, never blocks merging

Command Workload Before After Change
supabase --version version 234 ms 217 ms no real change (-7%, within normal variation)
supabase --help help 236 ms 231 ms no real change
supabase init init 281 ms 350 ms no real change (+25%, within normal variation)
supabase migration new bench migration-new 309 ms 329 ms no real change (+7%, within normal variation)
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 324 ms 356 ms no real change (+10%, within normal variation)
supabase projects list projects-list 257 ms 245 ms no real change
supabase functions list --project-ref replayfixtureprojref functions-list 255 ms 274 ms no real change (+7%, within normal variation)

API calls: unchanged for all 7 commands.

Binary size: 134.9 MB, unchanged.

Details: timing ranges, API calls per command, slowest phases

Timing ranges

Command Workload Before range After range Change Verdict
supabase --version version 209-317 ms 192-313 ms -17 ms (-7%) within noise
supabase --help help 198-315 ms 174-526 ms -5 ms (-2%) within noise
supabase init init 209-440 ms 227-531 ms +69 ms (+25%) within noise
supabase migration new bench migration-new 287-449 ms 228-569 ms +20 ms (+7%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 255-402 ms 265-498 ms +32 ms (+10%) within noise
supabase projects list projects-list 225-305 ms 221-269 ms -12 ms (-5%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 229-437 ms 219-392 ms +19 ms (+7%) within noise

API calls per command

Command Workload Before After Endpoint changes
supabase --version version 0 0
supabase --help help 0 0
supabase init init 0 0
supabase migration new bench migration-new 0 0
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 2 2
supabase projects list projects-list 1 1
supabase functions list --project-ref replayfixtureprojref functions-list 2 2

Slowest phases

No command moved beyond noise, so there are no phase deltas.

Workflow run

Comment /bench to run the lightweight benchmark (this comment) again on the latest commit, or /bench full to also run the integration-heavy benchmark, which posts in its own comment.

@Coly010 Coly010 changed the title ci(repo): warn instead of fail when setup-cli v3 falls back to the GitHub release ci(repo): report a setup-cli npm fallback in Slack instead of failing the release Nov 9, 2026
timeout-minutes: 25
# Only set on fallback; an empty value from another matrix leg doesn't overwrite it.
outputs:
npm_fallback: ${{ steps.npm-source.outputs.fallback }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ Severity: LOW

Each matrix leg publishes the same npm_fallback job output, but GitHub keeps only the output from the last matrix leg to finish. A v1/v2 leg or a v3 leg without a fallback can therefore overwrite a real fallback value, leaving the summary and release Slack notice false and hiding this release signal.
Helpful? Add 👍 / 👎

💡 Fix Suggestion

Suggestion: Don't use a job-level output on a matrix job to carry the fallback signal. GitHub keeps only one matrix leg's output, so an empty value from a later leg can overwrite a real fallback. There are two safer options. (1) Have the fallback-detecting leg write a small marker file, for example npm-fallback-${{ matrix.name }}.txt, and upload it with actions/upload-artifact. A downstream job then downloads the artifacts and sets npm_fallback=true if any marker exists. (2) Move the fallback detection into a separate non-matrix job, or an aggregate job that uses the GitHub API to read each leg's step result. Whichever option you pick, the aggregating job should expose npm_fallback. release-shared.yml, release.yml and the Slack notice should read it from that job. Also remove the misleading comment that says empty values from other legs don't overwrite the output.

This branch has not been deployed

No deployments
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