Open Richard-Payne opened 3 years ago
Oh, on a hunch, and because it was overdue anyway, we upgrade Devops to the latest 2020 version.
This improved things a little. Now, the Test button (during webhook setup) works. Atlantis ignores comments (due to not being a command comment) and errors during the PR create because the repo the test function uses doesn't exist. However, it is at least parsing and handling the incoming payloads.
However, when doing operations on an actual repo, the Atlantis server ignores the request again, returning 400.
My first thought was to setup wireshark and check the payloads to see what is different. However, Atlantis requires TLS when using Devops and I have no way to configure TLS decryption from the MS libraries.
Is there any way to make Atlantis output the json payload of the requests it receives? If not, how do I go about debugging this?
So I've managed to work around this by using an haproxy in front of Atlantis and inserting a Request-Id header with a uuid value.
Atlantis is now responding to the messages, and this has revealed a possible explanation for the discrepancy. It appears that Atlantis has been hard coded to expect a cloud hosted Azure Devops platform. We're running on-prem. Not sure the cloud version is producing additional headers.
Running into the exact same issue from our self hosted devops instance
Request id insertion worked for me too, thans @Richard-Payne
server {
listen 80;
listen [::]:80;
server_name localhost;
add_header Request-ID $request_id;
location / {
proxy_pass http://127.0.0.1:4141;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Request-ID $request_id;
}
}
I've setup an Atlantis server, got it configured with Github and tested. Now I'm trying to switch it to our Azure Devops server.
When configuring the Service Hook, using the Test function produces a 400 Bad Request error from Atlantis. The test event being sent is:
on the Atlantis docker logs:
The Devops version is 16.131.28226.3 if that matters.