Fix capo scheduled cleanup logic

What does this MR do and why?

During my test on: !2053 (merged) I noticed that stack with the tag please-delay-cleanup lead to a bug in the cleanup.

see: https://gitlab.com/sylva-projects/sylva-core/-/jobs/6626622512#L44

capo scheduled pipeline is trying to delete stack tagged with please-delay-cleanup, this lead to multiple issue. This tag is not uniq so it can try to delete multiple stack. And the CAPO ressources are not tagged with this, so the stack is deleted but not the ressource linked to it.

This is due to a bug in our code, in the script we always assume that the capo tags is the first tag of the stack. But when we create the tags.txt file we are pushing all the tags of the stack and not only the first one.

Related reference(s)

#1165 (closed)

!2053 (merged)

Test coverage

Edited by Loic Nicolle

Merge request reports

Loading