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: deduplicate the outputs YAML to JSON conversion error #14051

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

Conversation

chansuke
Copy link
Contributor

@chansuke chansuke commented Jan 5, 2025

Fixes #14050

Motivation

Deduplicate the output of YAML to JSON conversion error.

Modifications

Verification

Checked the output with:

make cli 
./dist/argo lint --offline --strict invalid.yaml 

And also with unit test.

Comment on lines 67 to 69
if opts.Offline {
return newOfflineClient(opts.OfflineFiles)
}
Copy link

@pakio pakio Jan 5, 2025

Choose a reason for hiding this comment

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

I don't think can just ignore --offline option, it will fail back to newArgoKubeClient and won't work without configuring the kubernetes.
Here's the error I've got running the command with your change, without any k8s/k8s-alternative configured.

$ ./dist/argo lint ./examples/*.yaml --offline
Error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variabl

@chansuke chansuke force-pushed the fix/duplicated-outputs branch 2 times, most recently from 40a46be to 6317b5e Compare January 6, 2025 21:49
@shuangkun
Copy link
Member

any updates

@yusuke-abe-coconala
Copy link

@shuangkun
I will work on this weekend, thank you

…ne mode

Signed-off-by: chansuke <moonset20@gmail.com>
@chansuke chansuke force-pushed the fix/duplicated-outputs branch from 6317b5e to 31a6815 Compare January 18, 2025 06:58
@chansuke chansuke marked this pull request as draft January 18, 2025 09:04
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.

argo lint outputs YAML to JSON conversion error twice when it's used with --offline option
4 participants