atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

fix: Add retry on locks

Open Fabianoshz opened this issue 4 months ago • 1 comments

what

I'm opening this as a draft to receive feedback early, I don't expect this to break anything but I believe it could be hidden behind a flag and with better default values for timeout and retries (maybe exponential retry?).

This adds a retry logic to the lock mechanism to mitigate the issue described in here and also in this ADR.

The locking issue itself is more complex and requires much more work, this is just a small step so users don't have to see the error anymore effectively making the code wait instead of asking the user to retry.

why

Currently the user has to rerun any operations that fail because a certain workspace path is locked, this tries just to automate the process.

tests

Will add if this approach receive support.

references

Did my best to try to understand which issues this would affect.

Relates to https://github.com/runatlantis/atlantis/pull/3345 Relates to https://github.com/runatlantis/atlantis/pull/2921 Relates to https://github.com/runatlantis/atlantis/pull/2882

Relates to https://github.com/runatlantis/atlantis/issues/4489 Relates to https://github.com/runatlantis/atlantis/issues/305 Relates to https://github.com/runatlantis/atlantis/issues/4829 Relates to https://github.com/runatlantis/atlantis/issues/1847 Relates to https://github.com/runatlantis/atlantis/issues/4566

Closes https://github.com/runatlantis/atlantis/issues/1618 Closes https://github.com/runatlantis/atlantis/issues/2200 Closes https://github.com/runatlantis/atlantis/issues/3785 Closes https://github.com/runatlantis/atlantis/issues/4489 Closes https://github.com/runatlantis/atlantis/issues/4368

Fabianoshz avatar Oct 11 '24 00:10 Fabianoshz