-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Environment
- KFP version: 2.4.1
- KFP SDK version: master / sdk-2.12.1
Steps to reproduce
create a pipeline:
kfp pipeline create --pipeline-name test test.yaml
try to upload a new version of the pipeline
kfp pipeline create-version --pipeline-name test --pipeline-version v2 test.yaml
throws error: Either pipeline_id or pipeline_name is required.
if using the pipeline id instead it works as expected:
kfp pipeline create-version --pipeline-id ... --pipeline-version v2 test.yaml
Expected result
new pipeline version should be able to upload when providing --pipeline-name
instead of --pipeline-id
Materials and Reference
when setting the --pipeline-name
option it will trigger the branch in
pipelines/sdk/python/kfp/cli/pipeline.py
Line 104 in a680e22
if pipeline_name is not None: |
the pipeline_name
variable is however not unset and passed alongside the pipeline_id
to upload_pipeline_version
in
pipelines/sdk/python/kfp/cli/pipeline.py
Line 113 in a680e22
pipeline_name=pipeline_name, |
however
pipelines/sdk/python/kfp/client/client.py
Line 1504 in 5a3dc84
if all([pipeline_id, pipeline_name |
if all([pipeline_id, pipeline_name
]) or not any([pipeline_id, pipeline_name]):
raise ValueError('Either pipeline_id or pipeline_name is required.')
and thus erroneously causing the Either pipeline_id or pipeline_name is required.
error.
if only the --pipeline-id
parameter is passed it works as expected.
happy to try and upstream a patch if pointed in the right direction :)
Impacted by this bug? Give it a 👍.