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
Removing apply_requirements: [approved] from atlantis.yaml fix the problem momentarily
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:
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/
Related pull request #654
Most helpful comment
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 beis related to atlassian dropping usernames in their account profiles: https://confluence.atlassian.com/cloud/blog/2019/05/upcoming-changes-to-atlassian-account-profilesHere 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/