Skip to content

[sdk] kfp cli: cannot upload new version using --pipeline-name #11810

@chjdev

Description

@chjdev

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

if pipeline_name is not None:
and fetch the pipeline id.

the pipeline_name variable is however not unset and passed alongside the pipeline_id to upload_pipeline_version
in

pipeline_name=pipeline_name,

however

if all([pipeline_id, pipeline_name
enforces that not both values are set:

        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 👍.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions