pipelines
pipelines copied to clipboard
`get_pipeline_id` function returns `None` when called without namespace in Kubeflow Pipelines SDK 2.7.0
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:
- Created a pipeline of type
Private
in a kubeflow profile (namespace). - Created a Kubeflow pipeline client using a pre-generated authservice session cookie.
- 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
- Create a new pipeline of type
Private
in a kubeflow profile (namespace). - Initialise a kubeflow pipeline client.
- 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.