Repository navigation
fix(ingestion): pin anyio<4.15 in the mlflow test image to unblock py-tests shard-2 - #32525
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
52ced6e to
aab2022
Compare
Code Review ✅ ApprovedPins OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
🔴 Playwright Results — workflow failedValidated commit ✅ 108 passed · ❌ 1 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky ❌ Action needed: test(s) failed on every attempt against this PR’s validated commit — see Genuine Failures below. These are test failures, not CI budget or infrastructure issues. PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 58m 29s ⏱️ Max setup 5m 47s · max shard execution 18m 24s · max shard-job elapsed before upload 24m 41s · reporting 5s 🌐 220.03 requests/attempt · 1.79 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
Genuine Failures (failed on all attempts)❌
|
|
Failed to cherry-pick changes to the 1.13 branch. |
|
Failed to cherry-pick changes to the 2.0 branch. |
…-tests shard-2 (open-metadata#32525) * fix(ingestion): pin anyio<4.15 in the mlflow test image * fix(ingestion): wait between mlflow readiness probes on a non-200 response



Describe your changes:
Fixes #32528
tests/integration/sources/mlmodels/mlflow/test_mlflow.py::test_mlflowhas been erroring during fixture setup on every branch since 2026-09-02 21:59 UTC, failingpython / Integration Tests (shard-2)on all three Python versions and ejecting PRs from the merge queue.Not a code regression. No commit landed on
mainbetween the last green run and the first red one.shard-2anyio4.15.0 published to PyPIshard-2mainunchanged across that windowf1ed7b42(14:47Z) →83c7612b(2026-09-03 04:16Z)Since then: 48 failed
py-testsruns across 23 branches, 10 PRs ejected from the merge queue (#31848, #31990, #32014, #32074, #32181, #32306, #32342, #32375, #32427, #32492), plus1.13and2.0backport branches.Type of change:
High-level design:
Root cause. The fixture builds a throwaway MLflow server image with an unlocked install, so transitive dependencies float:
anyio 4.15.0 changed
anyioandanyio.abcto import their submodules lazily (agronholm/anyio#1169), andfrom_threadis not exposed by that mechanism. Starlette'sWSGIMiddlewarecallsanyio.from_thread.run(...)without importing the submodule, and MLflow serves its tracking API through that adapter, so every request returns 500:/healthnever returns 200, so the readiness loop gives up.Second commit. The same loop's
time.sleep(2)sat inside theexceptblock, so a response that arrives but is not 200 never slept: all 30 attempts burned in milliseconds instead of the intended 60s. This is not what made the test fail, but it is why the fixture reported "did not become ready" almost instantly and why a server that 500s during warm-up is indistinguishable from one that is down. Moving the sleep out restores the intended budget. Drop this commit if you would rather keep the change to one line.Nothing shipped is affected. The MLflow connector depends on
mlflow-skinny(ingestion/setup.py:370), which ships no server and never reachesWSGIMiddleware. The CI ingestion venv itself installedanyio-4.15.0and the other 146 tests in the same shard passed. This Dockerfile is built inside the test, never published and never scanned.No security regression. anyio has no published GitHub security advisories, and 4.15.0 is a feature release with no security fix, so the bound reintroduces nothing. The
mlflow>=3.10.0floor that #28231 set to clear Snyk high/critical findings is untouched.Rejected alternatives.
<3.11cap. Does not constrain anyio. Verified: MLflow 3.14.0 also resolves starlette 1.6.0 + anyio 4.15.0 and hits the same path; opendatahub-io/agentic-ci#382 reports the same for 3.15.2.The bound can be removed once anyio restores the attribute or starlette imports the submodule; that condition is in the code comment.
Tests:
Use cases covered
/healthwith 200.Unit tests
Not applicable: test-fixture-only change.
Backend integration tests
Not applicable: no server changes.
Ingestion integration tests
ruff checkandruff format --check(pinnedruff~=0.15.12) pass on the changed file.End-to-end, driving the Dockerfile bytes extracted from this branch's
conftest.pyand starting the same three containers with the fixture's own commands (mysql:8.4.5with--log-bin-trust-function-creators=1,minio/minio:RELEASE.2022-12-02T19-19-22Z, the built MLflow image):A/B control on the same setup, changing only the anyio bound:
GET /healthAttributeError: module 'anyio' has no attribute 'from_thread'Playwright (UI) tests
Not applicable.
UI screen recording / screenshots:
Not applicable.
Checklist:
test_mlflowis that test; this PR restores it.Backports needed:
1.13and2.0carry the same unpinned line and are failing the same way.