{{ message }}
Repository navigation
[Bug] Forward namespace to KFP create_experiment in multi-user mode - #10113
Open
moutazmuhammad wants to merge 9 commits into
Open
moutazmuhammad wants to merge 9 commits into
moutazmuhammad wants to merge 9 commits into
Conversation
…mode Fixes mlrun#9960. create_pipeline now threads an optional namespace query param through _create_pipeline and Pipelines.create_pipeline to kfp_client.create_experiment and client initialization, so KFP creates the experiment in the caller's profile namespace instead of defaulting to the wrong one.
Contributor
Contributor
|
Smoke Tests with the PR synced to |
Contributor
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📝 Description
When running MLRun in multi-user mode (with Kubeflow Pipelines + Dex/OIDC authentication), calling create_pipeline results in a 403 Forbidden error from KFP. This happens because the namespace parameter is never passed through to KFP's create_experiment() call, so KFP defaults to the kubeflow namespace where the user has no permissions.
Fixes #9960.
🛠️ Changes Made
server/py/services/api/api/endpoints/pipelines.py: added an optionalnamespacequery parameter to thecreate_pipelineendpoint and forwarded it to the internal_create_pipeline()helper.server/py/services/api/crud/pipelines.py:Pipelines.create_pipeline()now acceptsnamespaceand uses it both to initialize the KFP client (_initialize_kfp_client(namespace)) and when callingkfp_client.create_experiment(name=experiment_name, namespace=namespace), so the experiment is created in the caller's profile namespace instead of the default one.✅ Checklist
🧪 Testing
namespaceis correctly threaded end-to-end: endpoint →_create_pipeline→Pipelines.create_pipeline→_initialize_kfp_client(namespace)andkfp_client.create_experiment(namespace=namespace).ruff checkandruff format --checkpass on both changed files.project.run(workflow_path=...)from a Jupyter notebook in a user profile namespace returned 403 Forbidden from KFP; after the fix, the pipeline is created successfully in the user's profile namespace.🔗 References
🚨 Breaking Changes?
The
namespaceparameter is optional and defaults toNone, preserving existing behavior for single-user deployments.