-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Automerge fails on github free accounts in 0.23.3 due to branch protection api error #3268
Comments
The error seems to be
Not sure if this is atlantis related. If you downgrade back to 0.23.2, does it work as expected? |
This also fails on enterprise accounts, this time with a 404 error, I think because an unexpected payload, if |
I started to get following error since 0.23.3, we're on gh enterprise:
|
Hi, We are on an enterprise account (not self hosted however) and are also seeing this error as a 404 with the latest upgrade.
|
Yes, downgrading to 0.23.2 resolves the problem. |
This looks like it came from this PR #3211 cc: @tpolekhin See differences between versions v0.23.2...v0.23.3 To confirm if the above PR is the culprit, try this version before that PR merge and see if it works https://github.com/orgs/runatlantis/packages/container/atlantis/78397613?tag=dev-alpine-47f0258 Then confirm the version after the PR merge and see if it fails https://github.com/orgs/runatlantis/packages/container/atlantis/78416368?tag=dev-alpine-7a33828 |
@jescholl That is an edge case that I did not think of @adriantr Unfortunately I don't have access to enterprise GitHub to check this, can you please provide a little bit more details on this? Why doesn't it has access to @cep21 This is a weird one. Does your |
Here are the references where we get branch protections This one existed before the pr and did not cause issues atlantis/server/events/vcs/github_client.go Lines 409 to 412 in c019d8b
This was added in the pr and does cause issues atlantis/server/events/vcs/github_client.go Lines 582 to 587 in c019d8b
Do i have that right? |
@nitrocode, I tested as you suggested and it looks like you were right, |
@nitrocode you are correct. I don't see a flaw in the logic of the #3211 PR. Maybe those issues surfaced because now @jescholl @cep21 @Heldroe @adriantr did you had this flag enabled and everything was working fine before? @adriantr According to GitHub docs branch protection API endpoint should be read accessible if you configured Administration read-only permissions for the integration. |
I did not have that flag enabled |
@jescholl your case is pretty straightforward to me, we need to catch this error as we do for |
Hi all, We just upgraded to 0.23.3 and also ran into the 404 for mergeability:
In our case, we have a dedicated github user (enterprise org) for atlantis, and this user had to be granted the admin role on each repository it uses. Only the admin role contains the correct permission to retrieve branch protection rules. This was first mentioned here. |
Perhaps if the api returns |
The fix is merged and will be in the next release. For early adopters, please use the |
when is 0.23.4 coming out? this is breaking automerge for us in 0.23.3 |
Can this be closed? Is anyone still experiencing this in 0.23.4 or later? |
Community Note
Overview of the Issue
After upgrading from 0.23.2 to 0.23.3, Atlantis is no longer able to automerge PRs. It will perform the apply and even post a comment saying
Automatically merging because all plans have been successfully applied.
, but the PR doesn't get merged.Reproduction Steps
atlantis apply
Logs
Logs
trace
Environment details
Atlantis server-side config file:
Repo
atlantis.yaml
file:# config file
Additional Context
I thought I may have been able to work around this issue by eliminating the
apply_requirements
(see above config), but I still get the same behavior and same errors in the logs.The text was updated successfully, but these errors were encountered: