atlantis
atlantis copied to clipboard
Giving up polling on empty merge request creation
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
Hello, i'm having a slight issue when creating a new empty merge request in Gitlab. Merge request creation will by default set changesCount to empty (""), and since Merge Request is empty, this value is unchanged. Hence failing at this block of code https://github.com/runatlantis/atlantis/blob/34c09b13b9ef42f84f880f92c01d2b18bc411ede/server/events/vcs/gitlab_client.go#L140-L155 and returning "giving up polling ...".
Maybe am i missing something in my setup ? If not, maybe this could fix that
if resp != nil {
if resp.StatusCode == 200 && mr.ChangesCount == "" {
break
}
g.logger.Debug("GET %s returned: %d", apiURL, resp.StatusCode)
}
Reproduction Steps
Just create a Merge Request that contains 0 changes in Gitlab
Environment details
If not already included, please provide the following:
- Atlantis version: v0.24.4
- Deployment method: tf module
- If not running the latest Atlantis version have you tried to reproduce this issue on the latest version: No i havent
- Atlantis flags:
Atlantis server-side config file:
Very basic server side config just to plan/apply
Repo atlantis.yaml file:
version: 3
projects:
- name: name-1
dir: terraform
workflow: project-1
autoplan:
when_modified: [ "*.tf*", "vars/project-1.tfvars", "vars/project-1.backend.tfvars"]
- name: name-2
dir: terraform
workflow: project-2
autoplan:
when_modified: [ "*.tf*", "vars/project-2.tfvars", "vars/project-2.backend.tfvars" ]