Fix macOS CI: trust microsoft/mssql-release tap for Homebrew 5.2+#4363
Merged
Conversation
Homebrew 5.2.0 made untrusted-tap enforcement the default. After 'brew update' pulls in the new version, 'brew install mssql-tools18' is refused because the microsoft/mssql-release tap is untrusted. This caused sqlcmd to never be installed (exit code 127), so the SQL Server connectivity check looped for 72 attempts and failed. Add 'brew trust microsoft/mssql-release' after tapping and before 'brew update' to explicitly trust the Microsoft tap.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the macOS SQL Server configuration step used by CI to account for newer Homebrew security behavior around “untrusted taps”, so the pipeline can reliably install mssql-tools18 (and therefore sqlcmd) before running connectivity checks.
Changes:
- Adds
brew trust microsoft/mssql-releaseto explicitly trust the Microsoft tap. - Keeps the existing Homebrew tap/update/install flow for setting up
mssql-tools18on macOS CI agents.
- Move 'brew trust' after 'brew update' so it works even when the runner image starts with a Homebrew version older than 5.2. - Add a fail-fast check after 'brew install mssql-tools18' to immediately abort with a clear error if sqlcmd is not on PATH, avoiding the 6-minute timeout loop.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4363 +/- ##
==========================================
- Coverage 65.69% 63.56% -2.14%
==========================================
Files 285 280 -5
Lines 43311 66193 +22882
==========================================
+ Hits 28453 42073 +13620
- Misses 14858 24120 +9262
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
apoorvdeshmukh
approved these changes
Jun 15, 2026
apoorvdeshmukh
approved these changes
Jun 15, 2026
cheenamalhotra
approved these changes
Jun 15, 2026
This was referenced Jun 15, 2026
paulmedynski
added a commit
that referenced
this pull request
Jun 15, 2026
…2+ (#4363) Homebrew 5.2.0 made untrusted-tap enforcement the default. After 'brew update' pulls in the new version, 'brew install mssql-tools18' is refused because the microsoft/mssql-release tap is untrusted. Add 'brew trust microsoft/mssql-release' after 'brew update' to explicitly trust the Microsoft tap (placed after update so the trust command is available even on older runner images). Add a fail-fast check after 'brew install mssql-tools18' to immediately abort with a clear error if sqlcmd is not on PATH, avoiding the 6-minute timeout loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes macOS pipeline failures that started on June 11, 2026 across all PRs.
Root Cause
Homebrew 5.2.0 made untrusted-tap enforcement the default. After
brew updatepulls in the new version,brew install mssql-tools18is refused:Because the script doesn't use
set -e, execution continues past this failure. Docker/Colima/SQL Server all start correctly, butsqlcmdwas never installed (exit code 127 on every attempt), so the connectivity check loops for 72 attempts (~6 minutes) and then fails.Fix
Add
brew trust microsoft/mssql-releaseafterbrew tapandbrew updateto explicitly trust the Microsoft tap under the new Homebrew policy.Testing