Skip to content

Commit 42307d6

Browse files
committed
test(downstream): validate the latest MLflow Git integration
Add MLflow's released Git project and context tests to the shared local runner and CI matrix. Rank the project by `mlflow-skinny` downloads without summing overlapping distributions, resolve its current PyPI release, and check out the matching `v{version}` source tag for unchanged upstream tests. Install the matching full `mlflow` package because upstream global fixtures need its server and SQLite support. Clear `CI` and `GITHUB_ACTIONS` inside the isolated run to avoid unrelated upstream wheel builds and conda cleanup. Disable telemetry and keep the venv first on `PATH` so project subprocesses use the same editable GitPython checkout. The shared runner passes all 47 selected tests for MLflow 3.16.1 on Python 3.12 and Git 2.54, including 31 repository/project/model-versioning cases and 16 Git context or credential-redaction contract cases. Validation started with both CI variables set, exercising the CI isolation. Public example clones and a localhost HTTP server are required; no cloud services or models are needed. The model-versioning cases also cover staged/unstaged diffs and dirty-state handling. No GitPython compatibility changes were necessary.
1 parent ddd4511 commit 42307d6

3 files changed

Lines changed: 37 additions & 1 deletion

File tree

‎.github/workflows/downstream.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
project: [bandit]
19+
project: [mlflow, bandit]
2020
steps:
2121
- uses: actions/checkout@v7
2222
with:

‎test/downstream/README.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ and test-only dependencies are excluded. Downloads are not unique installations.
3030

3131
| Project | Distribution downloads | Last tested release | Selected coverage |
3232
| --- | ---: | --- | --- |
33+
| MLflow (`mlflow-skinny`) | 25,850,354 | 3.16.1 | 47 upstream tests: 31 repository/project/model-versioning cases plus 16 Git context and credential-redaction contract cases |
3334
| Bandit | 24,935,372 | 1.9.4 | 12 upstream baseline CLI tests: real repository creation, commits, branches, resets, discovery, and dirty state |
3435

3536
Source: [top-pypi-packages](https://hugovk.github.io/top-pypi-packages/top-pypi-packages.min.json),
@@ -40,6 +41,19 @@ distributions was checked, together with known runtime integrations.
4041

4142
Bandit's GitPython dependency belongs to its user-facing `baseline` extra.
4243
Two selected tests mock error paths; the others use real repositories.
44+
45+
MLflow is counted once, using its largest consuming distribution,
46+
`mlflow-skinny`, without adding overlapping distribution counts. The tests install
47+
the matching full `mlflow` release because upstream global fixtures import its
48+
server and SQLite tracking support. Selected cases cover branches, fetches,
49+
checkout, invalid versions, Git context, remote URLs, Python subprocesses, dirty
50+
repositories, and staged/unstaged model-versioning diffs.
51+
Some tests clone the public `mlflow/mlflow-example` repository or start a localhost
52+
HTTP server. `CI` and `GITHUB_ACTIONS` are unset only for downstream setup/tests:
53+
upstream autouse fixtures otherwise build wheels and modify conda environments.
54+
No model downloads, cloud credentials, or external tracking server are needed.
55+
CLI examples that train models or need private SSH credentials are excluded.
56+
4357
CI runs the same command against the latest release and fails when no test passes,
4458
including when all selected tests are skipped. Test dependency ranges only supply
4559
the upstream test harness; they do not pin the dependent's release.

‎test/downstream/projects.json‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
11
{
2+
"mlflow": {
3+
"distribution": "mlflow-skinny",
4+
"source": "git",
5+
"repository": "https://github.com/mlflow/mlflow.git",
6+
"tag": "v{version}",
7+
"install": ["mlflow=={version}", "pytest>=9,<10", "pytest-timeout", "psutil"],
8+
"unset_env": ["CI", "GITHUB_ACTIONS"],
9+
"env": {"MLFLOW_DISABLE_TELEMETRY": "true"},
10+
"tests": [
11+
"tests/genai/test_git_versioning.py",
12+
"tests/projects/test_utils.py::test__fetch_project",
13+
"tests/projects/test_utils.py::test__fetch_git_repo",
14+
"tests/projects/test_utils.py::test_fetch_git_repo_commit",
15+
"tests/projects/test_utils.py::test_fetching_non_existing_version_fails",
16+
"tests/projects/test_utils.py::test_fetch_project_validations",
17+
"tests/projects/test_utils.py::test_is_valid_branch_name",
18+
"tests/projects/test_projects.py::test_run_local_git_repo",
19+
"tests/projects/test_projects.py::test_invalid_version_local_git_repo",
20+
"tests/tracking/context/test_git_context.py",
21+
"tests/utils/test_git_utils.py"
22+
]
23+
},
224
"bandit": {
325
"distribution": "bandit",
426
"source": "sdist",

0 commit comments

Comments
 (0)