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: Return error when YAML submission is invalid #7135

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

simster7
Copy link
Member

@simster7 simster7 commented Nov 2, 2021

When submitting a file with invalid YAML the CLI output is not helpful:

$ argo submit invalid.yaml
INFO[2021-11-02T12:25:12.398Z] No Workflow found in given files

This PR prints the relevant YAML parsing error

$ argo submit invalid.yaml
ERRO[2021-11-02T12:25:12.397Z] yaml file at index 0 is not valid: error converting YAML to JSON: yaml: line 12: did not find expected key
INFO[2021-11-02T12:25:12.398Z] No Workflow found in given files

Signed-off-by: Simon Behar simbeh7@gmail.com

Don't bother creating a PR until you've done this:

  • Run make pre-commit -B to fix codegen, lint, and commit message problems.

Create your PR as a draft.

  • Your PR needs to pass the required checks before it can be approved. If the check is not required (e.g. E2E tests) it
    does not need to pass.
  • Once required tests have passed, you can make it "Ready for review".
  • Say how how you tested your changes. If you changed the UI, attach screenshots.

Tips:

  • If changes were requested, and you've made them, then dismiss the review to get it looked at again.
  • Add you organization to USERS.md if you like.
  • You can ask for help!

Signed-off-by: Simon Behar <simbeh7@gmail.com>
@sarabala1979 sarabala1979 self-assigned this Nov 2, 2021
@simster7 simster7 enabled auto-merge (squash) November 2, 2021 18:06
@simster7 simster7 merged commit bd3be11 into argoproj:master Nov 3, 2021
@alexec alexec mentioned this pull request Nov 5, 2021
25 tasks
alexec pushed a commit that referenced this pull request Nov 17, 2021
Signed-off-by: Simon Behar <simbeh7@gmail.com>
@sarabala1979 sarabala1979 mentioned this pull request Dec 15, 2021
73 tasks
@sarabala1979 sarabala1979 mentioned this pull request Mar 1, 2022
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.

2 participants