Skip to content

Fix tracking URI to explicitly append /api to map to REST route#78

Open
aryawadhwa wants to merge 1 commit intoJuliaAI:mainfrom
aryawadhwa:fix-tracking-uri-api
Open

Fix tracking URI to explicitly append /api to map to REST route#78
aryawadhwa wants to merge 1 commit intoJuliaAI:mainfrom
aryawadhwa:fix-tracking-uri-api

Conversation

@aryawadhwa
Copy link

Resolves #1075

Description

When users provide an MLFLOW_TRACKING_URI associated with remote services like DagsHub (e.g., https://dagshub.com/username/repo.mlflow), the underlying HTTP requests currently fail due to 404 HTML redirects.

This occurs because standard MLflow REST API calls expect the /api route, but MLFlowClient.jl currently enforces the raw URI provided in ENV["MLFLOW_TRACKING_URI"] without validating or appending the required /api suffix.

Changes Made

  • Updated the MLFlow constructor in src/types/mlflow.jl to gracefully append /api if missing when parsing tracking URIs from the environment.
  • Left the existing Base64 authentication credential logic intact, as the credentials themselves were routing perfectly.
  • Added a new @testset in test/types/mlflow.jl rigorously unit testing the tracking URI manipulation against multiple edge cases (missing slash, trailing slash, already contains /api, etc.).

Testing

Ran Pkg.test() locally and all tests gracefully pass while successfully shielding the downstream runtests.jl environment state.

@pebeto pebeto self-requested a review March 20, 2026 15:35
@pebeto pebeto added the enhancement New feature or request label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants