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

formulae_detect: fetch @added_formulae too #1066

Closed
wants to merge 1 commit into from

Conversation

carlocab
Copy link
Member

This should prevent accidentally merging PRs for new formulae without bottles.

This should prevent accidentally merging PRs for new formulae without bottles.
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Makes sense! When does this normally occur?

@Bo98
Copy link
Member

Bo98 commented May 16, 2024

Does @testing_formulae not already include @added_formulae?

@carlocab
Copy link
Member Author

Makes sense! When does this normally occur?

If you press the "Merge" button instead of doing brew pr-publish, it seems: Homebrew/homebrew-core#171733

Does @testing_formulae not already include @added_formulae?

Doesn't seem so. See PR linked above.

@Bo98
Copy link
Member

Bo98 commented May 16, 2024

@carlocab
Copy link
Member Author

Ah, actually @added_formulae are in @testing_formulae already. The bug is in the bottle equality check, I think.

@Bo98
Copy link
Member

Bo98 commented May 16, 2024

The bug is on the test rather than the detection side - we don't actually demand a bottle block exists:

tags = formula.bottle_specification.collector.tags
tags.each do |tag|
cleanup_during!(args:)
test "brew", "fetch", "--retry", "--formulae", "--bottle-tag=#{tag}", formula_name
end

tags in this case is probably []

@MikeMcQuaid
Copy link
Member

Good catch @Bo98. Yeh, requiring bottles always there for homebrew/core makes sense.

(unrelatedly: I think it would be really nice if pressing the merge button did actually work one day; perhaps it could push the bottle commits to the PR and then fail?)

@carlocab
Copy link
Member Author

(unrelatedly: I think it would be really nice if pressing the merge button did actually work one day; perhaps it could push the bottle commits to the PR and then fail?)

Could try calling brew pr-publish on the merge queue job

@Bo98
Copy link
Member

Bo98 commented May 16, 2024

I don't think merge_group has PR information, because a merge group can contain multiple merges.

@carlocab
Copy link
Member Author

Yup, but each PR gets its own run within a merge_group, so might be there

@MikeMcQuaid
Copy link
Member

Yup, but each PR gets its own run within a merge_group, so might be there

Yes, should be. Should also be possible to infer each PR programmatically.

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.

None yet

3 participants