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

brew bump-formula-pr blocks on closed versions #9269

Closed
2 of 3 tasks
SMillerDev opened this issue Nov 23, 2020 · 9 comments
Closed
2 of 3 tasks

brew bump-formula-pr blocks on closed versions #9269

SMillerDev opened this issue Nov 23, 2020 · 9 comments
Labels
outdated PR was locked due to age stale No recent activity

Comments

@SMillerDev
Copy link
Member

Bug report

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

Update a formula with brew bump-formula-pr

What happened (include command output)

brew bump-formula-pr often (but not always) stops me from submitting pull requests when there has been a pull request for the same software. I haven't really figured out when it happens exactly, but it sometimes blocks on closed pull requests, sometimes on open pull requests for older versions.

What you expected to happen

Only block the command on an exact match with the version of an open PR.

Step-by-step reproduction instructions (by running brew commands)

It's hard to reliably reproduce. I'll update this section the next time it happens

Output of brew config and brew doctor commands

not relevant IMO.

@SMillerDev
Copy link
Member Author

I'm expecting Homebrew/homebrew-cask#93014 to be related

@dtrodrigues
Copy link
Member

I'd be interested in seeing cases where the current behavior isn't appropriate. I believe the intention has been to block if an open PR contains the formula name (indicating that there are currently proposed changes that should be resolved prior to doing a version bump) or if a closed PR has the exact name (indicating a previously-failed bump-formula-pr attempt). If after seeing that it makes sense to continue with the current open PR, or if the user can determine that whatever caused the closed PR to fail and it's been addressed, one can continue the PR with the --force flag as indicated in the error message: Duplicate PRs should not be opened. Use --force to override this error.

@SMillerDev
Copy link
Member Author

if an open PR contains the formula name

This would also block python@3.9 updates while there are still PRs with ansible: migrate to python@3.9.

As for the closed items it's either not an exact match, or githubs api is doing weird stuff.

@zachauten
Copy link
Contributor

I don't think github's api allows you to search for PRs with an exact matching title. But we could fix the command to further filter the items returned by the api call down to only exact matches.

@SeekingMeaning
Copy link
Contributor

SeekingMeaning commented Dec 10, 2020

This would also block python@3.9 updates while there are still PRs with ansible: migrate to python@3.9.

Not sure if this is possible, but perhaps we could check if the pull request modifies the formula (i.e. check if it actually modifies Formula/python@3.9.rb)

@BrewTestBot
Copy link
Member

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

@BrewTestBot BrewTestBot added the stale No recent activity label Jan 1, 2021
@SeekingMeaning
Copy link
Contributor

perhaps we could check if the pull request modifies the formula

https://stackoverflow.com/a/64471155

GET /repos/:owner/:repo/pulls/:pull_number/files

@SeekingMeaning SeekingMeaning removed the stale No recent activity label Jan 5, 2021
@SeekingMeaning
Copy link
Contributor

As for the closed items it's either not an exact match, or githubs api is doing weird stuff.

I don't think github's api allows you to search for PRs with an exact matching title. But we could fix the command to further filter the items returned by the api call down to only exact matches.

Strangely enough, we already do this: https://github.com/Homebrew/brew/blob/8795895/Library/Homebrew/utils/github.rb#L624

So I'm not sure what's happening here

@BrewTestBot
Copy link
Member

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

@BrewTestBot BrewTestBot added the stale No recent activity label Jan 29, 2021
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Mar 8, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

No branches or pull requests

5 participants