Skip to content

Stop fetching bottle manifests when creating tabs - #23760

Merged
MikeMcQuaid merged 1 commit into
mainfrom
issue_23759_def_fetch_tab_failure
Sep 3, 2026
Merged

Stop fetching bottle manifests when creating tabs#23760
MikeMcQuaid merged 1 commit into
mainfrom
issue_23759_def_fetch_tab_failure

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Formula#bottle now checks compatible_locations?, which fetches the bottle manifest when the tab metadata is not yet cached.
  • Tab.create runs inside the build sandbox and called this for every runtime dependency, so formulae with a fetch phase failed to install once the sandbox denied the cache write.
  • The dependency's rebuild number only depends on the bottle spec for the current tag, so read it without the location check.

Fixes #23759


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Claude with Fable at High effort, with local review and testing.


- `Formula#bottle` now checks `compatible_locations?`, which fetches
  the bottle manifest when the tab metadata is not yet cached.
- `Tab.create` runs inside the build sandbox and called this for every
  runtime dependency, so formulae with a `fetch` phase failed to
  install once the sandbox denied the cache write.
- The dependency's rebuild number only depends on the bottle spec for
  the current tag, so read it without the location check.

Fixes #23759

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.

馃煝 Approval recommended

The focused change fixes the sandbox failure while preserving tag-specific rebuild metadata and includes appropriate regression coverage.

Pull request overview

Prevents bottle manifest fetches while recording dependency metadata in installation tabs.

Changes:

  • Reads rebuild numbers directly from the bottle matching the current platform tag.
  • Adds regression coverage ensuring location compatibility is not checked.
File summaries
File Description
Library/Homebrew/tab.rb Avoids compatibility checks when recording bottle rebuilds.
Library/Homebrew/test/tab_spec.rb Tests rebuild recording without location checks.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit 9c31e40 Sep 3, 2026
59 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the issue_23759_def_fetch_tab_failure branch September 3, 2026 16:42
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.

def fetch can cause tab creation failure from compatible_locations? check

4 participants