Skip to content

Fix Homebrew container install user#467

Merged
eleanorjboyd merged 2 commits into
mainfrom
fix/homebrew-container-ci
May 27, 2026
Merged

Fix Homebrew container install user#467
eleanorjboyd merged 2 commits into
mainfrom
fix/homebrew-container-ci

Conversation

@eleanorjboyd
Copy link
Copy Markdown
Member

@eleanorjboyd eleanorjboyd commented May 27, 2026

Summary

Run the Homebrew setup commands in the homebrew/brew container as the linuxbrew user instead of root, while discovering the brew executable from the container PATH at runtime.

The container job still runs as root so GitHub Actions checkout/tooling can write to the mounted workspace, but recent homebrew/brew images have been brittle when brew install itself runs as root. PR #466 is currently failing before Rust setup/tests with Homebrew crashing while pouring the ca-certificates bottle:

undefined method '[]' for nil
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/bottles.rb:127:in 'Utils::Bottles.load_tab'

This PR keeps the existing container shape but switches the install step to:

brew_bin="$(command -v brew)"
su linuxbrew -c "${brew_bin} update || true"
su linuxbrew -c "${brew_bin} install python@3.12 python@3.11"

That avoids hardcoding the Linuxbrew prefix while still avoiding root-owned Homebrew install behavior.

Validation

This is a CI-only workaround. The useful validation is the ci-homebrew-container Actions job on this PR.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 104ms 711ms 93ms 11ms
Full Refresh 197ms 37670ms 179ms 18ms

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 57ms 110ms 56ms 1ms 0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Test Coverage Report (Linux)

Metric Value
Current Coverage 79.5%
Base Branch Coverage 79.5%
Delta 0% ➖

Coverage unchanged.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Performance Report (Windows) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 9ms 11ms 7ms 2ms 28.6%
Full Refresh 124ms 74261ms 92ms 32ms 34.8%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Test Coverage Report (Windows)

Metric Value
Current Coverage 76.51%
Base Branch Coverage 76.51%
Delta 0% ➖

Coverage unchanged.

rzhao271
rzhao271 previously approved these changes May 27, 2026
dmitrivMS
dmitrivMS previously approved these changes May 27, 2026
@eleanorjboyd eleanorjboyd merged commit 372d35b into main May 27, 2026
30 checks passed
@eleanorjboyd eleanorjboyd deleted the fix/homebrew-container-ci branch May 27, 2026 20:38
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