-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 command and client for clusterctl alpha rollout restart
#3838
✨ Add command and client for clusterctl alpha rollout restart
#3838
Conversation
Hi @Arvinderpal. 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/test-infra repository. |
@fabriziopandini @wfernandes @vincepri I still need to do other things like unit tests and clean up, but you should be able to execute the restart command: |
clusterctl alpha rollout restart
clusterctl alpha rollout restart
1b33672
to
841edff
Compare
/ok-to-test |
841edff
to
9cd49db
Compare
9cd49db
to
f451f00
Compare
027e433
to
3b54548
Compare
@@ -65,6 +65,15 @@ type Client interface { | |||
// ProcessYAML provides a direct way to process a yaml and inspect its | |||
// variables. | |||
ProcessYAML(options ProcessYAMLOptions) (YamlPrinter, error) | |||
|
|||
// Interface for alpha features in clusterctl | |||
AlphaClient |
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.
@joelanford @alexeldeib Can you help me make sense of why this is flagged as an "incompatible change" with go-apidiff
? I also tried removing the embedded interface and just putting the func directly in Client interface, but similar issue.
*** Running go-apidiff ***
sigs.k8s.io/cluster-api/cmd/clusterctl/client
Incompatible changes:
- AlphaClient.RolloutRestart: added
Compatible changes:
- (*clusterctlClient).RolloutRestart: added
- AlphaClient: added
- RolloutRestartOptions: added
sigs.k8s.io/cluster-api/cmd/clusterctl/client/rollout
Compatible changes:
- ObjectRestarter: added
sigs.k8s.io/cluster-api/cmd/clusterctl/cmd/rollout
Compatible changes:
- NewCmdRolloutRestart: added
+ EXIT_VALUE=1
+ set +o xtrace
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.
The test is more advisory than required -- it's okay that it fails for PRs to be merged some times. The PR does make all of the changes mentioned, but they all seem reasonable to me (actually a bit surprised the first one is incompatible and the second one is compatible, would have expected those to be flipped since adding to an existing interface would require implementers to update their code).
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 okay. Unless others see any problems with what I'm doing, I'll just ignore this for now.
8d3157a
to
a6e0851
Compare
clusterctl alpha rollout restart
clusterctl alpha rollout restart
/assign @vincepri |
I can take another look at this sometime today. |
LGTM |
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.
Just one nit. We should also add some documentation for this command in the CAPI book. See https://github.com/kubernetes-sigs/cluster-api/blob/master/docs/book/src/clusterctl/overview.md and
https://github.com/kubernetes-sigs/cluster-api/blob/master/docs/book/src/clusterctl/commands/commands.md
e013039
to
3fdbc53
Compare
If you don't mind, can I update the docs in a followup PR? Also, I spoke with @fabriziopandini on slack. He didn't feel the need to review as long as you and @vincepri had done so. If the tests pass, I think we should go ahead and merge. |
/lgtm |
/test pull-cluster-api-test-main |
md1 := &clusterv1.MachineDeployment{ | ||
TypeMeta: metav1.TypeMeta{ | ||
Kind: "MachineDeployment", | ||
APIVersion: "cluster.x-k8s.io/v1alpha3", |
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.
From the test failures, you may need to update these to v1alpha4. However, I didn't think we needed the APIVersion specified, so I think you can remove this.
3fdbc53
to
73c047c
Compare
73c047c
to
9a39493
Compare
@Arvinderpal Ok..I was able to reproduce this failure by rebasing this branch with the main branch. I think the import in the rollout_test should be |
@Arvinderpal Yeah..I think that's it. We recently bumped to using v1alpha4 types everywhere instead of v1alpha3. Please change all the |
9a39493
to
e2c12b5
Compare
Thanks for pointing that out. Just made the change. 🤞 |
e2c12b5
to
970212f
Compare
@Arvinderpal: 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. |
/lgtm |
@vincepri should we merge this? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri 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 this PR does / why we need it:
Adds command and client for the
clusterctl alpha rollout restart
.Also implements
restart
sub-command for MachineDeployments.Fixes:
#3401
Related Issue:
#3439