-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
argo lint
fails with invalid configuration: no configuration has been provided
#2793
Comments
Can you please attach logs |
Can you also attach the output of |
There is no cluster. We run the Argo lint CLI program inside a hermetic Docker container. It has no access to anything. |
Try running the following inside some container (e.g. busybox)
|
OK. I can now repro this by doing:
Unfortunately, I'm not sure we can acceptably fix this. In v2.5.2 we introduced workflow templates. To lint a workflow that contains a template, we must read the template from the cluster, so we must have a connection to the cluster. This means a hermetically sealed container cannot lint workflows that contain templates. There are a couple of options open to you today: If you want to use workflow templates:
If do you not want to use them:
|
What if we make this connection lazy? This way the workflows that do not use external templates can still be linted. |
Just some thoughts about the design of external templates. |
The request happens pretty much as the CLI starts. This is pretty fundamental to the design of the API client - which is is why is it is probably impractical to fix. But I'm not sure this is what you need - you need a syntax check - I think we can add on |
This sounds great. Thank you. |
Cool. If you fancy helping - please take a look at the linked PR. |
* Upgraded Argo to v2.7.4 * Downgraded the Argo CLI version to 2.4.3 See argoproj/argo-workflows#2793 * Removed the argo cli arg that had been removed * Updated to Argo 2.7.5 * Added workflowtemplates and cronworkflows to the Role * Added the new Argo CRDs
I see the linked PR got shelved, but chiming in: An If the Argo team is still willing to accept the feature but isn't interested in building it themselves, I'd be happy to try extending the closed PR on my own! Have been looking for a way to contribute some code. |
See #3027 |
1 similar comment
See #3027 |
The YAML editor from the linked issue would be awesome, but I think there is still a use-case for |
@danxmoran would you like to take over this work? |
Sure! Do you think I should build off of your original (closed) PR, or should I start fresh? |
* Upgraded Argo to v2.7.4 * Downgraded the Argo CLI version to 2.4.3 See argoproj/argo-workflows#2793 * Removed the argo cli arg that had been removed * Updated to Argo 2.7.5 * Added workflowtemplates and cronworkflows to the Role * Added the new Argo CRDs
Seems like I'm still having same issue, via: curl -sLO https://github.com/argoproj/argo/releases/download/v2.12.2/argo-darwin-amd64.gz
chmod u+x argo2122
./argo2122 lint wf.yaml
>>>Workflow manifests validated I'll try and run a: --loglevel debug lint Via I'm getting this error (which is the same @Ark-kun was getting, but it could be a config problem on my end), I've checked thoroughly, and don't see any, but if I do find it - I'll be sure to post it. I get: >>>FATA[0000] invalid configuration: no configuration has been provided Odd, as it was working this morning. I might do a fresh install and see if this fixes the problem. Thanks |
There is now more detailed help for configuring the CLI, please check it out: |
Thank you @alexec! I really appreciate it. |
@alexec I got a bit lost in the discussion and the several linked issues. Is there a way to |
This is still a PROBLEM. Running an argo server is not acceptable for something that's supposed to be linting. It's not a unit test. It's not a dry run. It's not supposed to know if the parameters are passed in right. It's not supposed to know about other workflows and whether or not they exist. It just needs to lint it and make sure that no one did something like:
(real live example that I'm trying to stop from ever happening again) This is what everyone is asking for. Not a "would this work if I launched it now?" but "did I screw up my yaml on accident?" or "did I misinterpret the docs at some point?" |
I think it is reasonable to be able to lint offline. I think you need to implement some API. See linked PR? |
@alexec What PR are you referring to? There are several linked to this issue. Can you just confirm this: is there or is there not a way to lint offline, or some workaround to achieve that? |
You can lint offline, as long as you do not use template references. |
There are three PRs linked to this issue that contain POCs for improving/generalizing linting. It's not a priority for the core team right now (we're focused on v3.0) so it'd be awesome if someone could pick them up. |
How should the argo cli be used to lint offline @alexec the following example still fails:
with
related to: kubeflow/pipelines#4804 did you get it to work @StefanoFioravanzo? |
Linked to this issue is a PoC for "offline linting". Would anyone like to complete the work? |
Based upon your comment @alec in #2793 (comment)
I though this was already possible?
I will take a look on it. |
I did some further investigation My observed behavior of argo cli v2.12.10 is that:
For KFP's use-case, workflow specs will never use WorkflowTemplate, so it'd be good enough for us, as long as argo CLI can skip (or ignore error from) trying to load kubeconfig part. Do we need a separate offline command to achieve this goal? |
This is my understanding as well:
Can we expect all users to have a kubeconfig if they have |
Maybe not, data scientists who only use KFP python SDK might install |
After reading #2848, it seems most of the major changes are still necessary, so it's not a trivial change. A lot of code assumed access to server is possible. |
Is it possible to lint templates offline?
|
argo lint
fails with invalid configuration: no configuration has been provided
Repro steps:
Checklist:
What happened:
argo lint workflow.yaml
used to work in Argo v2.3.0, but it no longer works in Argo v.2.7.4What you expected to happen:
I expect
argo lint
to validate my workflowHow to reproduce it (as minimally and precisely as possible):
Download Argo CLI to some hermetic environment (e.g. Docker container under build). Try running
argo lint workflow.yaml
. Get error.Anything else we need to know?:
I think
argo lint
might be trying to create Kubernetes client even though it's not needed for linting.Environment:
Message from the maintainers:
If you are impacted by this bug please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered: