mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-03 09:28:37 +00:00
89a028ffd21048c211802a44df5a789bd13b4963
In this particular example `mr.HeadPipeline.SHA` panics on a nil pointer dereference because HeadPipeline is empty.
This seems to be caused by the lack of permission to update the commit status.
```go
runtime.gopanic
runtime/panic.go:1038
runtime.panicmem
runtime/panic.go:221
runtime.sigpanic
runtime/signal_unix.go:735
github.com/runatlantis/atlantis/server/events/vcs.(*GitlabClient).PullIsMergeable
github.com/runatlantis/atlantis/server/events/vcs/gitlab_client.go:208
github.com/runatlantis/atlantis/server/events/vcs.(*ClientProxy).PullIsMergeable
github.com/runatlantis/atlantis/server/events/vcs/proxy.go:72
github.com/runatlantis/atlantis/server/events/vcs.(*pullReqStatusFetcher).FetchPullStatus
github.com/runatlantis/atlantis/server/events/vcs/pull_status_fetcher.go:28
github.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run
github.com/runatlantis/atlantis/server/events/apply_command_runner.go:105
github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand
github.com/runatlantis/atlantis/server/events/command_runner.go:252
```
The least invasive solution is to simply use the commit-hash from pull and guess that the pipeline was "skipped" unless the HeadPipeline is there.
The outcome is:
When mr.HeadPipeline is present:
- use the commit hash and status from the HeadPipeline
When mr.HeadPipeline is NOT present:
- use the commit hash from pull request struct
- assume the pipeline was "skipped"
In cases where GitLab is configured to require a pipeline to pass, this results on a message saying the MR is not mergeable.
More info:
- https://github.com/runatlantis/atlantis/issues/1852
Atlantis

Terraform Pull Request Automation
Resources
- How to get started: www.runatlantis.io/guide
- Full documentation: www.runatlantis.io/docs
- Download the latest release: github.com/runatlantis/atlantis/releases/latest
- Get help in our Slack channel
- Start Contributing: CONTRIBUTING.md
What is Atlantis?
A self-hosted golang application that listens for Terraform pull request events via webhooks.
What does it do?
Runs terraform plan, import, apply remotely and comments back on the pull request with the output.
Why should you use it?
- Make Terraform changes visible to your whole team.
- Enable non-operations engineers to collaborate on Terraform.
- Standardize your Terraform workflows.