-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug] New --hide-prev-plan-comments flag fails on GitHub Enterprise #1009
Comments
@goodspark can you take a look? |
Not really. Because I don't have access to an account on Github Enterprise. That said, it looks like the minimize comment schema is now out of preview for github.com. But apparently still in preview for enterprise. So at the very least might want to add a temporary config to remove the preview schema accept header. |
@goodspark @lkysow If I'm provided a docker image I'd be happy to test against my GHEE (also would be nice to have some extra debug info with raw HTTP to really see what's going on) |
Looking at the v4 graphQL clients, it doesn't look like a way to log the requests is exposed. What I can do is try removing the custom accept header on the off chance that GE is doing something weird and/or the docs are out of date. |
This is not part of the main API. This is to help test runatlantis#1009 For some reason API calls come back with '406 Not Acceptable Body' on Github Enterprise, despite the GE stating the custom Accept headers are required. Maybe it's no longer required like on github.com and GH simply forgot to update the docs?
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. |
I'm running GHE 2.20.8 and I see a 422 in my atlantis log:
|
Was there any more information related to that error from your logs (before or after)? The input schema docs for both the public and enterprise versions are fairly simple. The code is currently only passing the In addition, while the classifier enum values for public and enterprise are different, the value that's being used ( So I'm not sure why we'd get back a response saying the body was unprocessable. Normally the raw response body is included in the error and log and could be helpful: https://github.com/Laisky/graphql/blob/laisky/graphql.go#L143-L146 |
@goodspark the rest of the log message is just the error page from GHE. https://gist.github.com/grimm26/05159d6d10d629f7c12907a0bc324b0e |
is there a way to get atlantis to log the URL it is posting to to try to hide that comment? |
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 |
Yep, that looks to be the issue. I have ATLANTIS_GH_HOSTNAME set to |
Partially addresses runatlantis#1009, but doesn't fix it entirely. The 406 response is still a puzzler.
Running v0.14.0 I still get the following:
What is strange is that I build Atlantis locally (mac os) and connected it via ngrok to our GHE and saw that the hiding of previous plans was working as expected. This leads me to believe it could be something based on the build arch that is causing this?? I hope to have some time in the next few days to build this for the linux arch with some additional debugging to see if the theory holds. |
@grimm26 thanks for the clarification. I missed that it got clobbered in another commit and fixed 3 days ago! |
Runatlantis/Atlantis:latest should work. I'll get a release out this week.
…On Sun, Jul 12, 2020, 5:24 PM Matt Veitas ***@***.***> wrote:
@grimm26 <https://github.com/grimm26> thanks for the clarification. I
missed that it got clobbered in another commit and fixed 3 days ago!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1009 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH4RPM7TMUJDAV7HB6OIVTR3JH3PANCNFSM4MR6PGDQ>
.
|
@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? |
I'm using |
That is this issue. The bug is fixed, but has not been released. I'm running |
Ah ok i thought this was exclusively for on prem installed github enterprise since a version was mentioned above whereas I'm using github.com enterprise saas. |
@nitrocode oh I missed that you said SaaS. I'm pretty sure it is the same URL pathing issue, though. |
Closed by #1072 |
I'm unfortunately still seeing this with github.com unless I'm doing something wrong. I've created #1161 for 0.15.0 to track it. |
I've finally updated to v0.15.0, big thanks to @goodspark for fixing this 😻 |
When enabling the new
--hide-prev-plan-comments
flag, Atlantis is unable to hide comments on GitHub Enterprise with the following error: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, theAccept
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
The text was updated successfully, but these errors were encountered: