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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atlantis does not take into account GitHub checks in the Expected - Waiting for status to be reported-state when determining if a pull request is mergeable #4272

Open
henriklundstrom opened this issue Feb 21, 2024 · 0 comments 路 May be fixed by #4193
Labels
bug Something isn't working

Comments

@henriklundstrom
Copy link

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

Atlantis does not take into account GitHub checks in the Expected - Waiting for status to be reported-state when determining if a pull request is mergeable. Resolving this issue may however be infeasible given the current state of GitHub's API, see cli/cli#6448. This is really an issue with GitHub's API more than with Atlantis, but I'm putting this issue up anyway for the sake of visibility. It may be possible to list all required checks through the rulesets and branch protection endpoints of the API and check that all of them appear in the status checks rollup of the pull request, but this could get complicated and is essentially reimplementing GitHub's internal logic.

Reproduction Steps

Creating a branch protection rule or ruleset that requires a check that does not exist will result in a required check forever stuck in the Expected - Waiting for status to be reported-state. The pull request will not be mergeable in this condition. The GitHub GUI will show this, being rendered internally in GitHub, but the GitHub API will not expose it. Consequently Atlantis will not know of the required check and will assume the pull request is mergeable.

A similar situation can occur if a new required check is added through branch protection or ruleset after a commit was pushed to the pull request. The creation of the check does not trigger its execution, so the check will be stuck in the Expected - Waiting for status to be reported-state. Again, this will be shown in the GitHub GUI, but will not be exposed in the GitHub API, the pull request is not mergeable but Atlantis will not know. But in this case, pushing a new commit on the pull request branch or closing and re-opening the pull request will trigger the check (and it will go into one of the states visible in the API, e.g. PENDING), after which it will in fact be visible to Atlantis as expected.

Logs

Environment details

Additional Context

@henriklundstrom henriklundstrom added the bug Something isn't working label Feb 21, 2024
@henriklundstrom henriklundstrom linked a pull request Feb 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant