Rebuild SearchTraces V2 request body on ENDPOINT_NOT_FOUND fallback#20963
Rebuild SearchTraces V2 request body on ENDPOINT_NOT_FOUND fallback#20963harupy merged 2 commits intomlflow:masterfrom
SearchTraces V2 request body on ENDPOINT_NOT_FOUND fallback#20963Conversation
🛠 DevTools 🛠
Install mlflow from this PRFor Databricks, use the following command: |
|
@brendanmaguire Thank you for the contribution! Could you fix the following issue(s)? ⚠ DCO checkThe DCO check failed. Please sign off your commit(s) by following the instructions here. See https://github.com/mlflow/mlflow/blob/master/CONTRIBUTING.md#sign-your-work for more details. |
|
Thanks! Can you fix the failed CI checks? |
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the MLflow tracking client where falling back from the V3 to V2 SearchTraces API would fail due to sending an incorrectly formatted request body. When a tracking server returns ENDPOINT_NOT_FOUND for the V3 search traces API, the client now properly constructs a fresh V2 request body with experiment_ids instead of reusing the V3 body with proto-serialized locations.
Changes:
- Fixed SearchTraces V3-to-V2 fallback by creating a new V2 request body with
experiment_idsinstead of reusing the V3 body - Added comprehensive test coverage for the fallback scenario
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| mlflow/store/tracking/rest_store.py | Creates a new SearchTraces (V2) request with experiment_ids parameter when falling back from V3 API |
| tests/store/tracking/test_rest_store.py | Adds test to verify V3-to-V2 fallback creates correct request body with experiment_ids |
|
Documentation preview for 185ecbc is available at: More info
|
SearchTraces V2 request body on ENDPOINT_NOT_FOUND fallback
When a tracking server returns ENDPOINT_NOT_FOUND for the V3 search traces API, the client fell back to V2 but reused the V3 request body (containing proto-serialised `locations`) instead of constructing a fresh V2 body with `experiment_ids`, causing that call to fail with INVALID_PARAMETER_VALUE against older servers. Signed-off-by: Brendan Maguire <1093243+brendanmaguire@users.noreply.github.com>
e619256 to
f64769c
Compare
@harupy I think all are green now |
…ck (mlflow#20963) Signed-off-by: Brendan Maguire <1093243+brendanmaguire@users.noreply.github.com>
…ck (#20963) Signed-off-by: Brendan Maguire <1093243+brendanmaguire@users.noreply.github.com>
Related Issues/PRs
No related issues/PRs
What changes are proposed in this pull request?
When a tracking server returns ENDPOINT_NOT_FOUND for the V3 search traces API, the client fell back to V2 but reused the V3 request body (containing proto-serialised
locations) instead of constructing a fresh V2 body withexperiment_ids, causing that call to fail with INVALID_PARAMETER_VALUE against older servers.This change creates a new v2 body for the fallback request.
How is this PR tested?
Manual testing was performed by querying a local MLFlow server running 3.0.0 with a 3.8.1 client.
Does this PR require documentation update?
Does this PR require updating the MLflow Skills repository?
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.