-
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
[Gitlab] - Empty changes list #3210
Comments
We hit this same exact issue, with our self hosted gitlab. The MR's come in with I see you can |
They opened a bug for what its worth: https://gitlab.com/gitlab-org/gitlab/-/issues/397698 |
@jseiser But it seems like they don't consider it a bug, but it's a breaking change. Since they don't consider this a bug I think some changes may need to be made on the Atlantis side to check until we have a change count that isn't none. |
Other older issue that the author linked to https://gitlab.com/gitlab-org/gitlab/-/issues/386562 Unsure what the easy solution is here unless we were to delay each gitlab call to the endpoint by 5 seconds... Which seems like a gross solution. Hopefully they fix the regression in 397698 before implementing the new endpoint referenced in 386562. |
Yeah I don't like the idea of a hard sleep, I was thinking that in the event that a change comes back with a Since |
Its pretty clear they broke their stuff during a minor version release, and are now creating MR's to reflect they did so in their docs. The current open issue to resolve this, hasn't even been assigned in 2 months. Talking to our PM, it doesnt appear that Gitlab is going to do anything to
Im not sure there is any other choice, but to query/back off/query until its not "" We are trying to get a Pull Request together done on this, we do have a Go Lang dev, but he has no concept/idea of atlantis so trying to get this moving. |
Community Note
Overview of the Issue
This is a self hosted Gitlab enterprise cluster on
15.9.2
I am seeing an initial empty
changes
response from Gitlab after the web-hook triggers the GetModifiedFiles function.The initial Query to the
/changes
endpoint seems to have the possibility of returning an empty list of changes once triggered after the initial web-hook. However If i add a quick sleep into this before we actually query the/changes
endpoint the data is returned correctly.To illustrate this point I have modified the Atlantis code and created a custom build that prints out the response body after the web-hook trigger event.
Please take note of the fact that
changes
is an empty slice andchanges_count
is actually an empty string.Now now the I sleep for 2 seconds and try the query again.
You can see that the API is returning different results for
changes_count
andchanges
. It's almost like cert parts of the change have not been fully flushed through the system before we make the initial query.This feels like a bug with the latest Gitlab patch. We have opened a ticket with Gitlab on this. When we get a response I will update this issue accordingly.
However I think it should also be possible to try and detect against situations like this. It appears that when a change request does not have any changes the
changes_count
field is actuallynull
instead of an empty string."changes_count": null,
Reproduction Steps
Logs
Environment details
Additional Context
The text was updated successfully, but these errors were encountered: