Skip to content

fix(release): unblock homebrew Linux smoke test on untrusted-tap gate#475

Closed
Matovidlo wants to merge 1 commit into
mainfrom
martinvasko-fix-release-homebrew-tap-choco-checksum
Closed

fix(release): unblock homebrew Linux smoke test on untrusted-tap gate#475
Matovidlo wants to merge 1 commit into
mainfrom
martinvasko-fix-release-homebrew-tap-choco-checksum

Conversation

@Matovidlo

@Matovidlo Matovidlo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The test-install Homebrew (Linux) leg fails with:

Error: Refusing to load formula keboola/keboola-cli2/keboola-cli2 from untrusted tap keboola/keboola-cli2.

Some homebrew/brew image builds ship HOMEBREW_REQUIRE_TAP_TRUST set, which blocks loading formulae from a third-party tap. This unsets it in the smoke-test container.

Chosen over the brew trust command the error message suggests, because brew trust does not exist in current Homebrew (4.6.20) — verified directly in the image (Unknown command: brew trust). Unsetting the gating env var is version-independent and mirrors the default end-user environment, where the var is unset (so real brew install users are unaffected either way).

Scope

Impact analysis

  • No product/SDK/runtime code touched.
  • Runs on non-prerelease tags (IS_PRERELEASE == 'false'); takes effect on the next stable tag.
  • No breaking changes.

Test plan / verification notes

  • Next stable tag: test-install Homebrew (Linux) leg taps + installs keboola-cli2 and greps the version.
  • Local verification caveat: the brew install path could not be run locally — the sandbox Docker has no outbound network (Could not resolve host: formulae.brew.sh). The fix rests on two network-independent facts confirmed in the image: brew trust is not a command in 4.6.20, and the untrusted-tap refusal is gated by HOMEBREW_REQUIRE_TAP_TRUST (per man brew / brew trust help text).

@Matovidlo

Copy link
Copy Markdown
Contributor Author

@claude review

Copilot AI 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.

Pull request overview

Updates the release/tagging GitHub Actions workflow to unblock two failing release legs: pushing the rendered Homebrew formula to a (previously empty) tap repository, and correctly parsing the Chocolatey checksum fetched from a .sha256 sidecar served as octet-stream.

Changes:

  • Enable automatic creation of the Homebrew tap target branch on first push (create-target-branch-if-needed).
  • Decode Chocolatey .sha256 content when returned as bytes before extracting the checksum field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-kbagent.yml Outdated
@Matovidlo
Matovidlo requested a review from padak July 3, 2026 12:59
@Matovidlo
Matovidlo marked this pull request as ready for review July 3, 2026 13:00
@Matovidlo
Matovidlo force-pushed the martinvasko-fix-release-homebrew-tap-choco-checksum branch from cf97547 to 7a813ab Compare July 3, 2026 13:00
@Matovidlo
Matovidlo force-pushed the martinvasko-fix-release-homebrew-tap-choco-checksum branch from 7a813ab to 95c3300 Compare July 16, 2026 07:55
@Matovidlo Matovidlo changed the title fix(release): unblock homebrew tap push + chocolatey checksum decode fix(release): unblock homebrew/chocolatey/winget legs + brew smoke test Jul 16, 2026
The `test-install` Homebrew (Linux) leg failed with "Refusing to load
formula ... from untrusted tap". Some homebrew/brew image builds ship
HOMEBREW_REQUIRE_TAP_TRUST set, which blocks loading formulae from a
third-party tap. Unset it in the smoke test.

Version-independent (the `brew trust` command the error suggests does not
exist in current Homebrew 4.6.20) and mirrors the default end-user
environment, where the var is unset.

Homebrew tap push, chocolatey checksum, and winget bootstrap are handled
separately by #476 (merged) and #485.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Matovidlo
Matovidlo force-pushed the martinvasko-fix-release-homebrew-tap-choco-checksum branch from 95c3300 to 9166f95 Compare July 16, 2026 08:02
@Matovidlo Matovidlo changed the title fix(release): unblock homebrew/chocolatey/winget legs + brew smoke test fix(release): unblock homebrew Linux smoke test on untrusted-tap gate Jul 16, 2026
padak pushed a commit that referenced this pull request Jul 20, 2026
The test-install Homebrew (Linux) leg failed on the v0.66.1 release run
with "Refusing to load formula keboola/keboola-cli2/keboola-cli2 from
untrusted tap". Root cause: Homebrew 6.0.0 (released 2026-06-11)
introduced tap trust as a default-on security mechanism -- third-party
taps must be explicitly trusted with the new `brew trust` command
before their formulae load (official taps stay trusted by default).
See https://brew.sh/2026/06/11/homebrew-6.0.0/

Add `brew trust keboola/keboola-cli2` right after `brew tap`, matching
the remedy brew itself prints. This also mirrors what real end users
must now do on Homebrew 6, so the smoke test exercises the genuine
install path instead of bypassing the gate.

Chosen over #475 (unset HOMEBREW_REQUIRE_TAP_TRUST): that approach was
based on a stale 4.6.20 image where `brew trust` did not exist yet, and
unsetting the var would hide the step end users actually hit. #475
closed with an explanation.

Author verified the fixed sequence locally against the real tap in an
arm64 linuxbrew container (brew install completes; the kbagent binary
check failure there is an arm64-bottle/glibc mismatch specific to the
local container, not ubuntu-latest).
@padak

padak commented Jul 20, 2026

Copy link
Copy Markdown
Member

Closing in favor of #483 (merged) -- the two PRs fixed the same untrusted-tap failure with contradictory approaches, and the contradiction turned out to have a simple explanation:

Homebrew 6.0.0 (released 2026-06-11) introduced tap trust as a default-on security mechanism, together with the new brew trust command: https://brew.sh/2026/06/11/homebrew-6.0.0/

  • Your verification ("brew trust does not exist, Unknown command in 4.6.20") was correct for the image you had -- a pre-6.0 homebrew/brew cache. Current image pulls (and the CI runner, whose error message itself suggests Run 'brew trust ...' -- that remedy text ships with 6.0) run Homebrew 6.x where the command exists.
  • unset HOMEBREW_REQUIRE_TAP_TRUST would also unblock the smoke test, but on Homebrew 6 the enforcement is default-on for third-party taps regardless of the pre-6.0 env var, and real end users now have to run brew trust keboola/keboola-cli2 before brew install. Keeping the trust step in the smoke test exercises the genuine install path instead of bypassing the gate.

Thanks for the rebase and the careful scoping of this PR -- the winget and homebrew-tap-push pieces you split out earlier (#476, #485) were the right call. Follow-up noted separately: the install docs should mention the brew trust step for Homebrew 6 users.

@padak padak closed this Jul 20, 2026
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.

3 participants