Skip to content

References for commit Not Found #2606

Open
@theautoroboto

Description

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

When attempting an atlantis apply in a PR from a fork, the process fails with Error: goroutine panic. This is a bug.

Reproduction Steps

Verify environment variable has been set -- ATLANTIS_ALLOW_FORK_PRS=true
Fork Repo
Make a change
Submit a PR
run atlantis apply

Logs

Log posted to GitLab PR
Error: goroutine panic. This is a bug.

runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:260 (0x44c995)
runtime/signal_unix.go:835 (0x44c965)
github.com/runatlantis/atlantis/server/events/vcs/gitlab_client.go:209 (0xb8f5fa)
github.com/runatlantis/atlantis/server/events/vcs/proxy.go:72 (0xb947c4)
github.com/runatlantis/atlantis/server/events/vcs/pull_status_fetcher.go:28 (0xb95045)
github.com/runatlantis/atlantis/server/events/apply_command_runner.go:108 (0xd74c15)
github.com/runatlantis/atlantis/server/events/command_runner.go:296 (0xd79823)
runtime/asm_amd64.s:1594 (0x467ca0)

Logs from pod

{"level":"warn","ts":"2022-10-20T13:31:20.736Z","caller":"events/apply_command_runner.go:100","msg":"unable to update commit status: POST https://xxx/api/v4/projects/bsmith/runatlantis-terraform/statuses/d670fed43f6ff5e5ef7fc2dffe5ca86f61dd839d: 404 {message: 404 References for commit Not Found}","json":{"repo":"bsmith/runatlantis-terraform","pull":"14"},"stacktrace":"github.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run\n\tgithub.com/runatlantis/atlantis/server/events/apply_command_runner.go:100\ngithub.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand\n\tgithub.com/runatlantis/atlantis/server/events/command_runner.go:296"}
{"level":"error","ts":"2022-10-20T13:31:20.936Z","caller":"events/command_runner.go:427","msg":"PANIC: runtime error: invalid memory address or nil pointer dereference\nruntime/panic.go:260 (0x44c995)\nruntime/signal_unix.go:835 (0x44c965)\ngithub.com/runatlantis/atlantis/server/events/vcs/gitlab_client.go:209 (0xb8f5fa)\ngithub.com/runatlantis/atlantis/server/events/vcs/proxy.go:72 (0xb947c4)\ngithub.com/runatlantis/atlantis/server/events/vcs/pull_status_fetcher.go:28 (0xb95045)\ngithub.com/runatlantis/atlantis/server/events/apply_command_runner.go:108 (0xd74c15)\ngithub.com/runatlantis/atlantis/server/events/command_runner.go:296 (0xd79823)\nruntime/asm_amd64.s:1594 (0x467ca0)\n","json":{"repo":"bsmith/runatlantis-terraform","pull":"14"},"stacktrace":"github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).logPanics\n\tgithub.com/runatlantis/atlantis/server/events/command_runner.go:427\nruntime.gopanic\n\truntime/panic.go:890\nruntime.panicmem\n\truntime/panic.go:260\nruntime.sigpanic\n\truntime/signal_unix.go:835\ngithub.com/runatlantis/atlantis/server/events/vcs.(*GitlabClient).PullIsMergeable\n\tgithub.com/runatlantis/atlantis/server/events/vcs/gitlab_client.go:209\ngithub.com/runatlantis/atlantis/server/events/vcs.(*ClientProxy).PullIsMergeable\n\tgithub.com/runatlantis/atlantis/server/events/vcs/proxy.go:72\ngithub.com/runatlantis/atlantis/server/events/vcs.(*pullReqStatusFetcher).FetchPullStatus\n\tgithub.com/runatlantis/atlantis/server/events/vcs/pull_status_fetcher.go:28\ngithub.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run\n\tgithub.com/runatlantis/atlantis/server/events/apply_command_runner.go:108\ngithub.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand\n\tgithub.com/runatlantis/atlantis/server/events/command_runner.go:296"}

Environment details

If not already included, please provide the following:

  • Atlantis version: atlantis 0.20.1

Activity

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

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedGood feature for contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions