etcd icon indicating copy to clipboard operation
etcd copied to clipboard

add warning message when delete to release-3.5

Open kkkkun opened this issue 3 years ago • 8 comments
trafficstars

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

kkkkun avatar Feb 28 '22 09:02 kkkkun

/assign @ptabor

kkkkun avatar Mar 01 '22 11:03 kkkkun

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 --range flag 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 ?

kkkkun avatar Mar 02 '22 03:03 kkkkun

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.

ahrtr avatar May 15 '22 11:05 ahrtr

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.

kkkkun avatar May 17 '22 02:05 kkkkun

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

kkkkun avatar Jun 13 '22 09:06 kkkkun

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.

ahrtr avatar Jun 23 '22 22:06 ahrtr

Please sign off the commit.

git commit --signoff --amend

ahrtr avatar Jul 09 '22 04:07 ahrtr

Looks good to me now, @ptabor Do you have any comments?

ahrtr avatar Jul 10 '22 04:07 ahrtr

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.

ahrtr avatar Oct 09 '22 06:10 ahrtr

Just to be clearer, this PR is a partially backporting of #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.

@ahrtr I agree with your thoughts here. I am okay with backporting. Thanks!

spzala avatar Oct 23 '22 02:10 spzala

Thanks @kkkkun

ahrtr avatar Nov 05 '22 08:11 ahrtr