Skip to content

fix(ingestion): pin anyio<4.15 in the mlflow test image to unblock py-tests shard-2 (2.0) - #32541

Merged
harshsoni2024 merged 1 commit into
2.0from
backport/32525-anyio-pin-2.0
Sep 3, 2026
Merged

harshsoni2024 merged 1 commit into
2.0from
backport/32525-anyio-pin-2.0

Conversation

@manerow

@manerow manerow commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #32528

Backport of #32525 to 2.0.

py-tests shard-2 fails on this branch exactly as it did on main. The MLflow fixture builds a throwaway MLflow server image with an unlocked pip install, so it picks up anyio 4.15.0 (published 2026-09-02T21:46:35Z). anyio 4.15 made its submodules lazily imported without exposing from_thread, which Starlette's WSGIMiddleware calls, so every MLflow server response is a 500 and /health never returns 200:

ERROR tests/integration/sources/mlmodels/mlflow/test_mlflow.py::test_mlflow
RuntimeError: MLflow server did not become ready in time.

AttributeError: module 'anyio' has no attribute 'from_thread'

The auto cherry-pick bot could not land this: it cherry-picked cleanly and then tried to push straight to 2.0, which 2.0.x-protection rejects (GH013 ... Changes must be made through a pull request). Hence this PR.

Type of change:

  • Bug fix

High-level design:

Same two changes as #32525: constrain the fixture image to anyio<4.15, and move time.sleep(2) out of the except block in the readiness loop so a non-200 response waits instead of burning all 30 attempts in milliseconds.

Identical to the main change.

Tests:

Use cases covered

  • The MLflow fixture builds an image whose server answers /health with 200.
  • The MLflow tracking API answers through the WSGI adapter instead of 500ing.

Unit tests

Not applicable: test-fixture-only change.

Backend integration tests

Not applicable: no server changes.

Ingestion integration tests

Verified on main in #32525: all six Integration Tests (shard-2) jobs green across the MySQL and Postgres lanes on 3.10/3.11/3.12.

End-to-end locally, building the Dockerfile bytes from this branch's conftest.py and starting the fixture's own containers:

anyio GET /health
4.15.0 (before) 500, AttributeError: module 'anyio' has no attribute 'from_thread'
4.14.2 (after) 200

Lint verified with this branch's own pinned tooling: ruff~=0.15.12 check and format --check both clean.

Playwright (UI) tests

Not applicable.

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: not applicable, no schema change.
  • I have added a test that covers the exact scenario we are fixing: the existing test_mlflow is that test; this PR restores it.

@manerow
manerow requested a review from a team as a code owner September 3, 2026 09:03
@gitar-bot

gitar-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Pins anyio<4.15 in the MLflow test image fixture and adjusts the readiness loop timing to unblock failing py-tests shard-2. Fixes the AttributeError: module 'anyio' has no attribute 'from_thread' that caused MLflow server responses to fail with 500 errors. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@manerow manerow self-assigned this Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 433ad3b10f08148815387fc589d556f16ed08f8c in Playwright run 33736766951, attempt 1.

✅ 110 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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) 1h 20m 30s

⏱️ Max setup 3m 3s · max shard execution 12m 27s · max shard-job elapsed before upload 17m 15s · reporting 6s

🌐 209.07 requests/attempt · 1.79 app boots/UI scenario · 0.00% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 209.07 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 1.79 per UI scenario (216 boots / 121 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 46 0 0 0 0 0
✅ Shard ingestion-01 34 0 0 0 0 0
✅ Shard ingestion-02 30 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

@harshsoni2024
harshsoni2024 merged commit bbb7d07 into 2.0 Sep 3, 2026
91 of 92 checks passed
@harshsoni2024
harshsoni2024 deleted the backport/32525-anyio-pin-2.0 branch September 3, 2026 10:55

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants