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

Compilation of KFP fails if no .kube/config present #3859

Closed
apryiomka opened this issue May 27, 2020 · 3 comments · Fixed by #3874
Closed

Compilation of KFP fails if no .kube/config present #3859

apryiomka opened this issue May 27, 2020 · 3 comments · Fixed by #3874
Assignees

Comments

@apryiomka
Copy link

apryiomka commented May 27, 2020

What steps did you take:

run the following python with no kube/config

import kfp
from kfp import dsl
@dsl.pipeline(
    name='My first pipeline',
    description='A hello world pipeline.'
)
def hello_world_pipeline():
    echo_task = dsl.ContainerOp(
        name='echo',
        image='library/bash:4.4.23',
        command=['sh', '-c'],
        arguments=['echo "hello world"']
    )
if __name__ == '__main__':
    kfp.compiler.Compiler().compile(hello_world_pipeline, __file__ + '.yaml')

What happened:

Got an error in argo validation step:

Traceback (most recent call last):
File "pipeline.py", line 19, in
kfp.compiler.Compiler().compile(hello_world_pipeline, file + '.yaml')
File "/usr/local/lib/python3.6/site-packages/kfp/compiler/compiler.py", line 885, in compile
package_path=package_path)
File "/usr/local/lib/python3.6/site-packages/kfp/compiler/compiler.py", line 943, in _create_and_write_workflow
_validate_workflow(workflow)
File "/usr/local/lib/python3.6/site-packages/kfp/compiler/compiler.py", line 970, in _validate_workflow
Error: {}'''.format(result.stderr.decode('utf-8'))
RuntimeError: Internal compiler error: Compiler has produced Argo-incompatible workflow.
Please create a new issue at https://github.com/kubeflow/pipelines/issues attaching the pipeline code and the pipeline package.
Error: time="2020-05-27T19:45:16Z" level=fatal msg="invalid configuration: no configuration has been provided"

What did you expect to happen:

Compilation succeeds without errors. Compiling pipeline should not fail unless we try to upload it.

Environment:

Debian Linux

KFP version: v0.2.5

KFP SDK version: v0.2.5

Anything else you would like to add:

Adding .kube/config seems to mitigate the error, but having kube/config should not be required to compile the KFP.

/kind bug

@Ark-kun
Copy link
Contributor

Ark-kun commented May 27, 2020

The reason you get this error is that you have an argo program in your path. But your version of the the argo program cannot run in your environment (no .kube/config). It's a known issue in Argo: argoproj/argo-workflows#2793

You can either:

  • remove argo program
  • downgrade argo program to v2.4.3 which can run in your environments

Is there a reason you have a non-working Argo CLI installed in PATH?

@Mistobaan
Copy link

it should still not fail miserably like that. The code should test that assumption of a working argo command and fail in case that requirement is not met.

@Bobgy
Copy link
Contributor

Bobgy commented May 29, 2020

Yes, that sounds reasonable to me. Maybe we should just let the sdk check argo client version and report a warning message instead?

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

Successfully merging a pull request may close this issue.

5 participants