Open lattwood opened 1 year ago
@lattwood what i don't fully understand is why does automerge require all plans to succeed? If a single plan fails, it will show one of the plans as failed and if a subsequent apply is performed, it ahould fail to apply because of the plans had failed...
@lattwood please try to change the logic in your fork and try your new version. See if it doesn't return any mixed results. The new fork works fairly well. If you fork and then add updates to main
, an action will run to upload your own dev
tag image to your ghcr container repository.
I see it referenced here.
This was requested by users
because when automerge is enabled, they want to enforce that a pull
request's changes have been fully applied. They asked that plans not be
allowed to be applied "piecemeal" and instead, all plans must be
generated successfully prior to allowing any plans to be applied.
Personally I'd say this is not a great solution. I agree that having 1/30 plans or so fail due to network gnomes and having to do it all over again isn't very pleasing. I think Atlantis already tracks failed plans in its state (even if just for VCS status purposes) so the automerge logic could either
atlantis apply
atlantis apply -p/-d
is also desired) use something similar that the VCS status summaries do to track failed plans and forbid automerge if their count is nonzeroI am facing the exact same issue that @lattwood is having, wondering if its intended by design? @nitrocode
@WJay-tec
I am facing the exact same issue that @lattwood is having, wondering if its intended by design? @nitrocode
Same issue. Is it possible to maybe not discard the plan for individual projects ?
Looks like we have exactly the same problem ;-/ Especially when you have 3 modules in one PR with dependencies for example : you have to create GCP storage to be able to add permissions to GCP storage .. always 1x plan will failed in PR as storage have to be created before permissions which is obvious
Thanks @lattwood for pointing me in the right direction. I created a PR for this.
Community Note
Overview of the Issue
Having automerge enabled causes Atlantis to delete all plans in a batch if even a single plan fails.
They shouldn't be deleted, because a user can retry just the failed plans.
Currently, you have to re-plan specifically the ones that succeeded originally, and then retry the failed ones.
Additional Context
https://github.com/runatlantis/atlantis/blob/7ca6b01aac6269478cbb3b50dc83e0ed8ba08a1d/server/events/plan_command_runner.go#L135-L139