Repository navigation
Conversation
pytest 9.2.0 grows each xdist worker to about 3.8 GB while collecting tests, which runs the 16 GB CI runners out of memory and kills the BigQuery cloud engine job. See SQLMesh#6254. Signed-off-by: mday-io <mdaytn@gmail.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Signed-off-by: mday-io <mdaytn@gmail.com>
Problem
Since 2026-10-31,
engine-tests-cloud (bigquery)onmainhas failed every run. The runner either gets a shutdown signal about a minute into pytest or stops responding until the job is cancelled. Either way, no log or artifact survives.The experiment in #6254 streamed memory samples to the live log and tried one pin at a time:
google-cloud-bigquerygrpciopytestgrpcioonlygoogle-cloud-bigqueryonlypytestonlyWith pytest 9.2.0 (released 2026-10-27), all four xdist workers grow from about 450 MB to about 3.8 GB within five seconds, before any test runs. That uses the runner's 16 GB, and the runner shuts down. With 9.1.1, memory peaks at about 3.1 GB for the whole run.
This only happens in the BigQuery job. Other jobs on the same
mainruns also use pytest 9.2.0 with four workers and pass, includingstyle-and-cicd-tests,engine-tests-docker (duckdb), and the Snowflake, Databricks and Athena cloud jobs. So the trigger is pytest 9.2.0 combined with something only the BigQuery job has, probably its extra packages such asbigframes. I haven't confirmed which.Change
Pin
pytest<9.2in thedevextra, with a comment saying why. The pin is broader than the problem, since every job that installs the dev dependencies gets it, but nothing depends on 9.2.0. Python 3.9 already resolves to pytest 8.4.2, so it's unchanged.Test Plan
engine-tests-cloud (bigquery)with onlypytest==9.1.1pinned, and ran out of memory when onlygrpcioor onlygoogle-cloud-bigquerywas pinned.uv pip compile pyproject.toml --extra devresolves pytest to 9.1.1 on Python 3.12 and 8.4.2 on Python 3.9.pre-commit run --files pyproject.tomlandmake fast-testpass locally.Follow-ups
Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCOSummary by CodeRabbit