Skip to content

test_bot fixes for portable formulae#23068

Open
cho-m wants to merge 3 commits into
mainfrom
nested-test-bot-in-tmp
Open

test_bot fixes for portable formulae#23068
cho-m wants to merge 3 commits into
mainfrom
nested-test-bot-in-tmp

Conversation

@cho-m

@cho-m cho-m commented Jul 12, 2026

Copy link
Copy Markdown
Member

  • 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 Hyperfine benchmarks.
  • 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?

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

test_bot/formulae: run nested test-bot in temporary dir

This provides a clean directory to test bottling so that previously built bottles don't cause "Unexpected bottle" errors

https://github.com/Homebrew/homebrew-core/actions/runs/29179553748/job/86656464924#step:4:1833

 ==> Running Formulae#run!
  Error: Unexpected bottle JSON: /github/home/bottles/portable-ruby--4.0.5_1.arm64_linux.bottle.json
  Error: Unexpected bottle tarball: /github/home/bottles/portable-ruby--4.0.5_1.arm64_linux.bottle.tar.gz

Mktemp#run should be similar to Dir.mktmpdir { Dir.chdir { ... } }. Could use latter if preferred (need to change directory so that Pathname.pwd runs in clean directory).


test_bot/formulae_detect: exclude portable when testing default

This avoids trying to rebuild portable formulae again within the nested test-bot run which may the cause of stalled runs

cho-m added 2 commits July 12, 2026 12:39
This provides a clean directory to test bottling so that previously
built bottles don't cause "Unexpected bottle" errors
This avoids trying to rebuild portable formulae again within the nested
test-bot run which may the cause of stalled runs
Copilot AI review requested due to automatic review settings July 12, 2026 17:05

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.

Pull request overview

This PR adjusts Homebrew’s test_bot behavior around portable formulae to reduce flaky/stalled CI runs: it runs a nested brew test-bot in a clean temporary working directory to avoid “Unexpected bottle” artifacts, and it prevents portable formulae from being selected when running --test-default-formula.

Changes:

  • Run the nested brew test-bot --test-default-formula inside an Mktemp directory to isolate bottle artifacts.
  • When --test-default-formula is used, filter out portable-* formulae from the detected added/modified sets to avoid rebuilding them in that run.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Library/Homebrew/test_bot/formulae.rb Wrap nested brew test-bot invocation in Mktemp to run in a clean temporary directory.
Library/Homebrew/test_bot/formulae_detect.rb Exclude portable-* formulae from detection when --test-default-formula is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/test_bot/formulae.rb Outdated
Comment thread Library/Homebrew/test_bot/formulae_detect.rb
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants