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 plans less projects than anticipated by modified files #4858

Open
efthymiouantonis opened this issue Aug 20, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@efthymiouantonis
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

I believe that the GetModifiedFiles function in atlantis/server/events/vcs/azuredevops_client.go, is not returning all changes to the files. This is due to the pagination of the API being called from go-azuredevops/azuredevops/git.go.

See the reference to the API : https://learn.microsoft.com/en-us/rest/api/azure/devops/git/diffs/get?view=azure-devops-rest-5.1&tabs=HTTP

There is 2 parameters that should be used for pagination the $top and $skip. The $top default value is to return 100 elements. This results in getting less plans for projects than anticipated based on changes to files.

Reproduction Steps

To reproduce the issue, in an Azure DevOps git repository you need to create a large pull request involving touching more than 100 directories and files combined. Then get atlantis to plan, you should see less plans than what you expect based on the number of files modified.

Logs

"caller":"events/project_command_builder.go:338","msg":"100 files were modified in this pull request. Modified files:

Environment details

  • Atlantis version: 0.28.5

Additional Context

@efthymiouantonis efthymiouantonis added the bug Something isn't working label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant