Skip to content

Fail the mlflow-skinny/mlflow-tracing build instead of shipping an empty wheel - #25713

Merged
kriscon-db merged 1 commit into
mlflow:masterfrom
siddharthgaur1:bug/windows-empty-skinny-wheel
Sep 9, 2026
Merged

kriscon-db merged 1 commit into
mlflow:masterfrom
siddharthgaur1:bug/windows-empty-skinny-wheel

Conversation

@siddharthgaur1

Copy link
Copy Markdown
Contributor

Related Issues/PRs

Closes #25641

What changes are proposed in this pull request?

libs/skinny/mlflow and libs/tracing/mlflow are committed as git symlinks (mode 120000) to the repository's mlflow package. On a Windows checkout without symlink privilege — core.symlinks=false, the default for a non-elevated user with Developer Mode off — git materializes them as plain text files containing the link target, so [tool.setuptools.packages.find] discovers no packages.

The build then exits 0 and produces a wheel with no code in it, which installs cleanly and declares the mlflow console entry point but cannot import anything. A build reporting success while producing nothing is the defect here — worse than one that stops.

This adds a setup.py beside each generated pyproject.toml that stops the build when the linked source is not a directory, and says how to fix the checkout. pyproject.toml is generated by dev/pyproject.py and marked do-not-edit, so the check cannot live there; setuptools still executes setup.py when it sits beside PEP 621 metadata, so the guard runs at build time without changing any packaging configuration.

This is option A from the issue. Not option B (repointing setuptools at the real tree): a better outcome, but a larger change needing care with MANIFEST.in and package-data globs, and it would mean editing generated files. Happy to take that on separately if you'd prefer it.

build-wheel.yml builds both variants on ubuntu-latest, where symlinks resolve, so no job builds either variant on Windows and this is invisible to CI by construction.

How is this PR tested?

  • Manual tests

Verified on the exact reported setup: Windows 11, non-elevated, Developer Mode off, core.symlinks=false, on a fresh --depth=1 clone at master.

Before — the silent failure:

$ git ls-files -s libs/skinny/mlflow
120000 01d2913... 0    libs/skinny/mlflow
$ ls -la libs/skinny/mlflow
-rw-r--r-- 12 bytes                      # a regular file, not a directory
$ find_packages(where="libs/skinny", include=["mlflow", "mlflow.*"])
[]
$ build_meta.build_wheel("dist")         # exit 0
entries: 6 | .py files: 0

After — the failure path now fails, through both entry points:

$ build_meta.build_wheel("dist")         # exit 1
$ pip install ./libs/skinny              # exit 1
  libs/skinny/mlflow is not a directory, so this build would produce a wheel
  with no code in it.
  On Windows, git materializes symlinks as text files unless you enable
  Developer Mode, or clone with:
      git -c core.symlinks=true clone https://github.com/mlflow/mlflow

After — the working path is untouched. Standing a junction in for the resolved symlink to reproduce what Linux CI sees, I built the wheel with the guard and without it:

with guard without guard
entries 1190 1190
.py files 1173 1173
file lists identical

Metadata still comes from pyproject.toml (Name: mlflow-skinny, Version: 3.16.1.dev0), with entry_points.txt and mlflow/__init__.py both present — so setup() with no arguments runs the check without taking over packaging. libs/tracing builds the same way (605 .py files).

Published PyPI artifacts are unaffected: they are built on Linux, where the guard is a no-op.

ruff check and ruff format --check clean at the pinned 0.16.4.

Does this PR require documentation update?

  • No.

Does this PR require updating the MLflow Skills repository?

  • No.

Release Notes

Is this a user-facing change?

  • Yes. Building mlflow-skinny or mlflow-tracing from a source checkout whose symlinks were not materialized (typically Windows without Developer Mode) now fails with an actionable message instead of silently producing a wheel containing no Python modules.

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

Components

  • area/build: Build and test infrastructure for MLflow

How should the PR be classified in the release notes? Choose one:

  • rn/bug-fix - A user-facing bug fix 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

Note on ownership: @siva23367 expressed interest on 09-07 and @kriscon-db noted issues aren't assigned here. I've said on the issue that I'll close this if they already have work in progress — I'd rather not duplicate their effort.

@github-actions github-actions Bot added area/build Build and test infrastructure for MLflow rn/bug-fix Mention under Bug Fixes in Changelogs. community Community/external contribution labels Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

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/25713/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/25713/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/25713/merge

PR author's recent activity

In the last 14 days, @siddharthgaur1 opened 9 PRs across 7 repos:

Repository Open Closed Merged Total
mlflow/mlflow 1 1 0 2
fivetran/great_expectations 2 0 0 2
chroma-core/chroma 1 0 0 1
modelcontextprotocol/python-sdk 0 1 0 1
pyg-team/pytorch_geometric 1 0 0 1
olijacklu/docling-core 1 0 0 1
jsvine/pdfplumber 1 0 0 1

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@siddharthgaur1 Thank you for the contribution! Could you fix the following issue(s)? Otherwise, this PR may be automatically closed.

❌ DCO check

The 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.

@github-actions github-actions Bot added size/M team-review Trigger a team review request labels Sep 8, 2026
@github-actions
github-actions Bot requested review from mprahl and tanghaoji September 8, 2026 17:34
libs/skinny/mlflow and libs/tracing/mlflow are committed as git symlinks
(mode 120000) to the repository's mlflow package. On a Windows checkout
without symlink privilege -- core.symlinks=false, the default for a
non-elevated user with Developer Mode off -- git materializes them as
plain text files containing the link target. [tool.setuptools.packages.find]
then discovers no packages, and the build exits 0 with a wheel that
contains no code, installs cleanly, and declares an mlflow console entry
point that cannot import anything.

Adds a setup.py beside each generated pyproject.toml that stops the build
when the linked source is not a directory, and says how to fix the
checkout. pyproject.toml is generated by dev/pyproject.py and marked
do-not-edit, so the check cannot live there; setuptools still executes
setup.py when it sits beside PEP 621 metadata.

Published PyPI artifacts are unaffected -- they are built on Linux, where
the symlinks resolve and the guard is a no-op.

Closes #25641

Claude-Session: https://claude.ai/code/session_01NxphSQWkGcC4sgncbRU64C

Signed-off-by: Siddharth Gaur <[email protected]>

@kriscon-db kriscon-db left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks!

@kriscon-db
kriscon-db merged commit a217dd7 into mlflow:master Sep 9, 2026
47 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build and test infrastructure for MLflow community Community/external contribution rn/bug-fix Mention under Bug Fixes in Changelogs. size/M team-review Trigger a team review request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] mlflow-skinny builds an empty wheel on Windows checkouts without symlink privilege

2 participants