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

Created on 29 May 2019  Â·  2Comments  Â·  Source: runatlantis/atlantis

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

https://github.com/runatlantis/atlantis/blob/354551d99a65fc2db112cd6d3747ec5b17f7b4fe/server/events/vcs/bitbucketcloud/client.go#L120

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
bug

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 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/

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cket picture cket  Â·  5Comments

teosoft123 picture teosoft123  Â·  5Comments

natalysheinin picture natalysheinin  Â·  3Comments

cheethoe picture cheethoe  Â·  4Comments

mcdafydd picture mcdafydd  Â·  4Comments