Skip to content

Fix environment variable expansion in docker/README.md - #25474

Merged
harupy merged 2 commits into
mlflow:masterfrom
CoralGarden52:fix/docker-readme-env-expansion
Aug 31, 2026
Merged

harupy merged 2 commits into
mlflow:masterfrom
CoralGarden52:fix/docker-readme-env-expansion

Conversation

@CoralGarden52

@CoralGarden52 CoralGarden52 commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Related Issues/PRs

N/A

What changes are proposed in this pull request?

The Docker README passes MLFLOW_BACKEND_STORE_URI into the container, but the MySQL, PostgreSQL, and Docker Compose examples also reference $MLFLOW_BACKEND_STORE_URI in the command. The direct docker run command is expanded by the host shell, while Docker executes the resulting command arguments without a shell inside the container. Docker Compose also interpolates variables before the container starts, so the container environment is not used for this expansion. When MLFLOW_BACKEND_STORE_URI is unset in the host environment, the command becomes mlflow server --backend-store-uri --host 0.0.0.0; Click consumes --host as the value of --backend-store-uri and then fails with Got unexpected extra argument (0.0.0.0). Removing the redundant option lets MLflow read MLFLOW_BACKEND_STORE_URI from the container environment directly.

How is this PR tested?

  • Existing unit/integration tests

  • New unit/integration tests

  • Manual tests

  • Reproduced the host-shell argument expansion with an unset MLFLOW_BACKEND_STORE_URI and verified the corrected command arguments.

  • Confirmed all affected README examples no longer use the host-expanded variable.

  • Ran npx --yes [email protected] --check docker/README.md.

  • Ran git diff --check.

Does this PR require documentation update?

  • No.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Does this PR require updating the MLflow Skills repository?

  • No.
  • Yes. Please link the corresponding PR or explain how you plan to update it.

Release Notes

Is this a user-facing change?

  • No.
  • Yes. The Docker README examples now correctly use the container's MLFLOW_BACKEND_STORE_URI environment variable.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow Model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM integrations
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How 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" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing MLflow feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Is this PR a critical bugfix or security fix that should go into the next patch release?

  • This PR is critical and needs to be in the next patch release
  • This PR can wait for the next minor release

@github-actions github-actions Bot added area/docs Documentation issues rn/documentation Mention under Documentation Changes in Changelogs. labels Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor
Install mlflow from this PR

Install mlflow from this PR

# mlflow
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/25474/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/25474/merge#subdirectory=libs/skinny

For Databricks, use the following command:

%sh curl -LsSf https://raw.githubusercontent.com/mlflow/mlflow/HEAD/dev/install-skinny.sh | sh -s pull/25474/merge

PR author's recent activity

In the last 14 days, @CoralGarden52 opened 12 PRs across 8 repos:

Repository Open Closed Merged Total
mlflow/mlflow 1 0 2 3
ComposioHQ/composio 2 0 0 2
deepset-ai/haystack 2 0 0 2
openai/openai-agents-python 1 0 0 1
PrefectHQ/fastmcp 0 1 0 1
langgenius/dify 1 0 0 1
datawhalechina/hello-agents 1 0 0 1
pydantic/pydantic-ai 0 1 0 1

@github-actions github-actions Bot added size/XS community Community/external contribution labels Aug 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@harupy harupy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is correct, and worth stating explicitly since it is not obvious: docker run execs the command argv without a shell, so $MLFLOW_BACKEND_STORE_URI was never going to expand there. There is no shell in that context to expand it, and the container's own env is not consulted for argv. Relying on mlflow server reading the env var directly is the right minimal fix.

One correction to the description, since the squash-merged commit message inherits it. The body says an unset variable "leaves MLflow with an empty --backend-store-uri value". Click actually consumes the next token as the option value, so the old form aborted with:

$ mlflow server --backend-store-uri --host 0.0.0.0
Error: Got unexpected extra argument (0.0.0.0)

with backend_store_uri set to the string --host. Worth fixing because Got unexpected extra argument is the message users will actually search for, and because the empty-value framing hides that the server would also have silently fallen back to binding 127.0.0.1 had there been no trailing argument.

Comment thread docker/README.md
@harupy
harupy enabled auto-merge (squash) August 31, 2026 03:17
@harupy
harupy merged commit 93ed9b3 into mlflow:master Aug 31, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation issues community Community/external contribution rn/documentation Mention under Documentation Changes in Changelogs. size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants