Open mrwacky42 opened 1 year ago
@mrwacky42 if you have time, could you check previous versions and see which one was the last one that worked as expected? This will help identify the release that contained the issue
projects are to be planned based on their when_modified config
According to the history of this file, the following prs were merged recently (in order of most recent)
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month.'
Community Note
Overview of the Issue
We just updated from 0.19.3 to 0.23.5, and a PR that changed two projects tried to make a plan for both, when the configuration indicates only one should autoplan.
Reproduction Steps
Open a PR with this config and changes to both directories, and see 2 plans instead of 1. (Except the project that should not plan is failing, which is why it is disabled.) Here's a config. For `$REASONS`, the `no-plan` project is disabled but present in our `atlantis.yaml`: ```yaml - name: no-plan autoplan: enabled: false dir: no/plan/dir workflow: workflow workspace: default apply_requirements: - approved - mergeable - name: plan-me-please autoplan: when_modified: - '**/*' - '!.terraform.lock.hcl' - '!**/*.md' dir: plan/me/please workflow: workflow workspace: prod apply_requirements: - mergeable ``` ### Logs The logs indicate the `when_modified` is the reason why both were planned: ``` {"level":"info","ts":"2023-05-02T16:03:27.205Z","caller":"events/project_command_builder.go:365","msg":"2 projects are to be planned based on their when_modified config","json":{"repo":"redacted","pull":"12835"}} ```Environment details
atlantis server --atlantis-url=https://REDACTED --gh-user=REDACTED --gh-org= --repo-whitelist=github.com/REDACTED/* --repo-config=/home/atlantis/repos.yaml --config=/home/atlantis/config.yaml --default-tf-version=1.3.6 --hide-prev-plan-comments --allow-fork-prs --checkout-strategy=merge --log-level=info --enable-regexp-cmd --enable-diff-markdown-format
Atlantis server-side config files:
config.yaml
:(relevant parts of)
repos.yaml
:Repo
atlantis.yaml
file: see aboveAdditional Context
None