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 1816624: MHC structural schema #536
BUG 1816624: MHC structural schema #536
Conversation
To generate CRDs with structural schema compliant properties we update sigs.k8s.io/controller-tools This indirectly requires to update pretty much all the k8s and openshift api machinery stack. k8s.io/api v0.18.0-rc.1 k8s.io/apimachinery v0.18.0-rc.1 k8s.io/client-go v0.18.0-rc.1 k8s.io/code-generator v0.18.0-rc.1 k8s.io/klog v1.0.0 k8s.io/kube-aggregator v0.18.0-rc.1 // indirect k8s.io/kubectl v0.18.0-rc.1 github.com/openshift/api v0.0.0-20200323095748-e7041f8762a3 github.com/openshift/client-go v0.0.0-20200320150128-a906f3d8e723 github.com/openshift/library-go v0.0.0-20200324092245-db2a8546af81
…support after adding kube 1.18 deps
@enxebre: This pull request references Bugzilla bug 1816624, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
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. |
@enxebre: This pull request references Bugzilla bug 1816624, which is valid. 3 validation(s) were run on this bug
In response to this:
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. |
/cc @JoelSpeed |
@enxebre: This pull request references Bugzilla bug 1816624, which is valid. 3 validation(s) were run on this bug
In response to this:
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. |
a407416
to
015378d
Compare
/retest |
/test images |
1 similar comment
/test images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good once the tests are passing, added a few questions as I was looking through
@@ -99,7 +99,6 @@ type MachineHealthCheckStatus struct { | |||
ExpectedMachines *int `json:"expectedMachines"` | |||
|
|||
// total number of machines counted by this machine health check | |||
// +kubebuilder:default=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not allowed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, API machinery complains. Note this never applied since defaulting requires a resource to be structural schema to work.
select { | ||
case recv := <-requests: | ||
if recv != tc.expectedRequest { | ||
t.Error("received request does not match expected request") | ||
} | ||
|
||
t.Logf("Last reconcile %v", <-requests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this channel guaranteed to receive another request? This seems like an odd thing to add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely odd, I couldn't really figure out where is the last request coming from :/. I'd suggest though we focus on following up to replace this completely with ginkgo like coverage (OCPCLOUD-816).
015378d
to
8f75434
Compare
This commit mostly ensures we set the API version in the expected objects otherwise equality.Semantic.DeepEqual fails to compare with what is coming from the fake client.
8f75434
to
e50e0e3
Compare
/test unit |
/lgtm I agree with your comments @enxebre, follow up for refactoring tests sounds good |
@enxebre: The following test failed, say
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. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoelSpeed 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 |
@enxebre: All pull requests linked via external trackers have merged. Bugzilla bug 1816624 has been moved to the MODIFIED state. In response to this:
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. |
} | ||
} | ||
if d != nil { | ||
generation = d.Status.ObservedGeneration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks broken, see #541
To generate CRDs with structural schema compliant properties we update sigs.k8s.io/controller-tools
As a consequence we need update pretty much all the k8s and openshift api machinery stack to kube 1.18. Controller-runtime points to kubernetes-sigs/controller-runtime#836.
This also force us to update to go 1.13. Needs openshift/release#7889
Also as a consequence of the kube 1.18 update we are forced to take the chance to finally drop the CVO lib deps in favour of openshift/library-go which uses the latest versions of the API machinery.
After regenerating the CRDs I manually added
preserveUnknownFields:false
for MHC.