runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.68k stars 1.05k forks source link

Atlantis produce Locks based on unrelated Terraform conditions #1836

Open fblgit opened 2 years ago

fblgit commented 2 years ago

Community Note


Overview of the Issue

Atlantis produces locks based on values that are unrelated to terraform states such as repo/pr/workspace among other factors. That ultimately translates into multiple scenarios such as Atlantis AutoPlan discarding valid plans, caused by a rebase.

If we look at this from a common implementation of monorepo, which is used by other teams to self-service infrastructure resources, ultimately there are several factors taking place which difficult a good consumer experience out of it. Some of the situations faced at a larger scale:

Reproduction Steps

Simple, make a repo, set up Atlantis, make 2 PR, plan both of them (separate projects, so they don't get a chance to get blocked). Merge one and if you require (which is definitively positive) to have a consistently up-to-date diverged branch as a merge requirement, you will have to rebase and that will trigger a new auto plan, discard the previous, etc.

The main problem comes when this is repeated dozens of times per day, requiring a long time and multiple plans to successfully merge.

Logs

No logs are needed, as this details the existing behavior or Atlantis.

Environment details

Latest Atlantis 0.17.3

fblgit commented 2 years ago

I'm keen to work on a PR to solve this, but I would like to know if there are plans in scope related to this?

jamengual commented 2 years ago

no plans in scope

jamengual commented 2 years ago

is this still happening with v0.19.8?

nitrocode commented 1 year ago

I believe this is still an issue so i reopened for now. @fblgit are you still experiencing this?