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

fix: don't print help. Fixes argoproj#14234 #14235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jumpe1
Copy link

@jumpe1 jumpe1 commented Feb 28, 2025

Fixes #14234

Motivation

The default behavior with Cobra is to print the help text for all errors, which can be tedious to scroll through.

Modifications

This changes the CLI to only print the help text for argument validation errors.
Here are the related PRs.
#13831

Verification

I reproduced the issue by applying the following manifest and intentionally causing a failure when accessing /apis/argoproj.io/v1alpha1/namespaces/{namespace}/workflowtaskresults.
I confirmed that the help log does not appear.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: deny-to-api-server
spec:
  podSelector: {}
  policyTypes:
    - Egress
  egress:
    - to:
        - ipBlock:
            cidr: 172.22.0.1/32
      ports:
        - protocol: TCP
          port: 6443

Documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.6.2 CLI: Do not print help output on submission error
1 participant