Skip to content

fix(ci): chain Homebrew formula bump into release-cli pipeline#4826

Merged
saddlepaddle merged 1 commit into
mainfrom
brew-cli-releases
May 22, 2026
Merged

fix(ci): chain Homebrew formula bump into release-cli pipeline#4826
saddlepaddle merged 1 commit into
mainfrom
brew-cli-releases

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented May 22, 2026

Problem

The Homebrew tap formula has been stuck at 0.2.7 while the CLI shipped through 0.2.19brew install superset gives users a months-old build.

bump-homebrew.yml triggered on on: release: [published]. But the v0.2.11 commit (0fcec53ff) dropped --draft from release-cli.yml so the per-version release auto-publishes. The catch: that publish now happens via the workflow's GITHUB_TOKEN, and GitHub deliberately does not fire workflow triggers for events generated by GITHUB_TOKEN (anti-recursion safeguard; only workflow_dispatch/repository_dispatch are exempt).

Timeline that matches the symptom exactly:

  • ≤ 0.2.7--draft, published manually in the UI → human published event → bump ran ✅
  • 0.2.8–0.2.10 — still --draft, never manually published → sat as drafts → no event → no bump
  • 0.2.11+--draft dropped, auto-published by GITHUB_TOKEN → trigger suppressed → no bump ❌

(Corroboration: desktop-v* releases still fire bump-homebrew — it runs and skips on the tag filter — because desktop keeps --draft and is published by a human.)

Fix

Stop depending on the cross-workflow release: published event entirely:

  • bump-homebrew.yml → reusable workflow (workflow_call + workflow_dispatch, validated tag input). Render/SHA/push logic unchanged.
  • release-cli.yml → calls it as a needs: release job (uses: + secrets: inherit), so the bump runs in the same workflow run. Deterministic, immune to the GITHUB_TOKEN rule.

workflow_dispatch also lets anyone re-bump a specific tag by hand.

Out of band

The tap was already manually bumped to 0.2.19 (superset-sh/homebrew-tap@b7823a2) so brew users are unstuck today. This PR prevents the drift from recurring.


Open in Stage

Summary by cubic

Chains the Homebrew formula bump into the release-cli workflow so every cli-v* release updates the tap. Removes reliance on release: published, which doesn’t fire for GITHUB_TOKEN releases.

  • Bug Fixes
    • Converted .github/workflows/bump-homebrew.yml to a reusable workflow with workflow_call and workflow_dispatch (tag input).
    • Invoked it from .github/workflows/release-cli.yml as a needs: release job with secrets: inherit, ensuring the bump runs after assets publish.
    • Added manual workflow_dispatch to re-bump any tag when needed.

Written for commit b0b88eb. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Chores
    • Improved CLI release automation by integrating the Homebrew formula update directly into the release workflow for streamlined publishing.

Review Change Stack

The bump-homebrew workflow triggered on `release: published`, but since
v0.2.11 dropped --draft the CLI release auto-publishes via GITHUB_TOKEN —
and GitHub does not fire workflow triggers for GITHUB_TOKEN-generated
events. So the formula bump never ran and the tap stuck at 0.2.7 while
the CLI shipped through 0.2.19.

Convert bump-homebrew.yml to a reusable workflow (workflow_call +
workflow_dispatch, tag input) and call it as a needs:release job from
release-cli.yml, so the bump runs in the same workflow run.
@capy-ai
Copy link
Copy Markdown

capy-ai Bot commented May 22, 2026

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@stage-review
Copy link
Copy Markdown

stage-review Bot commented May 22, 2026

Ready to review this PR? Stage has broken it down into 2 individual chapters for you:

Title
1 Convert Homebrew bump to reusable workflow
2 Chain Homebrew bump into CLI release pipeline
Open in Stage

Chapters generated by Stage for commit b0b88eb on May 22, 2026 12:05am UTC.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

