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

Atlantis does not include full path specified in config when calling bitbucket API #508

Closed
wintergren opened this issue Mar 1, 2019 · 5 comments
Labels
bug Something isn't working provider/bitbucket

Comments

@wintergren
Copy link

I can't get Atlantis to work with our private bitbucket stash server. Problem seems to be that our bitbucket base url is defined like this: https://bitbucket.domain.com/bitbucket which is also what I provide for the --bitbucket-base-url flag when starting Atlantis. However this yields 404's when Atlantis uses the bitbucket api.

For example got the following when creating a new PR

2019/02/28 11:37:35+0000 [INFO] server: POST /events – from 172.17.0.1:36006
2019/02/28 11:37:35+0000 [INFO] server: Identified event as type "opened"
2019/02/28 11:37:35+0000 [EROR] server: Unable to comment on pull request: making request "POST https://bitbucket.domain.com/rest/api/1.0/projects/pe/repos/aws-eks/pull-requests/5/comments" unexpected status code: 404, body:
2019/02/28 11:37:35+0000 [INFO] server: POST /events – respond HTTP 403

And this when commenting on a PR with atlantis plan:

2019/02/28 12:00:51+0000 [INFO] server: POST /events – from 172.17.0.1:36048
2019/02/28 12:00:51+0000 [INFO] server: Parsed comment as command="plan" verbose=false dir="" workspace="" project="" flags=""
2019/02/28 12:00:51+0000 [INFO] server: POST /events – respond HTTP 200
2019/02/28 12:00:51+0000 [WARN] AMO Platform Engineering/aws-eks#5: Unable to update commit status: making request "POST https://bitbucket.domain.com/rest/build-status/1.0/commits/3f55bed41f0c37b0514cde04d99a9b9b7207b1e3" unexpected status code: 404, body:
2019/02/28 12:00:51+0000 [INFO] AMO Platform Engineering/aws-eks#5: Creating dir "/home/atlantis/.atlantis/repos/AMO Platform Engineering/aws-eks/5/default"
2019/02/28 12:00:51+0000 [INFO] AMO Platform Engineering/aws-eks#5: Successfully parsed atlantis.yaml file
2019/02/28 12:00:51+0000 [EROR] AMO Platform Engineering/aws-eks#5: Making request "GET https://bitbucket.domain.com/rest/api/1.0/projects/pe/repos/aws-eks/pull-requests/5/changes?start=0" unexpected status code: 404, body:
2019/02/28 12:00:51+0000 [WARN] AMO Platform Engineering/aws-eks#5: Unable to update commit status: making request "POST https://bitbucket.domain.com/rest/build-status/1.0/commits/3f55bed41f0c37b0514cde04d99a9b9b7207b1e3" unexpected status code: 404, body:
2019/02/28 12:00:51+0000 [EROR] AMO Platform Engineering/aws-eks#5: Unable to comment: making request "POST https://bitbucket.domain.com/rest/api/1.0/projects/pe/repos/aws-eks/pull-requests/5/comments" unexpected status code: 404, body:

So, right now we can't use Atlantis at all because of this :(

lkysow added a commit that referenced this issue Mar 1, 2019
Previously we were stripping the basepath from the passed in URL. i.e.
if I passed in --bitbucket-base-url=https://me.com/basepath then we
would just strip off /basepath.

This change fixes that bug (#508).
@lkysow lkysow added the bug Something isn't working label Mar 1, 2019
@lkysow
Copy link
Member

lkysow commented Mar 1, 2019

So, right now we can't use Atlantis at all because of this :(

😭well that's not good! I've got a patch coming. You'll have to run off of the master Docker image runatlantis/atlantis:master until the next release (which should be in a week or two).

@lkysow
Copy link
Member

lkysow commented Mar 1, 2019

Fixed in #509

@lkysow lkysow closed this as completed Mar 1, 2019
@wintergren
Copy link
Author

Awesome, thanks @lkysow! I will test that on Monday!

@wintergren
Copy link
Author

@lkysow when you say runatlantis/atlantis:master do you mean I need to build the docker image myself from the master branch? Because if I pull runatlantis/atlantis:latest it will still be version v0.4.15 running in the container even though I can see on docker hub that latest was updated 3 days ago:

Tags (35)
latest 115 MB
Last update: 3 days ago
v0.4.15 115 MB
Last update: 21 days ago

Don't know if I'll be able to build the master docker myself as it is failing here:

COPY failed: stat /var/lib/docker/tmp/docker-builder786780420/atlantis: no such file or directory```

@lkysow
Copy link
Member

lkysow commented Mar 4, 2019

Oops, I meant runatlantis/atlantis:latest. Even though it says v0.4.15, it's on the latest code.

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

No branches or pull requests

3 participants