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

undiverged not working for plan or apply #3254

Closed
nwsparks opened this issue Mar 21, 2023 · 3 comments · Fixed by #3832
Closed

undiverged not working for plan or apply #3254

nwsparks opened this issue Mar 21, 2023 · 3 comments · Fixed by #3832
Labels
bug Something isn't working

Comments

@nwsparks
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

setting undiverged in plan and/or apply requirements does not work. pull requests that are behind master are allowed to be planned and applied while out of date.

Reproduction Steps

Open a PR. Push new changes on master to cause the PR to be out of date. Run plans and applies.

Logs

logs-insights-results.csv

Environment details

  • Atlantis version: tested plan/apply on 0.23.2 and 0.23.3. tested apply only on 0.22.3
  • Deployment method: ecs fargate

Atlantis server-side config file:

atlantis-url: redacted
automerge: true
disable-autoplan: true
hide-prev-plan-comments: true
log-level: debug
repo-allowlist: redacted
gh-hostname: redacted
enable-diff-markdown-format: true

enable-regexp-cmd: true

# reduce noise by not posting comments for environments with no changes
hide-unchanged-plan-comments: true

gh-team-allowlist: redacted

# https://www.runatlantis.io/docs/checkout-strategy.html
checkout-strategy: merge

Repo atlantis.yaml file:

repos:

# this is safe due to the 'repo-allowlist' setting in server.yaml
- id: /.*/
  # https://www.runatlantis.io/docs/server-side-repo-config.html#requiring-pr-is-approved-before-an-applicable-subcommand
  # https://www.runatlantis.io/docs/command-requirements.html
  apply_requirements:  [approved, mergeable, undiverged]
  import_requirements: [approved, mergeable, undiverged]
  plan_requirements:   [undiverged]

  allow_custom_workflows: false

- id: redacted/noah-tf-test

  apply_requirements:  [approved, mergeable, undiverged]
  import_requirements: [approved, mergeable, undiverged]
  plan_requirements:   [undiverged]

  allow_custom_workflows: false


workflows:
  compliance:
    plan:
      steps:
      - init
      - plan
      - run: terraform show -json $PLANFILE > $PLANFILE.json
      - run: terraform-compliance --silent -p $PLANFILE.json -f ../../terraform-compliance/features/ | egrep -v 'WARNING \(mounting.+is ambigious'
      - run: tmpreaper 1h /tmp

metrics:
  prometheus:
    endpoint: /metrics

Additional Context

I've tried just about everything under the sun to get it to work, multiple atlantis versions, parallel on/off, verified that all other settings are taking affect, tried setting undiverged as the only req, played with placing the reqs in different locations, etc.

@nwsparks nwsparks added the bug Something isn't working label Mar 21, 2023
@nitrocode
Copy link
Member

Seems like a bug. Please see if an older version works for this. Perhaps it's a regression?

@nwsparks
Copy link
Author

I went back to 0.19.9 and was still able to run apply on an out of date branch.

@nwsparks
Copy link
Author

tried 18.5 but it stopped posting to github and had various errors in the logs

image

i did see this message but unclear if it is related to undiverged

image

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

Successfully merging a pull request may close this issue.

2 participants