Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix delete of csr if assets cannot be downloaded #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

janiskemper
Copy link
Member

What this PR does / why we need it:
Fix delete of ClusterStackRelease object in case there is a problem with the release assets.

Currently, the reconcileDelete function requires assets to be downloaded properly. If this is not the case, then the object does not get deleted and is stuck forever.

This happens for example when a user specifies a version of a clusterstack that does not exist. Then a ClusterStackRelease object is created, but will never get deleted again, because the downloading of the release assets fails, as the release does not exist.

Now we have an additional check to remove the finalizer without any further logic in case there is an issue with the release assets.

Which issue(s) this PR fixes:
Fixes #72

TODOs:

  • squash commits
  • include documentation
  • add unit tests

Fix delete of ClusterStackRelease object in case that there is a problem
with the release assets.

Currently, the reconcileDelete function requires assets to be downloaded
properly. If this is not the case, then the object does not get deleted
and is stuck forever.

This happens for example when a user specifies a version of a
clusterstack that does not exist. Then a ClusterStackRelease object is
created, but will never get deleted again, because the downloading of
the release assets fails, as the release does not exist.

Now we have an additional check to remove the finalizer without any
further logic in case there is an issue with the release assets.

Signed-off-by: janiskemper <janis.kemper@syself.com>
@janiskemper
Copy link
Member Author

@kranurag7 can you plz test it in the following way:

  1. Apply a clusterstack and specify a non-existing version
  2. Verify that the clusterstackrelease for that version exists and show something like "release assets not downloaded" in the conditions
  3. Remove the version from the list of the clusterstack
  4. Check that the clusterstackrelease is getting deleted

Copy link
Contributor

@kranurag7 kranurag7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janiskemper this looks good to me, the test mentioned above works!!

@janiskemper janiskemper marked this pull request as ready for review February 20, 2024 15:55
@jschoone jschoone added the Container Issues or pull requests relevant for Team 2: Container Infra and Tooling label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Container Issues or pull requests relevant for Team 2: Container Infra and Tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClusterStackRelease is not getting deleted in case there are problems with release assets
3 participants