-
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_client: Apply doesn't work on a branch cut from another until after making a new commit #2484
Comments
Issue is in atlantis/server/events/vcs/gitlab_client.go Line 209 in 71233ef
|
@jamengual now I'm wondering if this is a valid issue for Atlantis or if I should open another one at https://github.com/xanzy/go-gitlab? |
we can leave this open and you can file in go-gitlab too and then report back here. |
After digging into it a bit more the issue is here and how Atlantis is using the client. In my example mr.HeadPipeline is nil so that just needs to be accounted for. |
* fix: prevent commit status in incorrect MR - closes #2484 * chore: update test 'TestGitlabClient_UpdateStatus'
* fix: prevent commit status in incorrect MR - closes runatlantis#2484 * chore: update test 'TestGitlabClient_UpdateStatus'
Community Note
Overview of the Issue
This is an unlikely edge case but I hit it nonetheless. I'm PoC'ing Atlantis at work and once I had a branch I was comfortable with I wanted to cut a new branch/PR so the output was easier to read. I could've also just deleted all the prior comments but this was faster. Upon doing so and opening the second PR without including any new changes, apply fails after a successful plan.
I suspect this has something to do with the commit/branch lookup logic in the gitlab client.
Reproduction Steps
git checkout -b coolStuffA
coolStuffA
checked out. From here create a new branch:git checkout -b coolStuffB
git push origin HEAD
coolStuffB
into mainruntime error: invalid memory address or nil pointer dereference
Logs
Stacktrace
Environment details
Self hosted gitlab using helm chart in EKS
Additional Context
The text was updated successfully, but these errors were encountered: