Skip to content

Install Bubblewrap on hosted Ubuntu#22458

Merged
MikeMcQuaid merged 1 commit into
mainfrom
github-actions-install-bubblewrap
May 29, 2026
Merged

Install Bubblewrap on hosted Ubuntu#22458
MikeMcQuaid merged 1 commit into
mainfrom
github-actions-install-bubblewrap

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

  • 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

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR.

OpenAI Codex 5.5 xhigh with local review.


Copilot AI review requested due to automatic review settings May 29, 2026 16:25
@MikeMcQuaid MikeMcQuaid force-pushed the github-actions-install-bubblewrap branch from ae380c5 to fdc1894 Compare May 29, 2026 16:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 bubblewrap before 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.

Comment thread Library/Homebrew/test/sandbox_linux_spec.rb Outdated
- 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
@MikeMcQuaid MikeMcQuaid force-pushed the github-actions-install-bubblewrap branch from fdc1894 to 54abc17 Compare May 29, 2026 17:38
@MikeMcQuaid MikeMcQuaid enabled auto-merge May 29, 2026 17:47
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 29, 2026
Merged via the queue into main with commit 081559f May 29, 2026
38 checks passed
@MikeMcQuaid MikeMcQuaid deleted the github-actions-install-bubblewrap branch May 29, 2026 18:21
Copy link
Copy Markdown
Member

@Bo98 Bo98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +202 to +203
ENV["RUNNER_ENVIRONMENT"] == "github-hosted" &&
ENV.fetch("ImageOS", "").start_with?("ubuntu")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this even pass through env filtering? We have HOMEBREW_GITHUB_HOSTED_RUNNER.

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.

4 participants