You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is pipeline with PIPELINE_NAME in NAMESPACE, then result2 returns pipeline_id.
But now pipeline_id can be obtained only from result1.
Problems root and the proposed solution
Under the hood both methods use the same pipelines api method but only list_pipelines forwards namespace arg.
The solution is to add **kwargs to get_pipeline_id method definition and forward it to pipeline api method call:
Environment
2.2.0
2.11.0
kfp 2.11.0
kfp-kubernetes 1.4.0
kfp-pipeline-spec 0.6.0
kfp-server-api 2.3.0
Steps to reproduce
client = kfp.Client(host=KUBEFLOW_PIPELINES_ENDPOINT, cookies=auth_session["session_cookie"], ssl_ca_cert=CERT_PATH, namespace=NAMESPACE)
pipeline_filter = json.dumps({
'predicates': [{
'operation': 'EQUALS',
'key': 'display_name',
'stringValue': PIPELINE_NAME,
}]
})
result1 = client.list_pipelines(namespace=NAMESPACE, filter=pipeline_filter)
result2 = client.get_pipeline_id(PIPELINE_NAME)
Expected result
If there is pipeline with PIPELINE_NAME in NAMESPACE, then result2 returns pipeline_id.
But now pipeline_id can be obtained only from result1.
Problems root and the proposed solution
Under the hood both methods use the same pipelines api method but only list_pipelines forwards namespace arg.
The solution is to add **kwargs to get_pipeline_id method definition and forward it to pipeline api method call:
Then we will be able pass namespace parameter if necessary and obtain correct result.
Materials and Reference
https://kubeflow-pipelines.readthedocs.io/en/sdk-2.11.0/_modules/kfp/client/client.html#Client.get_pipeline_id
https://kubeflow-pipelines.readthedocs.io/en/sdk-2.11.0/_modules/kfp/client/client.html#Client.list_pipelines
Impacted by this bug? Give it a 👍.
The text was updated successfully, but these errors were encountered: