Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_formulae: avoid trying to install unavailable bottle #1279

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Oct 30, 2024

Issue was seen in Homebrew/homebrew-core#193114 where cgal cannot fetch a qt bottle as it wasn't built on Sequoia and test runner does not download Sonoma bottles.

Not sure yet if this does what I want.

@carlocab
Copy link
Member

Do you have a link to the error log?

@cho-m
Copy link
Member Author

cho-m commented Oct 30, 2024

Do you have a link to the error log?

Will need to wait for run to finish as I saw it before scroll limit. If any prior run still has log, I'll add link here.

EDIT: Last run: https://github.com/Homebrew/homebrew-core/actions/runs/11547656218/job/32190704667#step:3:921

@carlocab
Copy link
Member

carlocab commented Oct 30, 2024

Gotcha, thanks.

I wonder if it makes more sense to handle this here:

def dependents_for_formula(formula, formula_name, args:)

Maybe somewhere here?

# Split into dependents that we could potentially be building from source and those
# we should not. The criteria is that a dependent must have bottled dependencies, and
# either the `--build-dependents-from-source` flag was passed or a dependent has no
# bottle on the current OS.
source_dependents, dependents = dependents.partition do |dependent, deps|
next false if OS.linux? && dependent.requirements.exclude?(LinuxRequirement.new)
all_deps_bottled_or_built = deps.all? do |d|
bottled_or_built?(d.to_formula, @dependent_testing_formulae)
end
args.build_dependents_from_source? && all_deps_bottled_or_built
end
# From the non-source list, get rid of any dependents we are only a build dependency to
dependents.select! do |_, deps|
deps.reject { |d| d.build? && !d.test? }
.map(&:to_formula)
.include?(formula)
end

source_dependents and dependents both look like arrays of the form

[[foo, foo_deps], [bar, bar_deps], ....]

so we can just cycle through the outer array to check the second member of each inner array for skipped_or_failed_formulae.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants