Skip to content

Atlantis plans less projects than anticipated by modified files  #4858

@efthymiouantonis

Description

@efthymiouantonis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions