runatlantis / atlantis

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

Auto unlock and plan next MR once locked MR is released #2707

Open syphernl opened 1 year ago

syphernl commented 1 year ago

Community Note


Describe the user story

We use Renovate to keep our dependencies up-to-date. As a result we frequently have multiple MR's opened at the same time. Atlantis starts the plan phase for the first opened MR but all subsequent MR's are commented on that the original MR is locked.

Once you have merged the initial MR you need to manually execute atlantis plan for all MR's. This is not practical as it requires manual intervention and costs time.

Describe the solution you'd like

Since Atlantis already knows when an MR is merged (it then automatically releases the plans and locks) it would be nice if it could automatically proceed with the next MR on its own. Once that one has been merged, proceed to the next one until there are none left.

Describe the drawbacks of your solution

I don't see any drawbacks in Atlantis doing (more or less) what now needs to be done manually.

Describe alternatives you've considered

Not using locks, but this is not a preferred method.

nitrocode commented 1 year ago

What if there were

Then

I think a subsequent autoplan would be difficult to configure but id like an auto unlock using the FIFO approach.

magmax commented 1 year ago

this would be a really nice improvement!

IMHO, autoplan contestants should be just those MR with no additional locks, and I'd vote to sort them, if possible, by:

My 2 cents.