The PR refactors the Homebrew formula update workflow from a release event listener into a reusable workflow. The bump-homebrew workflow is updated to accept a required tag input via workflow_call and workflow_dispatch instead of relying on release events. The release-cli workflow then invokes this reusable workflow as a new job following the release job.

Changes

Reusable Homebrew workflow integration

Layer / File(s) Summary
Make bump-homebrew reusable
.github/workflows/bump-homebrew.yml
The workflow trigger is converted from release event (types: [published]) to workflow_call and workflow_dispatch with a required tag input. The tag extraction step is updated to source TAG from ${{ inputs.tag }} instead of the release event payload.
Integrate bump-homebrew into release-cli
.github/workflows/release-cli.yml
A new bump-homebrew job is added that runs after the release job, conditionally executes on cli-v* tag pushes, and invokes the reusable bump-homebrew workflow with the current tag and inherited secrets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A formula now flows from release to brew,
The tag input guides what the workflow will do,
Once separate triggers, now called with care,
Reusable workflows dance through the air! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the main change: converting the Homebrew bump workflow to a reusable workflow and chaining it into the release-cli pipeline.
Description check ✅ Passed The PR description comprehensively covers the problem, root cause, fix, and context, exceeding the template requirements with detailed technical explanation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch brew-cli-releases

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release-cli.yml:
- Around line 5-7: Update the comment referencing workflow_dispatch to
accurately state that manual dispatch does not trigger the full pipeline;
clarify that workflow_dispatch only runs the build step because the release and
bump-homebrew jobs are gated to tag pushes (refs/tags/cli-v*). Edit the comment
mentioning workflow_dispatch so it explains it is a manual build-only escape
hatch for testing and not a way to run the release or bump-homebrew jobs.
- Line 95: Replace the broad "secrets: inherit" on the reusable workflow call
with a least-privilege secrets mapping that passes only the HOMEBREW_TAP_TOKEN
to the called workflow; find the reusable workflow invocation where "secrets:
inherit" appears and change it to explicitly map HOMEBREW_TAP_TOKEN from the
caller's secrets so no other secrets are forwarded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 41de7f75-4746-4201-a014-3610a2e7368f

📥 Commits

Reviewing files that changed from the base of the PR and between 59a2a34 and b0b88eb.

📒 Files selected for processing (2)
  • .github/workflows/bump-homebrew.yml
  • .github/workflows/release-cli.yml

Comment on lines +5 to +7
# Homebrew formula. workflow_dispatch is the manual escape hatch for testing
# the full pipeline without cutting a tag (the release job is gated to tag
# pushes only).
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Adjust the workflow_dispatch comment to match behavior.

Lines 5-7 say manual dispatch tests the “full pipeline,” but release and bump-homebrew are both gated to refs/tags/cli-v*, so dispatch currently runs build-only.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-cli.yml around lines 5 - 7, Update the comment
referencing workflow_dispatch to accurately state that manual dispatch does not
trigger the full pipeline; clarify that workflow_dispatch only runs the build
step because the release and bump-homebrew jobs are gated to tag pushes
(refs/tags/cli-v*). Edit the comment mentioning workflow_dispatch so it explains
it is a manual build-only escape hatch for testing and not a way to run the
release or bump-homebrew jobs.

uses: ./.github/workflows/bump-homebrew.yml
with:
tag: ${{ github.ref_name }}
secrets: inherit
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Narrow secret scope for the reusable workflow call.

Line 95 inherits all available secrets into the called workflow. Pass only HOMEBREW_TAP_TOKEN to reduce blast radius.

🔐 Proposed least-privilege change
# .github/workflows/release-cli.yml
   bump-homebrew:
@@
-    secrets: inherit
+    secrets:
+      HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
# .github/workflows/bump-homebrew.yml
 on:
   workflow_call:
     inputs:
       tag:
         description: "CLI release tag (cli-v<semver>)"
         required: true
         type: string
