-
Notifications
You must be signed in to change notification settings - Fork 604
🐛 Add Version to ROSA Control Plane Status #5443
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
🐛 Add Version to ROSA Control Plane Status #5443
Conversation
Hi @PanSpagetka. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
9152b52
to
d2f0071
Compare
/ok-to-test |
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.
sounds good to me, just to confirm did you run an upgrade and see the version changed during upgrade ?
@serngawy Yep, version changed after update was completed. |
looks good, Not sure why the apidiff-main job fail , may it need rebase |
d2f0071
to
25e09e9
Compare
/test pull-cluster-api-provider-aws-test |
TestRosaMachinePoolReconcile rosamachinepool_controller_test.go:373 is failing due to not having version in rosacontrolplane->status |
25e09e9
to
686fb12
Compare
/lgtm |
686fb12
to
2ca7744
Compare
42a6d52
to
f8fb3dc
Compare
Status: rosacontrolplanev1.RosaControlPlaneStatus{ | ||
Ready: true, | ||
ID: "rosa-control-plane-1", | ||
// Version: "4.15.20", |
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.
remove commented code
// Add conditions, can't do this duirng creation | ||
cpPh, err := patch.NewHelper(rosaControlPlane, testEnv) | ||
g.Expect(err).ShouldNot(HaveOccurred()) | ||
rosaControlPlane.Status = rosacontrolplanev1.RosaControlPlaneStatus{ |
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.
Not sure, why patching the status ? we should check the status after Reconcile.
You may just patch the ID other fields should be expected after Reconcile
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.
We need to set conditions for Reconcile
to end without an error.
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.
okay, but version
and ready
should set during Reconcile
|
||
errGet2 := testEnv.Get(ctx, key, cp) | ||
g.Expect(errGet2).NotTo(HaveOccurred()) | ||
g.Expect(cp.Status.Version).To(Equal("4.15.20")) |
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 should be compared with the cp.spec.version
4989d61
to
383d22a
Compare
/test pull-cluster-api-provider-aws-apidiff-main |
383d22a
to
bb7fd96
Compare
|
||
errGet2 := testEnv.Get(ctx, key, cp) | ||
g.Expect(errGet2).NotTo(HaveOccurred()) | ||
g.Expect(cp.Status.Version).To(Equal("4.15.20")) |
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.
g.Expect(cp.Status.Version).To(Equal("4.15.20")) | |
g.Expect(cp.Status.Version).To(Equal(cp.Spec.Version)) |
@@ -94,6 +94,7 @@ type ROSAControlPlaneReconciler struct { | |||
Endpoints []scope.ServiceEndpoint | |||
NewStsClient func(cloud.ScopeUsage, cloud.Session, logger.Wrapper, runtime.Object) stsiface.STSAPI | |||
NewOCMClient func(ctx context.Context, rosaScope *scope.ROSAControlPlaneScope) (rosa.OCMClient, error) | |||
restClientConfig *restclient.Config |
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.
restClientConfig *restclient.Config | |
// Exposing the restClientConfig for integration test, No need to initialize | |
restClientConfig *restclient.Config |
bb7fd96
to
2927d42
Compare
/lgtm |
@damdo would you give this PR an approve |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: richardcase 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Based on the doc for CAPI control plane contract here the RosaControlPlane status must have version field present the current version.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Checklist:
Release note: