Slackbot
10/11/2023, 1:00 AMDylan Page
10/11/2023, 1:02 AMAmina
10/11/2023, 1:13 AMatlantis-production.yaml
- --silence-vcs-status-no-plans
- --silence-no-projects
- --executable-name=atlantis-prod
- --vcs-status-name=atlantis
atlantis-nonprod uses atlantis-nonprod.yaml
- --silence-vcs-status-no-plans
- --silence-no-projects
In the following scenario:
1. We open a PR for a project defined in the atlantis-production.yaml file
2. Autoplan runs and atlantis-prod comments with plan as expected
3. If we run atlantis plan to test that the other server won’t interact
a. Actual Behavior
i. we get the emoji reaction from atlantis-nonprod
ii. We get no comments from atlantis-nonprod
iii. We get a successful status check atlantis/plan 0/0 projects (there is already another plan that is successful from atlantis-prod)
b. Expected Behavior
i. we get the emoji reaction from atlantis-nonprod
ii. We get no comments from atlantis-nonprod
iii. We get no status check update from atlantis-nonprod
4. If we run atlantis apply to test that the other server won’t interact
a. Actual Behavior
i. we get the emoji reaction from atlantis-nonprod
ii. we get no comments from atlantis-nonprod
iii. We get a successful status check atlantis/apply which results in all checks passing on the PR and it becoming mergeable with unapplied changes
b. Expected Behavior
i. we get the emoji reaction from atlantis-nonprod
ii. We get no comments from atlantis-nonprod
iii. We get no status check update from atlantis-nonprod
We understood from the docs that silence-vcs-status-no-plans will prevent the other instance from updating vcs status. So when we found the silence-vcs-status-no-projects flag value is being checked in some of those code paths we went looking for it hoping it would resolve the issue we are seeing.Amina
10/11/2023, 1:14 AMDylan Page
10/11/2023, 3:40 AMsilence-vcs-status-no-projects. That is the behavior you are expecting when no projects are detected.Dylan Page
10/11/2023, 3:46 AMDylan Page
10/11/2023, 3:47 AMAmina
10/11/2023, 11:04 AMDylan Page
10/11/2023, 4:30 PMDylan Page
10/11/2023, 4:34 PMPePe Amengual
10/11/2023, 5:07 PMPePe Amengual
10/11/2023, 5:07 PMPePe Amengual
10/11/2023, 5:07 PMBrett Galkowski
10/11/2023, 5:18 PM<http://ctx.Log.Info|ctx.Log.Info>("determined there was no project to run plan in"), implying silenceVCSStatusNoProjects actually was set somehow in the code path aboveBrett Galkowski
10/11/2023, 5:19 PMDylan Page
10/11/2023, 5:28 PMDylan Page
10/11/2023, 5:28 PMBrett Galkowski
10/11/2023, 11:21 PMSilenceVCSStatusNoProjects should work fine passed in the same way as these two were in the config, correct?
--silence-vcs-status-no-plans
--silence-no-projectsBrett Galkowski
10/11/2023, 11:22 PMDylan Page
10/11/2023, 11:23 PMPePe Amengual
10/11/2023, 11:26 PMBrett Galkowski
10/12/2023, 12:08 AMsilence-vcs-status-no-projects cannot be set, which as Dylan said is meant to prevent exactly this from what I can seeAmina
10/12/2023, 12:34 AMautoplan is the behavior different for autoplan vs running atlantis plan ?Amina
10/12/2023, 12:41 AM// To add a new flag you must:
// 1. Add a const with the flag name (in alphabetic order).
// 2. Add a new field to server.UserConfig and set the mapstructure tag equal to the flag name.
// 3. Add your flag's description etc. to the stringFlags, intFlags, or boolFlags slices.
Looking at code it seems that the SilenceVCSStatusNoProjects is in UserConfig but not in cmd/server.go and not in the boolFlags slice.PePe Amengual
10/12/2023, 2:29 AMPePe Amengual
10/12/2023, 2:38 AMPePe Amengual
10/12/2023, 2:45 AMsilence-no-projects it should automatically set SilenceVCSStatusNoProjects to true to then update the status correctlyAmina
10/12/2023, 2:56 AMI think it was never added as a flag, if you set theI was looking for exactly that bit of code yesterday and couldn’t find it. Can you point me to it please?it should automatically set SilenceVCSStatusNoProjects to true to then update the status correctlysilence-no-projects
Amina
10/12/2023, 2:56 AMPePe Amengual
10/12/2023, 2:57 AMPePe Amengual
10/12/2023, 3:05 AMsetting VCS status to success with no projects found in the messages?Amina
10/12/2023, 3:19 AMdetermined there was no project to run plan in as the only log from this flow.PePe Amengual
10/12/2023, 3:45 AMPePe Amengual
10/12/2023, 3:47 AMif !(p.silenceVCSStatusNoPlans || p.silenceVCSStatusNoProjects) {Brett Galkowski
10/12/2023, 6:56 PM