kubeflow / pipelines

Machine Learning Pipelines for Kubeflow
https://www.kubeflow.org/docs/components/pipelines/
Apache License 2.0
3.55k stars 1.6k forks source link

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

Closed afrozsh19 closed 1 week ago

afrozsh19 commented 3 months ago

Environment

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.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 week ago

This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.