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

[BACKPORT] Fix infinite resource updates due to canonical format conversion of resource requirements #2568

Conversation

Donnerbart
Copy link
Contributor

@Donnerbart Donnerbart commented Nov 6, 2024

Backport of #2565

I've cherry-picked the commits on the main branch. There were some merge conflicts in SSABasedGenericKubernetesResourceMatcher due to the different Java versions and a other differences in the class that I cleaned up in next. Also some tests from next are not yet in SSABasedGenericKubernetesResourceMatcherTest, which lead to a minimal merge conflict as well. So nothing unexpected or hard to resolve.

Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
… SSABasedGenericKubernetesResourceMatcher

Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
… of resource requirements

Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
…tizerTest

Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
@openshift-ci openshift-ci bot requested review from adam-sandor and csviri November 6, 2024 05:30
StatefulSet actualStatefulSet = (StatefulSet) actual;
int claims = desiredStatefulSet.getSpec().getVolumeClaimTemplates().size();
if (claims == actualStatefulSet.getSpec().getVolumeClaimTemplates().size()) {
if (actual instanceof StatefulSet) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to adapt this from if (desired instanceof StatefulSet desiredStatefulSet) to the good old cast style. This should be the main difference between the original fix and the backport.

Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
Copy link
Collaborator

@metacosm metacosm left a comment

Choose a reason for hiding this comment

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

Thank you!

@metacosm metacosm merged commit 71e00ed into operator-framework:main Nov 6, 2024
20 checks passed
@Donnerbart Donnerbart deleted the bugfix/2509-ssa-matcher-quantity/main branch November 6, 2024 08:20
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 this pull request may close these issues.

2 participants