Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add an example field to argo archive list command. Fixes #11898 #12110

Closed
12 changes: 12 additions & 0 deletions cmd/argo/commands/archive/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ func NewListCommand() *cobra.Command {
command := &cobra.Command{
Use: "list",
Short: "list workflows in the archive",
Example: `# List all Archived Workflows:
argo archive list

# List Archived Workflows in YAML format:
argo archive list --output yaml

# List Archived Workflows with a specific chunk size:
argo archive list --chunk-size <chunk_size>
shubhamch71 marked this conversation as resolved.
Show resolved Hide resolved

# List Archived Workflows with the specified labels (used to filter archived workflows):
argo archive list -l key1=value1,key2=value2
shubhamch71 marked this conversation as resolved.
Show resolved Hide resolved
`,
Run: func(cmd *cobra.Command, args []string) {
ctx, apiClient := client.NewAPIClient(cmd.Context())
serviceClient, err := apiClient.NewArchivedWorkflowServiceClient()
Expand Down
16 changes: 16 additions & 0 deletions docs/cli/argo_archive_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ list workflows in the archive
argo archive list [flags]
```

### Examples

```
# List all Archived Workflows:
argo archive list

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codegen is erroring on the whitespace here because you have trailing whitespace in the code, but not in the generated docs.

Can you get make codegen to run on its own (i.e. without running make pre-commit)?
that will make things a lot simpler than trying to manually match up to what codegen expects

# List Archived Workflows in YAML format:
argo archive list --output yaml

# List Archived Workflows with a specific chunk size:
argo archive list --chunk-size <chunk_size>

# List Archived Workflows with the specified label (used to filter archived workflows):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't match the modified description (you changed it to label_s_, plural)

argo archive list -l key1=value1,key2=value2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
argo archive list -l key1=value1,key2=value2
argo archive list -l key1=value1,key2=value2

a new line at the end is generated

```

### Options

```
Expand Down
Loading