potiuk opened a new pull request, #68963: URL: https://github.com/apache/airflow/pull/68963
### Problem The mongo provider tests boot a real `mongo:8.0` container via **testcontainers** (since #53773 dropped mongomock). The whole bring-up — image pull, container start, readiness ping — happens in the **setup phase of the first test** that uses the session fixture, and must fit inside the per-test pytest **`--setup-timeout` (60s)**. On the **GitHub-hosted ARM canary** (`ubuntu-22.04-arm`), where the Docker image cache is cold and registry/disk throughput is lower, the `mongo:8.0` pull alone (~17–19s observed) eats much of that 60s budget, so setup times out → cascade of `ERROR at setup of TestMongoHook.*` (`Failed: Timeout >60.0s`). AMD doesn't hit it because it runs on every PR with warm caches; ARM only runs on the cron canary. (Same run, Py3.11 mongo passed while Py3.10 timed out — a timing/infra signature, not a code defect, and **not** emulation: ARM runners are native arm64 with a native `mongo:8.0` image, no QEMU.) ### Changes **A. Pre-pull testcontainers images out of the timed path.** Before a parallel provider run, pull the images on the shared host daemon — but **only in CI**, and **only when the owning provider's tests are actually selected** (e.g. skip when the run is `Providers[mysql,...]` without mongo, or excludes it). Locally it's a no-op; testcontainers pulls on demand as before. Keyed by provider in `TESTCONTAINERS_IMAGES_BY_PROVIDER` so it scales to future testcontainers-based providers. **B. Higher floor for setup/teardown timeouts.** Container-backed fixtures do their work in setup/teardown, so floor those at 180s (`max(test_timeout, 180)`) while keeping **execution-timeout at the per-test value** so genuinely hung tests are still caught quickly. Belt-and-suspenders for cold-cache or other slow bring-ups. Both are scoped so normal per-test hang-detection and local behavior are unchanged. Tests: added coverage for the timeout floor and for the CI/provider-scoped pre-pull (selected / excluded / non-providers / outside-CI). `mypy-dev` + ruff clean. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
