(bug) skip stale cluster entries during migration#480
Merged
gianlucam76 merged 1 commit intoJun 23, 2026
Conversation
When upgrading to v1.11.1, the migration init container reads deprecated ClusterInfo entries from each Classifier and updates the corresponding ClassifierReport objects. If a cluster was deleted before the upgrade, its namespace may no longer exist. Attempting to create a ClassifierReport in a missing namespace causes the init container to fail and crash-loop blocking the upgrade entirely. migrateOneClassifier now checks whether the cluster namespace still exists. Entries whose namespace is gone are logged at debug level and skipped. The deprecated ClusterInfo and MachingClusterStatuses arrays are still cleared at the end, so the migration does not need to be retried for that classifier. All other entries are migrated normally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When upgrading to v1.11.1, the migration init container reads deprecated ClusterInfo entries from each Classifier and updates the corresponding ClassifierReport objects. If a cluster was deleted before the upgrade, its namespace may no longer exist. Attempting to create a ClassifierReport in a missing namespace causes the init container to fail and crash-loop blocking the upgrade entirely.
migrateOneClassifier now checks whether the cluster namespace still exists. Entries whose namespace is gone are logged at debug level and skipped. The deprecated ClusterInfo and MachingClusterStatuses arrays are still cleared at the end, so the migration does not need to be retried for that classifier. All other entries are migrated normally.