From 41132b72db599dffcb3c17d84f27517ef89c6c4b Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:52:50 -0300 Subject: [PATCH 1/2] Fix macOS CI: trust microsoft/mssql-release tap for Homebrew 5.2+ 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. --- .../common/templates/steps/configure-sql-server-macos-step.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml b/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml index a989bf19bf..95d3ac7b7a 100644 --- a/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml +++ b/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml @@ -33,6 +33,7 @@ steps: brew install colima brew install docker brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release + brew trust microsoft/mssql-release brew update HOMEBREW_ACCEPT_EULA=Y brew install mssql-tools18 From 5c479a5eb09b267c0f39431f26a4e0c0e94474c2 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Mon, 15 Jun 2026 12:23:51 -0300 Subject: [PATCH 2/2] Address PR #4363 review feedback - 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. --- .../steps/configure-sql-server-macos-step.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml b/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml index 95d3ac7b7a..6e1541f939 100644 --- a/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml +++ b/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml @@ -33,10 +33,20 @@ steps: brew install colima brew install docker brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release - brew trust microsoft/mssql-release brew update + # Homebrew 5.2+ requires explicit trust for third-party taps. Run this + # after 'brew update' so the trust command is available even if the runner + # image shipped an older Homebrew version. + brew trust microsoft/mssql-release HOMEBREW_ACCEPT_EULA=Y brew install mssql-tools18 + # Fail fast if sqlcmd was not installed (e.g. tap-trust or formula error). + # Without this check the script would loop for ~6 minutes trying to connect. + if ! command -v sqlcmd &>/dev/null; then + echo "ERROR: sqlcmd is not on PATH after brew install. Check the mssql-tools18 installation above." + exit 1 + fi + # Start Colima with Virtualization.framework for x86_64 binary translation # on Apple Silicon. Rosetta/binfmt emulation is enabled by default in # Colima >= 0.8 when using --vm-type vz, which is dramatically faster than