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

Bitbucket: PANIC: runtime error: invalid memory address or nil pointer dereference #652

Closed
nutellinoit opened this issue May 29, 2019 · 2 comments · Fixed by #657
Closed
Labels
bug Something isn't working provider/bitbucket

Comments

@nutellinoit
Copy link

We are running into go PANIC error on BitBucket.

I think something is changed on the bitbucket API, the go error stacktrace points to

/go/src/github.com/runatlantis/atlantis/server/events/vcs/bitbucketcloud/client.go:120

if *participant.Approved && *participant.User.Username != pull.Author {

Removing apply_requirements: [approved] from atlantis.yaml fix the problem momentarily

Logs

atlantis_1  | 2019/05/29 15:43:41+0000 [INFO] server: Parsed comment as command="apply" verbose=false dir="" workspace="" project="apigateway" flags=""
atlantis_1  | 2019/05/29 15:43:41+0000 [INFO] server: POST /events – respond HTTP 200
atlantis_1  | 2019/05/29 15:43:41+0000 [INFO] xxxx/terraform-aws#312: Pull request mergeable status: true
atlantis_1  | 2019/05/29 15:43:41+0000 [WARN] xxxx/terraform-aws#312: Unable to update commit status: making request "POST https://api.bitbucket.org/2.0/repositories/xxxx/terraform-aws/commit/945648ab26eb/statuses/build" unexpected status code: 400, body: {"type": "error", "error": {"fields": {"url": ["Enter a valid URL."]}, "message": "url: Enter a valid URL."}}
atlantis_1  | 2019/05/29 15:43:42+0000 [EROR] xxxx/terraform-aws#312: PANIC: runtime error: invalid memory address or nil pointer dereference
atlantis_1  | /usr/local/go/src/runtime/panic.go:513 (0x42a518)
atlantis_1  | /usr/local/go/src/runtime/panic.go:82 (0x42966d)
atlantis_1  | /usr/local/go/src/runtime/signal_unix.go:390 (0x43f861)
atlantis_1  | /go/src/github.com/runatlantis/atlantis/server/events/vcs/bitbucketcloud/client.go:120 (0x8d856a)
atlantis_1  | /go/src/github.com/runatlantis/atlantis/server/events/vcs/proxy.go:60 (0x886ebe)
atlantis_1  | /go/src/github.com/runatlantis/atlantis/server/events/project_command_runner.go:234 (0xcb0461)
atlantis_1  | /go/src/github.com/runatlantis/atlantis/server/events/project_command_runner.go:109 (0xcae4b4)
atlantis_1  | /go/src/github.com/runatlantis/atlantis/server/events/command_runner.go:312 (0xc9df65)
atlantis_1  | /go/src/github.com/runatlantis/atlantis/server/events/command_runner.go:219 (0xc9c7b1)
atlantis_1  | /usr/local/go/src/runtime/asm_amd64.s:1333 (0x457c40)

Tried with versions:

  • v0.7.2
  • v0.8.0
  • v0.6.0
@Phylu
Copy link
Contributor

Phylu commented May 29, 2019

We just started running into this panic as well. The very same changes on a different system were applied yesterday evening without any problems.

This may be is related to atlassian dropping usernames in their account profiles: https://confluence.atlassian.com/cloud/blog/2019/05/upcoming-changes-to-atlassian-account-profiles

Here is the deprecation notice which contains the changes to the bitbucket API: Here is the deprecation notice with the changes on the API: https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/

nutellinoit pushed a commit to nutellinoit/atlantis that referenced this issue May 30, 2019
@nutellinoit
Copy link
Author

Related pull request #654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working provider/bitbucket
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants