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

CLI : add sync policy option `manual` for app create command to make it similar to options provided in Web console

Open anandf opened this issue 11 months ago • 1 comments

Summary

In argocd app create command, currently the following --sync-policy options are supported - none/auto/automatic/automated. But in web console, there is no none option, and instead we just have a sync policy called manual. By having a sync policy option called manual in CLI, users can get a unified experience when using CLI/Web console. When specifying the option manual keep the behaviour same as specifying none to ensure backwards compatability.

With this change none/manual and auto/automatic/automated will become valid options for --sync-policy

When listing applications via CLI, currently we display the Sync Policy as <none> instead we can show this to Manual (we still display NONE in web console and that needs to be changed to Manual as well`)

Motivation

Give a unified experience for customers creating an argo application in Web Console (UI) and CLI.

Proposal

Changes required in cmd/util/app.go

  • in the switch case, match for none and manual similar to how it is done for auto/automatic/automated cmd/argocd/commands/app.go
  • in the summary creation, when there is no sync policy set, we are returning a string called <none>, instead we can return Manual.
  • correct the documentation where automated option is not mentioned.
  • include manual option in the documentation. ui/src/app/applications/components/application-summary/application-summary.tsx
  • fix the web console string NONE to Manual in the summary page. Same as what the user provided during the app create step.
Screenshot 2024-03-08 at 12 51 01 PM

anandf avatar Mar 08 '24 07:03 anandf

Great idea.

todaywasawesome avatar Mar 08 '24 20:03 todaywasawesome

Hello! I'd like to work on this issue.

anirudhsudhir avatar Mar 09 '24 14:03 anirudhsudhir

Hello! I'd like to work on this issue.

@anirudhsudhir go ahead you don't need someone to assign you for good first issues.

surajyadav1108 avatar Mar 09 '24 17:03 surajyadav1108

I've made the necessary changes. Please do review the PR.

anirudhsudhir avatar Mar 10 '24 14:03 anirudhsudhir

Thanks @anirudhsudhir for working on this. Appreciate your efforts and congrats on your contribution to ArgoCD.

anandf avatar Mar 12 '24 06:03 anandf

It was a wonderful experience working on this issue, thank you very much!

anirudhsudhir avatar Mar 12 '24 07:03 anirudhsudhir

Hello, it appears that this issue has already been merged, could it be closed?

Knickkennedy avatar Mar 24 '24 01:03 Knickkennedy

@anandf I am interested on contributing to this project. Is there an issue I can be assigned?

mgurrie avatar Apr 01 '24 19:04 mgurrie

Issue fixed by https://github.com/argoproj/argo-cd/pull/17459. Closing this issue.

anandf avatar Apr 03 '24 12:04 anandf