Add workspace database schema#18909
Conversation
|
FYI @B-Step62 |
B-Step62
left a comment
There was a problem hiding this comment.
@mprahl The change looks good to me. Can we point the PR to a feature branch here?
https://github.com/mlflow/mlflow/tree/orgnization-support
For context, we have high cadence of new version release (at least once a month) and they are often cut from master. While the initial implementation is more or less ready in your side, we still likely need multiple weeks until safely land the entire changes and test them throuhghly. We want to avoid including partial changes into release while it is not fully functional.
Drift between master and feature branch would be a bit annoying, but I believe it is not too bad if we sync them regularly.
|
@dbczumar @BenWilson2 Could you give another eyes at the PR? Thanks! |
|
Documentation preview for 1f0b624 is available at: More info
|
Thanks for the quick review! I just changed the base branch of the PR. |
This adds the required workspace columns and the workspace catalog table with the default workspace precreated. All workspace columns default to "default" for now and we may choose to remove the defaults once the tracking store and model registry store are made workspace aware to catch application logic issues not properly setting the workspace. Some model registry store changes were needed to account for the new composite foreign key. Signed-off-by: mprahl <mprahl@users.noreply.github.com>
c0691c6 to
1f0b624
Compare
|
@B-Step62 I just rebased on the new branch. Could you please approve the workflows again? |
BenWilson2
left a comment
There was a problem hiding this comment.
Would it be more appropriate to have the fields added to each table be workspace id's instead of the unique workspace name that is stored?
I have a feeling that an inner join based on the active workspace (as a name -> id mapping table) to associated tables based on the ID might be better than access filtering based on a string value for the required updates to backend APIs. Curious to hear your thoughts on this one based on DB performance.
Test coverage looks great - thank you for validation of upgrade / downgrade.
I'll repost from my Slack comment for visibility: The reason why I don't leverage foreign keys to a workspace ID is to allow workspace providers outside of the database (e.g. Kubernetes namespaces) to be compatible with the SQLAlchemy tracking and model registry stores. When using a workspace provider, the workspaces won't be stored in the database to avoid having to keep things in sync from the source of truth (e.g. Kubernetes). |
BenWilson2
left a comment
There was a problem hiding this comment.
Thanks for the justification. No concerns here!
Signed-off-by: mprahl <mprahl@users.noreply.github.com>
Signed-off-by: mprahl <mprahl@users.noreply.github.com>
Signed-off-by: mprahl <mprahl@users.noreply.github.com>
Signed-off-by: mprahl <mprahl@users.noreply.github.com>
Signed-off-by: mprahl <mprahl@users.noreply.github.com>
Signed-off-by: mprahl <mprahl@users.noreply.github.com>
Signed-off-by: mprahl <mprahl@users.noreply.github.com>
Signed-off-by: mprahl <mprahl@users.noreply.github.com>
🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues/PRs
First split from #18869.
#1464
#5844
Design document: https://docs.google.com/document/d/1IbFfceCmWV3knJfc0ninn58EXLVbHUh1meV_pknOM40/edit
What changes are proposed in this pull request?
This adds the required workspace columns and the workspace catalog table with the default workspace precreated. All workspace columns default to "default" for now and we may choose to remove the defaults once the tracking store and model registry store are made workspace aware to catch application logic issues not properly setting the workspace.
Some model registry store changes were needed to account for the new composite foreign key.
How is this PR tested?
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.