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(gitlab-client): change pending to running state #1971

Merged

Conversation

syphernl
Copy link
Contributor

@syphernl syphernl commented Jan 4, 2022

The GitLab API does not permit the pipeline state to go from pending to success without going trough running first.
It does not appear that we actually need to use the pending state at all, instead running can be used which should resolve this issue.

Fixes #1356

@syphernl syphernl requested a review from a team as a code owner January 4, 2022 09:21
@syphernl
Copy link
Contributor Author

syphernl commented Jan 4, 2022

Hmm unfortunately this doesn't seem be working either 🤔

400 {message: Cannot transition status via :run from :running (Reason(s): Status cannot transition via \"run\")}"

@syphernl
Copy link
Contributor Author

syphernl commented Jan 4, 2022

The apply stage is no longer stuck in pending with these changes:

image

It also properly transitions to failed in case the apply fails:

image

@chenrui333 chenrui333 requested a review from jamengual January 15, 2022 18:27
@jamengual
Copy link
Contributor

@syphernl is this working consistently for you right now?

@syphernl
Copy link
Contributor Author

syphernl commented Feb 1, 2022

@syphernl is this working consistently for you right now?

For me it is working as expected.

@chenrui333
Copy link
Member

Thanks @syphernl!

@chenrui333 chenrui333 merged commit 8981185 into runatlantis:master Mar 7, 2022
@chenrui333 chenrui333 added this to the v0.19.1 milestone Mar 7, 2022
@syphernl syphernl deleted the fix/gitlab_pending_transition branch March 7, 2022 16:32
@chenrui333
Copy link
Member

looks like the tests failed in the master build. 😮‍💨

@chenrui333
Copy link
Member

interesting, the tests did not actually got triggered for this PR.

chenrui333 added a commit that referenced this pull request Mar 7, 2022
Signed-off-by: Rui Chen <rui@chenrui.dev>
chenrui333 added a commit that referenced this pull request Mar 7, 2022
Signed-off-by: Rui Chen <rui@chenrui.dev>
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
* fix(gitlab-client): change pending to running state

* change default state
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
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 400 Error on apply
3 participants