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

🐛 KCP: fix problem in rollout detection logic when ClusterConfiguration is nil #3356

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
Fix a problem that arises when KCP does not have a clusterConfiguration set, because we do a comparison of a cached version of the clusterConfiguration stored in a Machine annotation with the current clusterConfiguration.
In this case the Machine has "null" as the value of the annotation, since the clusterConfiguration was nil. When this gets unmarshaled and compared with nil it returns false :-(

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 16, 2020
@k8s-ci-robot k8s-ci-robot requested review from JoelSpeed and ncdc July 16, 2020 15:42
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 16, 2020
@ncdc ncdc added this to the v0.3.8 milestone Jul 16, 2020
@fabriziopandini fabriziopandini force-pushed the fix-matchClusterConfiguration branch from 6d9699a to a75ad0e Compare July 17, 2020 09:32
@vincepri vincepri force-pushed the fix-matchClusterConfiguration branch from f879867 to bb05bd2 Compare July 20, 2020 14:33
@vincepri
Copy link
Member

@detiber PTAL

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 20, 2020
Comment on lines +277 to +280
if !ok {
// We don't have enough information to make a decision; don't' trigger a roll out.
return true
}
Copy link
Member

Choose a reason for hiding this comment

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

Flipped this to improve readability

@detiber
Copy link
Member

detiber commented Jul 20, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 20, 2020
@ncdc
Copy link
Contributor

ncdc commented Jul 20, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncdc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2020
@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-e2e bb05bd2 link /test pull-cluster-api-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot merged commit 545f589 into kubernetes-sigs:master Jul 20, 2020
@vincepri
Copy link
Member

/test pull-cluster-api-e2e

@fabriziopandini fabriziopandini deleted the fix-matchClusterConfiguration branch August 3, 2020 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KCP is scaling continuosly
6 participants