<#423 Require a user ACK or --force flag for updat...
# flyte-github
c
#423 Require a user ACK or --force flag for update commands #minor Pull request opened by kamaleybov TL;DR • Asks users for acknowledgement during updates. • Shows a diff of changes serialized as YAML. • An update request won't be sent if there are no changes detected. • Acknowledgement request can be overridden with a
--force
flag. Type ☐ Bug Fix ☑︎ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☑︎ Unit tests added ☑︎ Code documentation added ☑︎ Any pending items have an associated Issue Complete description Examples:
Copy code
> flytectl update project --id flytesnacks --name "what a great name" --archive
The following changes are to be applied.
--- before
+++ after
@@ -8,5 +8,6 @@
       name: production
 id: flytesnacks
 labels: {}
-name: woopidoo2
+name: what a great name
+state: 1


Continue? [y/n]: y
project flytesnacks updated
Copy code
> flytectl update project --id flytesnacks --description "hello apples" --activate --force
The following changes are to be applied.
--- before
+++ after
@@ -1,4 +1,4 @@
-description: bananas
+description: hello apples
 domains:
     - id: development
       name: development
@@ -9,5 +9,4 @@
 id: flytesnacks
 labels: {}
 name: what a great name
-state: 1


project flytesnacks updated
Copy code
> flytectl update task-resource-attribute --attrFile ~/t/task-resource-attributes.yaml
The following changes are to be applied.
--- before
+++ after
@@ -1,4 +1,8 @@
 TaskResourceAttributes:
-    limits:
+    defaults:
         cpu: "3"
+        memory: 150Mi
+    limits:
+        cpu: "2"
+        memory: 450Mi


Continue? [y/n]: n
Error: update aborted by user
Copy code
> flytectl update task-resource-attribute --attrFile ~/t/task-resource-attributes.yaml
No changes detected. Skipping the update.
Tracking Issue flyteorg/flyte#3986 Follow-up issue NA flyteorg/flytectl ✅ All checks have passed 2/2 successful checks
a