Uh oh!
There was an error while loading. Please reload this page.
Add confirm mechanism when delete or update action - #372
Conversation
ba7141a to
62cab2fCompare
csantanapr
left a comment
There was a problem hiding this comment.
I disagree with this change as would force a current user to always use this new flag when deleting entity.
One example of a more popular CLI is Kubernetes and it doesn’t require a flag to delete
https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#delete
Top level program calling CLI can do this check
You can extend/fork the code and create your own customized of the CLI (IBM already does with ibm wsk ...)
rabbah
commented
Sep 20, 2018
What about adding a |
this appears to be a breaking change as it is currently implemented. if so, i'm not in favor of this change as implemented. one possible implementation is to use an env variable, say WSK_CLI_SAFE_MODE or WSK_CLI_ACTION_MGMT_SAFE_MODE or..., that when set will cause the cli to always prompt for confirmation of action deletes/updates. when env is not present, the current behavior remains. no need for additional command line flag. |
rabbah
commented
Sep 20, 2018
I like the suggestions. Could also store it in whisk properties. |
yep I like the using environment variable. |
@csantanapr , thanks for your reply. |
mdeuser
commented
Sep 21, 2018
|
@mdeuser so you mean |
62cab2f to
8294483Comparerabbah
commented
Sep 25, 2018
A property saved in wskprops would address the environment issue since switching files will then configure the cli as desired. We have no precedent for an env file that changes the cli behavior outside of WSK_CONFIG_FILE so a stand-alone property to me for this behavior seems like the wrong direction. |
8294483 to
247866eCompare@rabbah ,already modified. The patch implement the protect feature at CLI layer. How about add the protect mechanism at the backed server layer also? But i am afraid that if added in backed server layer, may lead to client side do huge breakpoint. |
rabbah
commented
Sep 26, 2018
On the backend I think the model is finer grained entitlement than we have today, with unix style permissions. |
| apihostSet string | ||
| apiversionSet string | ||
| namespaceSet string | ||
| promptOnChangeSet string |
There was a problem hiding this comment.
can this be a boolean flag? i.e. the present of --confirm (typical practice in other clis use --force) indicates the desire to override the confirmation.
rabbah
left a comment
There was a problem hiding this comment.
This will also need unit tests (go unit tests preferably).
dubee
commented
Sep 26, 2018
I think a prompt would be better than an additional flag. |
ningyougang
commented
Sep 27, 2018
@rabbah , so we have no need to add the protect mechanism for backend layer, right? |
f6017df to
b63643eComparerabbah
commented
Sep 27, 2018
If by prompt you mean something interactive which requires input on the console then this will make it very inconvenient to actually update a namespace when it is so intended. |
7a1a4c5 to
d84129fCompareAs more and more production system uses openwhisk, Users will need some feature to protect their action to be deleted or updated by mistake.
d84129f to
33b6054Compare@rabbah ,already added test cases. Regarding So one option is, add If we add |
ningyougang
commented
Oct 9, 2018
Please don't merge this patch |
I writed a issue here: #371
As more and more production system uses openwhisk,
Users will need some feature to protect their action to be
deleted or updated by mistake.