+    secrets:
+      HOMEBREW_TAP_TOKEN:
+        required: true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-cli.yml at line 95, Replace the broad "secrets:
inherit" on the reusable workflow call with a least-privilege secrets mapping
that passes only the HOMEBREW_TAP_TOKEN to the called workflow; find the
reusable workflow invocation where "secrets: inherit" appears and change it to
explicitly map HOMEBREW_TAP_TOKEN from the caller's secrets so no other secrets
are forwarded.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 22, 2026

Greptile Summary

This PR fixes a long-standing Homebrew formula staleness bug by converting bump-homebrew.yml into a reusable workflow and chaining it directly after the release job in release-cli.yml, eliminating the broken release: published event dependency that GitHub suppresses for GITHUB_TOKEN-generated releases.

  • bump-homebrew.yml: Trigger switched from on: release: [published] to on: workflow_call + on: workflow_dispatch, both requiring an explicit tag input. The tag-format validation regex, SHA computation, formula rendering, and push-with-retry logic are all preserved unchanged.
  • release-cli.yml: A new bump-homebrew job is appended with needs: release, ensuring tarballs are published before the formula fetch, and an if: startsWith(github.ref, 'refs/tags/cli-v') guard correctly prevents the bump from running on manual workflow_dispatch test triggers.

Confidence Score: 5/5

Safe to merge — the change is a targeted wiring fix with no logic alterations to the build, release, or formula-rendering steps.

The root cause is well-diagnosed and the fix is minimal: bump-homebrew.yml is cleanly converted to a reusable workflow with input validation preserved, and the new bump-homebrew job in release-cli.yml is correctly guarded so it only fires on real tag pushes. The needs: release ordering guarantees tarballs exist before the formula fetch, the concurrency group serialization is intact, and HOMEBREW_TAP_TOKEN flows through secrets: inherit without needing an explicit secrets declaration. No existing logic was modified.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/bump-homebrew.yml Converted from release: published event-driven workflow to a reusable workflow_call/workflow_dispatch workflow; tag validation, SHA computation, formula rendering, and push logic are unchanged.
.github/workflows/release-cli.yml Adds bump-homebrew job chained via needs: release, correctly gated with if: startsWith(github.ref, 'refs/tags/cli-v') so it is skipped on workflow_dispatch test runs.

Sequence Diagram

sequenceDiagram
    participant GitPush as git push cli-v*
    participant ReleaseCLI as release-cli.yml
    participant Build as build (build-cli.yml)
    participant Release as release job
    participant GitHub as GitHub Releases
    participant BumpHB as bump-homebrew job
    participant BumpWF as bump-homebrew.yml (reusable)
    participant Tap as superset-sh/homebrew-tap

    GitPush->>ReleaseCLI: "push: tags cli-v*"
    ReleaseCLI->>Build: trigger build matrix
    Build-->>Release: artifacts ready
    Release->>GitHub: gh release create (tarballs)
    GitHub-->>Release: release published
    Release-->>BumpHB: needs: release ✅
    BumpHB->>BumpWF: workflow_call (tag input)
    BumpWF->>GitHub: curl download tarballs + SHA256
    BumpWF->>Tap: checkout via HOMEBREW_TAP_TOKEN
    BumpWF->>Tap: "render & push superset.rb"

    Note over BumpWF: workflow_dispatch also available for manual re-bump
Loading

Reviews (1): Last reviewed commit: "fix(ci): chain homebrew bump into releas..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle saddlepaddle merged commit cdcfe6f into main May 22, 2026
17 checks passed
@saddlepaddle saddlepaddle mentioned this pull request May 22, 2026
3 tasks
MocA-Love added a commit to MocA-Love/superset that referenced this pull request May 29, 2026
Non-applicable to current fork structure: superset-sh#3960 and superset-sh#4068 require linux-arm64/full CLI dist targets that this fork does not ship; superset-sh#4678 targets a relay deploy script intentionally absent from the fork; superset-sh#4694 requires DuckDB native packaging but the fork has no DuckDB runtime dependency; superset-sh#4822 targets removed v1 import modal paths; superset-sh#4826 assumes upstream release-cli.yml while this fork uses build-cli.yml with draft release semantics.
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