-
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
✨ clusterctl: Add move --to-directory and --from-directory flags #7005
✨ clusterctl: Add move --to-directory and --from-directory flags #7005
Conversation
Skipping CI for Draft Pull Request. |
@oscr: This issue is currently awaiting triage. If CAPI contributors determines this is a relevant issue, they will accept it by applying the The 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. |
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 doing a high level review since this is a draft PR.
We consider adding a note in the documentation about the deprecation.
12cf02c
to
dd1c76a
Compare
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.
Overall lgtm.
Deprecation should surface in https://main.cluster-api.sigs.k8s.io/developer/providers/v1.2-to-v1.3.html
dd1c76a
to
780af74
Compare
780af74
to
d8cfe70
Compare
d8cfe70
to
1d2c370
Compare
A general question: right now the flags are called |
+1 to using directory instead. We also use directory in the topology dry run cmd |
1d2c370
to
d496a18
Compare
82d35a2
to
7a18359
Compare
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
looking forward to lgtm as soon as lint error is fixed |
7a18359
to
c798ad1
Compare
c798ad1
to
37b7e73
Compare
37b7e73
to
c52c421
Compare
@@ -310,7 +310,7 @@ func Test_templateClient_GetFromURL(t *testing.T) { | |||
// redirect stdin | |||
saveStdin := os.Stdin | |||
defer func() { os.Stdin = saveStdin }() | |||
os.Stdin, err = os.Open(path) | |||
os.Stdin, err = os.Open(path) //nolint:gosec |
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.
I was surprised to see the gosec linter fail on this line since it wasn't changed in the pr. I nolint'ed it since it's a test anyway. But it's odd
These flags perform the same actions clusterctl backup and restore commands. Also adds deprecation warning to clusterctl backup and restore.
c52c421
to
44f9fd9
Compare
@oscr: 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 |
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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
@ykakarap @fabriziopandini I would like to thank you both for all the help and feedback with this pr. I am grateful for your help 🙏 |
What this PR does / why we need it:
Changes based on #6992
Adds deprecated warning to
clusterctl restore
andclusterctl backup
. ExampleAdds
clusterctl move
flags--to-folder
and--from-folder
. Example$ clusterctl move --to-folder --directory ~/temp/clusterctl-backup/ Performing backup... Discovering Cluster API objects Starting backup of Cluster API objects Clusters=1 Moving Cluster API objects ClusterClasses=1 Saving files to /home/oscar/temp/clusterctl-backup/
I also added they should mutually exclusive with each other.
Since
dry-run
exists for move but not for restore and backup I added logic to not perform any actions if it's set.Which issue(s) this PR fixes:
Fixes #6992