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

[BUG] Unable to merge even after maintainers approval #11864

Open
deshsidd opened this issue Jan 11, 2024 · 10 comments
Open

[BUG] Unable to merge even after maintainers approval #11864

deshsidd opened this issue Jan 11, 2024 · 10 comments
Labels
bug Something isn't working Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. Other

Comments

@deshsidd
Copy link
Contributor

Describe the bug

Problem PR: #11582

For the above PR, even after getting a maintainers approval (@msfroh ), we were unable to merge the PR as the Minimum approval count check did not pass.

We had to dismiss and re-review to make it pass. Let's please fix this for future contributors.

Related component

Other

To Reproduce

  1. Create a PR
  2. Approve by maintainer
  3. Will not be allowed to merge
  4. Dismiss the approval and re-approve will now work

Not sure when this happens and if it happens every time. Might need to do some testing.

Expected behavior

Approval by maintainer should pass the Minimum approval count check.

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@deshsidd deshsidd added bug Something isn't working untriaged labels Jan 11, 2024
@github-actions github-actions bot added the Other label Jan 11, 2024
@dblock
Copy link
Member

dblock commented Jan 16, 2024

@peternied was this an issue in an action or something wasn't dismissed?

@msfroh
Copy link
Collaborator

msfroh commented Jan 16, 2024

I could be mistaken, but I think I've noticed a pattern. If a maintainer approves, then the PR is modified (e.g. add a commit, rebase on main), the action restarts and waits for approval again.

Since that forces approval on the latest version of the PR, it might not really be a bug.

In particular, it helps us avoid the following scenario (that was previously possible, I think):

  1. Contributor submits a PR.
  2. Maintainer reviews and approves the PR, but doesn't merge right away (maybe retrying Gradle check).
  3. Contributor adds another commit that is somehow harmful (malicious, broken, etc).
  4. Maintainer returns to the PR, sees the big green checkmark (since they previously approved and now the Gradle checks passed), and merges the PR (without noticing the extra unreviewed commit).

IMO, we should keep an eye out for "failures" of the action to see if they only happen when there are changes after approval. If so, then I think it's a good thing.

@peternied
Copy link
Member

@dblock There was an issue with the only way to trigger the 'maintainer approval' was by a
'new approval', where a previous approval was dismissed, non-intuitive. There was a small change in [1] that allows the action to be retriggered on review action.

I'll keep an eye on this issue, and if I haven't heard of any funkiness in the next 2 weeks I'll close on or after the 1/31

@peternied peternied added Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. and removed untriaged labels Jan 16, 2024
@deshsidd
Copy link
Contributor Author

Thanks for the followup @peternied @msfroh

@andrross
Copy link
Member

I could be mistaken, but I think I've noticed a pattern. If a maintainer approves, then the PR is modified (e.g. add a commit, rebase on main), the action restarts and waits for approval again.

@msfroh I've noticed this behavior and also agree this is desirable. I was always surprised that the previous logic would accept an approval against an old revision of the code given that arbitrary changes could have been made since then.

@bbarani
Copy link
Member

bbarani commented Feb 13, 2024

@peternied @andrross Can we close this issue? Can you please provide an update?

@peternied
Copy link
Member

I don't think we should close this issue, we've seen some behavior that is outside user expectation. There is no harm in leaving this open IMO.

@gaiksaya
Copy link
Member

gaiksaya commented Jul 2, 2024

Wondering if we really need this workflow. We have an option in GitHub to dismiss old reviews when a code change is pushed as well as minimum approval count before merging the PR
image

Can't we enable those options instead?

@andrross
Copy link
Member

andrross commented Jul 2, 2024

@gaiksaya You're referring to the maintainer-approval workflow, right? I don't know the history of that workflow, but on the surface it looks like it is duplicating GitHub functionality and seems like it should not be needed. @peternied Why did we need a custom workflow for this?

@peternied
Copy link
Member

This is a new approval check that effectively doubles as the existing CODEOWNERS checks on this repository - which will allow that code owners check to be removed in favor of this one.

This check pulls the list of maintainers from GitHub repository settings. This also codifies the number of approvals needed in the repository in the event we increase or alter these requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. Other
Projects
None yet
Development

No branches or pull requests

8 participants
@msfroh @dblock @peternied @andrross @deshsidd @gaiksaya @bbarani and others