-
Notifications
You must be signed in to change notification settings - Fork 280
🌱 pull [email protected] #1521
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
🌱 pull [email protected] #1521
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
d3d9c12
to
6f225d9
Compare
/assign |
@@ -20,13 +20,13 @@ packages: | |||
package_upgrade: true | |||
write_files: | |||
- path: /etc/sysctl.d/devstack.conf | |||
permissions: 0644 | |||
permissions: "0644" |
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 whether it's because latest cloud-init has this kind of restriction?
https://github.com/canonical/cloud-init/pull/1360/files#diff-c18cfd88ec0bd5f1077576fee00a0b2e87cf0b30aa547ad1eaacfd5742e4a757R1870
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.
It might be yes, I'm just wondering why we'd would hitting this only now since new version of cloud-init is released since 1 month (https://launchpad.net/ubuntu/focal/+source/cloud-init).
At least it makes it consistent with the rest of the codebase.
seems one additional test added here... so what's the big question? |
@jichenjc I'm not yet super comfortable with the codebase so it's more to ask extra attention on this commit during the review :) |
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.
/lgtm
I'd like to wait for @lentzi90's take on the test changes before approving, but hopefully this is good to go. Thanks!
@@ -177,7 +177,7 @@ func (r *OpenStackMachine) SetConditions(conditions clusterv1.Conditions) { | |||
// SetFailure sets the OpenStackMachine status failure reason and failure message. | |||
func (r *OpenStackMachine) SetFailure(failureReason errors.MachineStatusError, failureMessage error) { | |||
r.Status.FailureReason = &failureReason | |||
r.Status.FailureMessage = pointer.StringPtr(failureMessage.Error()) | |||
r.Status.FailureMessage = pointer.String(failureMessage.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.
Reviewer note:
pointer.StringPtr === pointer.String
StringPtr is deprecated
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.
Actually all the pointer.<Type>Ptr
have been renamed to pointer.<Type>
- I think it's to follow the non-redundancy pattern (https://google.github.io/styleguide/go/decisions#package-vs-exported-symbol-name)
@@ -590,7 +590,7 @@ func (r *OpenStackMachineReconciler) requeueOpenStackMachinesForUnpausedCluster( | |||
} | |||
|
|||
func (r *OpenStackMachineReconciler) requestsForCluster(ctx context.Context, log logr.Logger, namespace, name string) []ctrl.Request { | |||
labels := map[string]string{clusterv1.ClusterLabelName: name} | |||
labels := map[string]string{clusterv1.ClusterNameLabel: name} |
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.
Reviewer note:
Constant was renamed. Value remains the same.
@@ -137,7 +137,7 @@ func Test_machineToInstanceSpec(t *testing.T) { | |||
machine: func() *clusterv1.Machine { | |||
m := getDefaultMachine() | |||
m.Labels = map[string]string{ | |||
clusterv1.MachineControlPlaneLabelName: "true", | |||
clusterv1.MachineControlPlaneLabel: "true", |
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.
Reviewer note:
Constant was renamed. Value the same.
@@ -113,7 +113,7 @@ func dumpMachines(ctx context.Context, e2eCtx *E2EContext, namespace *corev1.Nam | |||
return | |||
} | |||
|
|||
machineNames := sets.NewString() | |||
machineNames := sets.New[string]() |
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.
Shiny!
var _ = Describe("When testing unhealthy machines remediation", func() { | ||
Describe("[mhc-remediations]", func() { |
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.
@lentzi90 This change passes my smell test: KCPFlavor
and MDFlavor
have been removed in favour of just Flavor
, but I'd appreciate if you could take a closer look.
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.
Thanks for bringing this to my attention!
It seems like they split the test into two actually. There is now the MachineDeploymentRemediationSpec
that we see here, but also KCPRemediationSpec
as seen here.
@tormath1 could you please update to use the KCPRemediationSpec
here in place of the second MachineDeploymentRemediationSpec
? If it is in separate files or not does not matter to me but it would be nice to run both. 🙂
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.
Thanks for the extra check. The content of this commit is not enough then: 9d56439 ?
We test both KCPRemediationSpec
and MachineDeploymentRemediationSpec
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.
Umm I may be missing something, but I don't see KCPRemediationSpec
? I see two times MachineDeploymentRemediationSpec
with different flavors.
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.
Ah perfect thanks - I thought we were speaking about the flavor
name :)
6f225d9
to
bfcd6d4
Compare
/test pull-cluster-api-provider-openstack-e2e-full-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.
/lgtm
Can you squash the commits before removing the hold? /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mdbooth, tormath1 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 |
Ow the KCPRemediationSpec is a bit more involved. I didn't realize they changed so much. It is now a much more thorough test but it means we need some changes to make it work. Previously these remediation tests were almost the same, just one for the control plane and one for the MachineDeployment. But now the KCP test is also checking remediation of the very first node that fails to initialize. They have put some comments in the code for what is needed: https://github.com/kubernetes-sigs/cluster-api/blob/9ad6d519caed6755da688225172d8999be6c7015/test/e2e/kcp_remediations.go#L52-L77
Point 3 is the big one. It may be a bit too much to add in this PR. I would be fine with dropping the KCP test for now since it is basically a completely new test after the changes they made. I will anyway investigate if we can add it later when I have time. |
Signed-off-by: Mathieu Tortuyaux <[email protected]>
bfcd6d4
to
3822684
Compare
@mdbooth @lentzi90 thanks for your reviews!
Changes are available here: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/compare/bfcd6d46d5a60a82222b0a87d7c204f0ee64073b..38226846051a7b38e29a9ad4bfeb0539667b1e7a |
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.
/lgtm
/test pull-cluster-api-provider-openstack-e2e-full-test |
/unhold |
What this PR does / why we need it:
This PR pulls [email protected] (including 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6 and 1.4.0) - this follow a mention from the office hours
Special notes for your reviewer:
test/e2e/suites: update remediation flavor
sigs.k8s.io/cluster-api/api/v1alpha{3,4}
are deprecated - we currently ignore the warning before agreeing on what to doTODOs:
/hold