<#3986 [FlyteCTL Feature] Require a user ACK or --...
# flyte-github
a
#3986 [FlyteCTL Feature] Require a user ACK or --force flag for update commands Issue created by andrewwdye Describe the feature/command for FlyteCTL For
update
commands like
flytectl update cluster-resource-attribute
it's really easy to inadvertently override existing values. For commands that are mutating/destructive where
update
acts as an insert or an upsert, we should require an interactive user ACK or
--force
flag to ensure these changes are explicit. For scope, see commands at https://github.com/flyteorg/flytectl/tree/master/cmd/update Note, this is a breaking change for non-interactive scripts. They would need to be updated to pass
--force
. Expected work 1. Identify subset of commands that act as insert or upsert and require an ACK 2. For each, query the current value, and if one exists, request positive confirmation of the change from the user 3. Add an optional
--force
flag to bypass the interactive confirmation in (2). This allows for usage of flytectl in scripts Provide a possible output or UX example
Copy code
> flytectl update cluster-resource-attribute --attrFile cra.yaml
Found existing cluster resource attribute for project 'flytesnacks', domain 'development'.
Are you sure you want to overwrite [y/N]?

y
Copy code
> flytectl update cluster-resource-attribute --attrFile cra.yaml --force
Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte