-
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
gitlab: atlantis/apply
job stays pending
#2125
Comments
atlantis/apply
job stays pendingatlantis/apply
job stays pending
Ran into this slightly differently on GitHub: the From the looks of it, there's some sort of missing post-plan status update missing or failing to trigger. |
Hello, |
Looks like this is issue not only for Gitlab, but also for Github. We rely on this Github Action: https://github.com/WyriHaximus/github-action-wait-for-status to continue our workflow. And thanks to this "fix" things are now f**ed up. I would propose to include an option to turn on/off this "fix". |
I did the change that broke your workflow, my PR has already been reverted (#2173) |
I noticed on our gitlab that after installing Atlantis v0.19.3-pre.20220408 that the apply step is no longer stuck in a "pending" state but now appears "cancelled" and thus the pipeline has a status of "cancelled". Is this expected? |
Is this fixed in 0.19.3? |
It looks now good in GitHub, no more pending apply. |
On GitLab the general |
Can anyone verify this on their Gitlab-based setup? |
I am still facing the issue on my GitLab environment using Atlantis |
We are facing the same issue with atlantis |
is this still happening with |
I believe this is working fine now with |
Upon further testing this appears to still be an issue. |
Same here on 0.19.8 + Gitlab SaaS |
did anyone tested with the latest version? 0.22.2? |
(I removed my comment because I thought it was Atlantis), but a pre-task was executed and lasted for days because the script was waiting for interactive input, and the logs/jobs were not outputted. I couldn't also see the specific jobs logs in Gitlab CI. (Atlantis 19, 19.9 and 21.0) |
I seem to have the same issue on v0.20.0 |
The latest version currently is v0.22.2. I do not think anyone has contributed a fix for this. Please feel free to contribute. |
Hi we have the same problem since monthes. |
I didn't find the exact root cause of it but here are some notes from my side:
A couple notes from my side here:
|
I think this is a similar issue to the one I am in the process of addressing here: #3747. The issue in this case is this I believe here:
Similar as the issue from #3725, the problem is that we are updating the "atlantis/apply" status (in gitlab a "pipeline") with a pending (in gitlab "running"), despite the step being done. This one is trickier, though, because we can't just exit early, since other VCSs need to be updated as Pending, whereas for gitlab it probably makes the most sense to mark as Success. I'm only familiar with gitlab so I need to look into this more, but it feels like we can't do "the same thing" for both of them here. Maybe we have to add something to the Client interface that dictates how these Statuses are setup? |
I use github and Pending should not be any longer once the action has been completed. |
That's good to know. The good news is that we can and should make this change outside of VCS-specific code, since the expectations seem to be the same. The bad news is, I'm not sure what should be done :) The best I can come up with is:
This gets rid of the problem of the "stuck pending", but I do worry about users or automation that say "apply is green" think "this PR is done". @jamengual if this seems like an OK tradeoff to you I can take a stab at writing up the code UPDATE: Another thing this approach has going for it is, since #3378, if one of the two plans is a no-op, it's going to update apply to be 1/1 anyway, so this would be in line with that |
we need more input on this from other people. |
@nitrocode @GenPage @chenrui333 any inputs? |
I worry a lot about this too. I know this would confuse our atlantis users. It's annoying right now to have the status check get in the way sometimes, but I think it would be worse for it to look like everything had been applied, when in reality there are still changes pending that need to be merged. By marking the apply as successful, when there are still pending plans, I think also will make atlantis consider the code request mergable, while there are still pending changes on it. |
Please look at the GitHub/GitLab APIs that are being used, as some of the statements being made here are wrong. GitLab - Set the pipeline status of a commit. |
At this moment i have this problem and a lot of pipelines being stuck on pending. |
I think pending is something in an "uncompleted state," so based on your recommendation, I think this will clarify the definition of a pending state, so I agree with that approach. If a user plans two projects and later applies only one, then that is their decision to do so, and if the apply is successful, then it should go green. The status in itself can't figure out what the user is doing with the Atlantis commands. |
I am seeing this with Atlantis 0.28.5 (cannot upgrade because of #4950), Gitlab 17.3 and 17.4, and a custom workflow to use When the MR changes more than one project,
|
Community Note
Overview of the Issue
We're using Atlantis with GitLab. If we do partial applies using comments the hover-text on the
atlantis/apply
job stays at0/3 projects applied successfully
and this stays pending.Since there is also an actual
atlantis/plan: xxxx
for the individual project the individualatlantis/apply
job seems redundant.The
atlantis/apply
job itself is the only one without a linked job URL.Reproduction Steps
atlantis/apply -d xxxx -w xxxx
remains at0 of 3 projects applied
and stays in pending.Logs
Environment details
If not already included, please provide the following:
Additional Context
The text was updated successfully, but these errors were encountered: