atlantis: [Bug] New --hide-prev-plan-comments flag fails on GitHub Enterprise
When enabling the new --hide-prev-plan-comments flag, Atlantis is unable to hide comments on GitHub Enterprise with the following error:
2020/04/27 12:31:09+0000 [EROR] command_runner.go:439 myorg/myrepo#91: Unable to hide old comments: minimize comment MDEyOklzc3VlQ29tbWVudDEyNDI3OQ==: non-200 OK status code: 406 Not Acceptable body: ""
Tested against GitHub Enterprise version 2.19, which, according to the documentation, supports the minimizeComment mutation as a preview. Looking at the code in PR #994, the Accept header seems to be set correctly as per the GH API preview requirement.
Unfortunately, --log-level debug doesn’t print out the raw HTTP request/response, so I’m not really able to inspect the request/response bodies or headers.
Atlantis version: v0.12.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 9
- Comments: 23 (15 by maintainers)
Commits related to this issue
- Remove custom Accept header for hide comment preview API This is not part of the main API. This is to help test https://github.com/runatlantis/atlantis/issues/1009 For some reason API calls come back... — committed to goodspark/atlantis by deleted user 7 years ago
- Fix GraphQL URL for Github Enterprise Fixes #1009 — committed to goodspark/atlantis by deleted user 6 years ago
- Fix GraphQL URL for Github Enterprise Fixes #1009 — committed to goodspark/atlantis by deleted user 6 years ago
- Fix GraphQL URL for Github Enterprise Fixes #1009 — committed to goodspark/atlantis by deleted user 6 years ago
- Fix GraphQL URL for Github Enterprise Fixes #1009 — committed to goodspark/atlantis by deleted user 6 years ago
- Fix GraphQL URL for Github Enterprise Partially addresses #1009, but doesn't fix it entirely. The 406 response is still a puzzler. — committed to goodspark/atlantis by deleted user 6 years ago
Runatlantis/Atlantis:latest should work. I’ll get a release out this week.
On Sun, Jul 12, 2020, 5:24 PM Matt Veitas notifications@github.com wrote:
I’ve finally updated to v0.15.0, big thanks to @goodspark for fixing this 😻
@lkysow Is there a possibility to cut a 0.14.1 release with the above fix so we can get this pushed to our production system?
Sure, but I can tell you what it is right now: https://github.com/runatlantis/atlantis/blob/master/server/events/vcs/github_client.go#L54-L69
Looks like that might be wrong. Can you tell me what you’re using for the Github Enterprise hostname in your Atlantis config?
I think based on the GE docs, the
graphqlURLshould really befmt.Sprintf("https://%s/api/graphql", hostname). The confusion was the public Github API endpoint doesn’t includeapiin the path and I wrote it against that initially. I can prep that fix but would like to see the config value you’re using regardless.I’ve pushed a change to https://github.com/goodspark/atlantis/tree/minimize-debug
Can you try making a Docker image from that fork+branch and trying it out?
It simply removes the custom Accept header for now.