argo-workflows icon indicating copy to clipboard operation
argo-workflows copied to clipboard

Add update flag in the create command

Open shuangkun opened this issue 11 months ago • 7 comments

Summary

Add update flag in the create command.

Use Cases

User want to use 1 command to create or update an resource(cron wf、workflow template、clusterworkflowtemplate).

edited by agilgur5: Source https://github.com/argoproj/argo-workflows/pull/12803#pullrequestreview-1945224384


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritize the proposals with the most 👍.

shuangkun avatar Mar 20 '24 11:03 shuangkun

Add update flag in the create command.

I don't think this should be done. create and update are two separate verbs in k8s and CRUD conventions more generically. We should not be re-inventing the wheel nor breaking existing conventions, which makes maintenance more difficult and UX more confusing.

Not to mention create --update is actually longer to type than update, so I do not see any benefit in this, only cons.

User want to use 1 command to create or update an resource

It sounds like you might be looking for apply, for example kubectl apply, which is a third, separate command

agilgur5 avatar Mar 20 '24 17:03 agilgur5

I believe that supporting version control for workflows and templates is crucial, rather than directly updating existing objects, which can be a risky operation.

jswxstw avatar Mar 21 '24 02:03 jswxstw

I believe that supporting version control for workflows and templates is crucial, rather than directly updating existing objects, which can be a risky operation.

The update action should still have many uses. If think the risk is high, can not use this API. Version control may be a more advanced use and requires more design.

shuangkun avatar Mar 21 '24 02:03 shuangkun

The update action should still have many uses.

Completely agree. In fact, we have implemented our own logic for updating workflows based on the Kubernetes client to enable intervention operations such as step skipping and parameter updates.

jswxstw avatar Mar 21 '24 02:03 jswxstw

This issue has been automatically marked as stale because it has not had recent activity and needs more information. It will be closed if no further activity occurs.

github-actions[bot] avatar Apr 07 '24 02:04 github-actions[bot]

As I wrote above and elsewhere, I can agree to an apply command, but create --update seems like a confusing anti-pattern to me

agilgur5 avatar Apr 14 '24 16:04 agilgur5

This issue has been automatically marked as stale because it has not had recent activity and needs more information. It will be closed if no further activity occurs.

github-actions[bot] avatar May 06 '24 02:05 github-actions[bot]

This issue has been closed due to inactivity and lack of information. If you still encounter this issue, please add the requested information and re-open.

github-actions[bot] avatar May 20 '24 02:05 github-actions[bot]