Skip to content

fix(release): trust homebrew tap before install in test-install#483

Open
ZdenekSrotyr wants to merge 1 commit into
mainfrom
fix/release-winget-brew-trust
Open

fix(release): trust homebrew tap before install in test-install#483
ZdenekSrotyr wants to merge 1 commit into
mainfrom
fix/release-winget-brew-trust

Conversation

@ZdenekSrotyr

@ZdenekSrotyr ZdenekSrotyr commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Why

The v0.66.1 release run (https://github.com/keboola/cli/actions/runs/29430278032) failed the test-install job's Homebrew leg:

==> Tapping keboola/keboola-cli2
Error: Refusing to load formula keboola/keboola-cli2/keboola-cli2 from untrusted tap keboola/keboola-cli2.
Run `brew trust --formula keboola/keboola-cli2/keboola-cli2` or `brew trust keboola/keboola-cli2` to trust it.

This is the first release run that actually reaches this step — homebrew/chocolatey were broken on every prior tag (v0.63.3 through v0.66.0) and fixed only in #476, merged after v0.66.0 was cut. So this "untrusted tap" gate was never exercised before now.

Note the actual homebrew publish job (pushing the formula to the tap) succeeded — this only affects the test-install smoke-test leg that verifies brew install works end to end.

What changed

Add brew trust keboola/keboola-cli2 right after brew tap, matching the remedy brew itself prints on failure.

Verification

Ran the fixed sequence locally against the real tap (arm64 linuxbrew container, Docker Desktop):

brew tap keboola/keboola-cli2 https://github.com/keboola/homebrew-keboola-cli2
brew trust keboola/keboola-cli2
brew install keboola-cli2

brew install completes successfully. The container image is homebrew/brew, and kbagent --version fails there with an arm64-bottle/glibc mismatch that's specific to my local (arm64) test container — not indicative of a problem on the actual ubuntu-latest (amd64) CI runner, where the same v0.66.1 binary already passes kbagent --version via this job's apt/rpm legs.

No make check changes needed — this is a workflow-only fix (no Python/CLI behavior change), and release-kbagent.yml only triggers on v*.*.* tag pushes, so it can't be exercised by this PR's own CI. Next real verification is the next tag push.


Open in Devin Review

The v0.66.1 release run (first one to actually reach this step, since
homebrew/chocolatey were broken on every prior tag -- fixed in #476)
failed here: `brew install keboola-cli2` refuses to load a formula
from a third-party tap until the tap is explicitly trusted. Add
`brew trust` right after `brew tap`, matching the remedy brew itself
prints on failure.

Verified locally: `brew tap` + `brew trust` + `brew install
keboola-cli2` against the real keboola/homebrew-keboola-cli2 tap
succeeds (arm64 linuxbrew container). The subsequent `kbagent
--version` glibc mismatch seen in that local run is specific to
arm64 bottles on this machine, not the amd64 ubuntu-latest CI
runner -- the same binary already passes `kbagent --version` via
the apt/rpm legs of this job on that runner.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

# explicitly trusted ("Refusing to load formula ... from untrusted tap ...").
# First observed on the v0.66.1 run (github.com/keboola/cli, release-kbagent
# #29430278032) -- this is a real end-user install step too, not CI-only.
brew trust keboola/keboola-cli2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Validity of brew trust subcommand cannot be verified from repo context

The added brew trust keboola/keboola-cli2 at .github/workflows/release-kbagent.yml:492 is not a Homebrew subcommand that existed in widely-known Homebrew versions (up to ~early 2025). The homebrew/brew Docker image at line 485 is unpinned (uses latest), so the exact Homebrew version depends on when the workflow runs. The PR comment references a real CI failure on v0.66.1 (run #29430278032) with the error "Refusing to load formula ... from untrusted tap", which suggests this is a newer Homebrew feature. If brew trust does not exist in the image version pulled at runtime, set -e (line 486) will cause the entire Homebrew test leg to fail — but since this is a smoke-test step (not a publish step), the blast radius is limited to a red CI check rather than a broken release. Worth confirming that brew trust is the correct invocation (vs. e.g. brew tap --trust or another syntax) by checking Homebrew's current docs or the referenced CI run logs.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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