Files
ubicloud/spec/prog/base_spec.rb
Enes Cakir 20a9896ba9 Increment destroying semaphore when hopped to destroy label
If the resource is already being destroyed, we don't want to hop to the
`destroy` label again when the `destroy` semaphore is incremented.

We check the current label to avoid hopping again. Sometimes we forget
to update the list of labels to check when we add new labels after a
destroy.

Instead of checking the labels separately, we can increase another
semaphore, like `destroying`, along with the `destroy` semaphore and
keep it incremented until the resource is destroyed.

We incremented destroying semaphore autmatically when `hop_destroy`
called. So if the operator calls it via pry, it will be incremented too.
2025-02-08 17:10:11 +03:00

13 KiB