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

fix: Use Gitlab's pending status when the commit status is pending #3899

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

william-richard
Copy link
Contributor

@william-richard william-richard commented Oct 25, 2023

what

Unlike Gitlab, Github's commit statuses do not have a "running" state, so the atlantis flow doesn't have a concept for "running". Instead of adding complexity for the majority use case (Github), I think a clear user experience is to map "pending" to "pending" for Gitlab, and let commit statuses go from pending to either success or failure.

Along with #3378, this change should result in a better user experience for Gitlab users.

why

  • See
  • This absolutely is getting in the way of gitlab MR automation, since sometimes you can get a commit status stuck in "running" forever, and never clear the MR status.

tests

  • I ran atlantis locally against my company's gitlab instance, and it updated the commit statuses accurately

references

Perhaps closes #2125

Unlike Gitlab, Github's commit statuses do not have a "running" state,
so the atlantis flow doesn't have a concept for "running". Instead of
adding complexity for the majority use case (Github), I think a clear
user experience is to map "pending" to "pending" for Gitlab, and let
commit statuses go from pending to either success or failure.

Along with runatlantis#3378,
this change should result in a better user experience for Gitlab users.
@william-richard william-richard changed the title Use Gitlab's pending status when the commit status is pending fix: Use Gitlab's pending status when the commit status is pending Oct 25, 2023
@jamengual
Copy link
Contributor

@lukemassa @X-Guardian

@lukemassa
Copy link
Contributor

lukemassa commented Oct 26, 2023

Unfortunately I don't think this addresses the issue. From gitlab's perspective, after one successful plan, the pipeline is still not "successful", so both humans and automation are likely to be confused about what to do.

Screenshot 2023-10-26 at 5 59 48 PM

Additionally, in the time after atlantis plan but before the plan be pasted into a comment, the pipelines look like this:
Screenshot 2023-10-26 at 5 59 26 PM

which to me doesn't capture the fact that a plan is "running" (i.e. terraform is happening, stuff is going).

I think there are definitely changes to be made to better map states between the different VCSs, per @X-Guardian 's comment #2125 (comment) , it is tricky because atlantis uses one set of terminologies whereas github and gitlab use different ones (kind of like atlantis using PR like github whereas gitlab uses MR). Let me think about this one.

That said, I still think that #2125 is not a VCS-specific problem and should be addressed in i.e. plan_command_runner.go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gitlab: atlantis/apply job stays pending
3 participants