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

Bug: objects flagged by CurrentUIDFilter should be removed from the inventory #613

Closed
manfredlift opened this issue Jan 6, 2023 · 0 comments · Fixed by #614
Closed

Bug: objects flagged by CurrentUIDFilter should be removed from the inventory #613

manfredlift opened this issue Jan 6, 2023 · 0 comments · Fixed by #614

Comments

@manfredlift
Copy link
Contributor

manfredlift commented Jan 6, 2023

During pruning the code is filtering objects with CurrentUIDFilter:

// CurrentUIDFilter implements ValidationFilter interface to determine
// if an object should not be pruned (deleted) because it has recently
// been applied.

This must mean that the object has ended up being tracked in the inventory by more than one reference and the one that was flagged by the filter should be removed from the inventory. Otherwise, it gets stuck in the inventory indefinitely and during every invocation of prune it'll be logged as skipped.

A good example of this is Ingress kind existing in both groups extensions and networking.k8s.io in k8s 1.19 & 1.20. This means when you rename the apiGroup in your local yaml to the new recommended group, then the reference with the old group name gets permastuck in the inventory.

@manfredlift manfredlift changed the title Bug: objects filtered by CurrentUIDFilter should be removed from the inventory Bug: objects flagged by CurrentUIDFilter should be removed from the inventory Jan 6, 2023
manfredlift added a commit to manfredlift/cli-utils that referenced this issue Jan 16, 2023
manfredlift added a commit to manfredlift/cli-utils that referenced this issue Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant