Install Bubblewrap on hosted Ubuntu#22458
Conversation
ae380c5 to
fdc1894
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates Linux sandbox configuration to prefer installing Ubuntu’s bubblewrap package on GitHub-hosted Ubuntu runners before falling back to Homebrew’s install path.
Changes:
- Adds GitHub Actions hosted Ubuntu detection to
Sandbox.configure!. - Runs
sudo apt-get install --yes bubblewrapbefore Homebrew fallback when appropriate. - Adds specs for the new apt-based install path and isolates GitHub Actions env vars in related tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Library/Homebrew/extend/os/linux/sandbox.rb |
Adds the hosted Ubuntu apt-get Bubblewrap install path before the existing fallback. |
Library/Homebrew/test/sandbox_linux_spec.rb |
Adds coverage for the new GitHub-hosted Ubuntu install behavior and env isolation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Avoid forcing taps to disable Linux sandboxing on GitHub Actions - Use Ubuntu's `bubblewrap` package before the Homebrew fallback - Keep self-hosted and non-Ubuntu runners on the existing path
fdc1894 to
54abc17
Compare
There was a problem hiding this comment.
I think the actual problem is that test-bot sets HOMEBREW_DEVELOPER in Ruby but that's too late for HOMEBREW_SANDBOX_LINUX default to kick in so setup_github_actions_sandbox! never runs. brew doctor then fails as that does go through the shell script again and pick up the defaults.
| ENV["RUNNER_ENVIRONMENT"] == "github-hosted" && | ||
| ENV.fetch("ImageOS", "").start_with?("ubuntu") |
There was a problem hiding this comment.
Does this even pass through env filtering? We have HOMEBREW_GITHUB_HOSTED_RUNNER.
bubblewrappackage before the Homebrew fallbackbrew lgtm(style, typechecking and tests) with your changes locally?OpenAI Codex 5.5 xhigh with local review.