Skip to content

Fix macOS CI: trust microsoft/mssql-release tap for Homebrew 5.2+#4363

Merged
paulmedynski merged 2 commits into
mainfrom
dev/paul/fix-macos
Jun 15, 2026
Merged

Fix macOS CI: trust microsoft/mssql-release tap for Homebrew 5.2+#4363
paulmedynski merged 2 commits into
mainfrom
dev/paul/fix-macos

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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 update pulls in the new version, brew install mssql-tools18 is refused:

Error: Refusing to load formula microsoft/mssql-release/mssql-tools18 from untrusted tap microsoft/mssql-release.
Run `brew trust --formula microsoft/mssql-release/mssql-tools18` or `brew trust microsoft/mssql-release` to trust it.

Because the script doesn't use set -e, execution continues past this failure. Docker/Colima/SQL Server all start correctly, but sqlcmd was 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-release after brew tap and brew update to explicitly trust the Microsoft tap under the new Homebrew policy.

Testing

  • Re-run macOS pipeline jobs to confirm the fix resolves the failures

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.
Copilot AI review requested due to automatic review settings June 15, 2026 14:53
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jun 15, 2026
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board Jun 15, 2026
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Jun 15, 2026
@paulmedynski paulmedynski added this to the 7.1.0-preview2 milestone Jun 15, 2026
@paulmedynski paulmedynski added Hotfix 7.0.3 PRs targeting main that should be backported to release/7.0 branch for next release. Hotfix 6.1.7 PRs targeting main that should be backported to release/6.1 branch for future hotfix labels Jun 15, 2026

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

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-release to explicitly trust the Microsoft tap.
  • Keeps the existing Homebrew tap/update/install flow for setting up mssql-tools18 on 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

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.56%. Comparing base (fd8cb4b) to head (5c479a5).
⚠️ Report is 6 commits behind head on main.

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     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 63.56% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmedynski paulmedynski marked this pull request as ready for review June 15, 2026 17:20
@paulmedynski paulmedynski requested a review from a team as a code owner June 15, 2026 17:20
Copilot AI review requested due to automatic review settings June 15, 2026 17:20
@paulmedynski paulmedynski enabled auto-merge (squash) June 15, 2026 17:21
@paulmedynski paulmedynski moved this from In progress to In review in SqlClient Board Jun 15, 2026

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@paulmedynski paulmedynski merged commit 0764a5c into main Jun 15, 2026
304 checks passed
@paulmedynski paulmedynski deleted the dev/paul/fix-macos branch June 15, 2026 19:11
@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board 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.
paulmedynski added a commit that referenced this pull request Jun 16, 2026
…2+ (#4363) (#4366)

Co-authored-by: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. Hotfix 6.1.7 PRs targeting main that should be backported to release/6.1 branch for future hotfix Hotfix 7.0.3 PRs targeting main that should be backported to release/7.0 branch for next release.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants