pipelines icon indicating copy to clipboard operation
pipelines copied to clipboard

`get_pipeline_id` function returns `None` when called without namespace in Kubeflow Pipelines SDK 2.7.0

Open afrozsh19 opened this issue 8 months ago • 1 comments

Environment

  • KFP SDK version: 2.7.0

Summary:

The get_pipeline_id function in the Kubeflow Pipelines SDK 2.7.0 returns None on calling with a pipeline_name created as Private in a kubeflow-profile. Here is the scenario:

  1. Created a pipeline of type Private in a kubeflow profile (namespace).
  2. Created a Kubeflow pipeline client using a pre-generated authservice session cookie.
  3. Called the get_pipeline_id function, passing only the name of the pipeline.

Upon investigation, I found that when I modified the underlying code to pass a namespace to the list_pipelines function, it correctly returned the pipeline ID. This indicates that the get_pipeline_id function needs to accept a namespace parameter and pass it to the list_pipelines function.

Steps to reproduce

  1. Create a new pipeline of type Private in a kubeflow profile (namespace).
  2. Initialise a kubeflow pipeline client.
  3. Call the get_pipeline_id function with the pipeline name.
import kfp

session_cookie = "<pre generated session cookie>"
kubeflow_host = "<host-url for your kubeflow instance>"

kf_client = kfp.Client(
    host="<KUBEFLOW_HOST_URL>/pipeline",
    cookies=f"authservice_session={session_cookie}",
    namespace="<kubeflow profile name>"
    )

pipeline_id = kf_client.get_pipeline_id(pipeline_name='example pipeline name created as private to a kubeflow profile')
print(pipeline_id)

Expected result

The function should return the pipeline ID for the provided pipeline name.

Actual result

The function returns None, when trying to find pipeline_ids for the pipelines private in a kubeflow profile.

afrozsh19 avatar Jun 16 '24 17:06 afrozsh19