etcd
etcd copied to clipboard
add warning message when delete to release-3.5
Fixes https://github.com/etcd-io/etcd/issues/13705
Base PR: https://github.com/etcd-io/etcd/pull/13729 Change commit branch from main to release-3.5
/assign @ptabor
If I understand correctly, the only case we want to issue a warning is case that happens in line 72 of the original code:
opts = append(opts, clientv3.WithRange(args[1]))i.e. the flags like
--prefix',--from-keyor (to be added)--range` are not given...The code should IMHO print warning only iff:
- none of the flag is given
- the command has 2 arguments.
BTW: I would still recommend submiting a PR to main adding the
--rangeflag and warning .... and backport it to 3.5 later.
According to your advice. I sumbit this to release-3.5 and submit https://github.com/etcd-io/etcd/pull/13747 to main for 3.6 or later ?
Why the warning message in this PR is different from the message in 13747 ?
This is a kind of enhancement, so in my opinion it should NOT be backported to 3.5. However it's just a very minor change, I will not insist on this if other maintainers/reviewers approve this PR.
Why the warning message in this PR is different from the message in 13747 ?
This is a kind of enhancement, so in my opinion it should NOT be backported to 3.5. However it's just a very minor change, I will not insist on this if other maintainers/reviewers approve this PR.
Copy from https://github.com/etcd-io/etcd/issues/13705#issuecomment-1047168535 It‘s just a warning message.
In 3.5 we could add a warning on stderr.
In 3.6 we could add support for --range and sleep (2s) if the --range is not given:
a) let the operation be cancelled by human operator
b) trigger attention of the script owners to start using the new flag.
This PR adds Sleep(2sec) to 3.5, so has potential to break customer's workflows thus cannot be accepted.
I'm for submitting just warning+flag to 3.5, to let customer's prepare for 3.6, but the message needs to be adjusted.
The message has been adjusted to https://github.com/etcd-io/etcd/pull/13748#discussion_r817905830
This PR adds Sleep(2sec) to 3.5, so has potential to break customer's workflows thus cannot be accepted.
I'm for submitting just warning+flag to 3.5, to let customer's prepare for 3.6, but the message needs to be adjusted.
@ptabor was requesting to remove the sleep, and I agree with that. Please also remove "Will sleep in v3.5." from the message as well, or change it to "Will sleep for a while in v3.6"?. cc @spzala for the professional opinion for the English syntax.
Please sign off the commit.
git commit --signoff --amend
Looks good to me now, @ptabor Do you have any comments?
Just to be clearer, this PR is a partially backporting of https://github.com/etcd-io/etcd/pull/13747
This is a minor enhancement for the etcdctl del command. Usually we only backport bug fix, so we shouldn't backport this PR. But since it's just a minor enhancement and it's useful, so I will not object if other maintainers agree to backport it.
What's your opinion? @ptabor @spzala @serathius If there is no response, then I assume there is no interest on this PR for 3.5. Then we can close it.
Just to be clearer, this PR is a partially backporting of #13747
This is a minor enhancement for the
etcdctl delcommand. Usually we only backport bug fix, so we shouldn't backport this PR. But since it's just a minor enhancement and it's useful, so I will not object if other maintainers agree to backport it.What's your opinion? @ptabor @spzala @serathius If there is no response, then I assume there is no interest on this PR for 3.5. Then we can close it.
@ahrtr I agree with your thoughts here. I am okay with backporting. Thanks!
Thanks @kkkkun