The GitHub Actions job "Tests (AMD)" on airflow.git/dbfree-venv-operator-tests 
has failed.
Run started by GitHub user potiuk (triggered by potiuk).

Head commit for run:
0de55fed28e2f533a627d3b7422a865c3aca6348 / Jarek Potiuk <[email protected]>
Run standard venv operator tests DB-free so they parallelize under xdist

PythonVirtualenvOperator/ExternalPythonOperator tests dominate the
`Providers[standard]` suite (~450s of ~510s) because they build real
virtualenvs, and they were forced to run serially: they were marked
`db_test`, so pytest-xdist could not parallelize them.

Their only real DB coupling was the test harness, not the metadata DB —
but the venv subprocess reconnects to the supervisor over a socket, so
they cannot use the plain `run_task` mock (which has no real socket and
fails with `OSError: Socket operation on non-socket`).

Add `tests_common.test_utils.in_process_taskrun.run_task_no_db`, which
drives `InProcessTestSupervisor`'s real socketpair with an in-memory
stub Execution-API client, so a venv operator runs with a working
supervisor socket and no metadata DB.

Convert `TestPythonVirtualenvOperator` and `TestExternalPythonOperator`
onto it via a `_DBFreeVenvRun` mixin and drop their `db_test` mark, so
they parallelize under `--skip-db-tests --use-xdist`. The module-level
`db_test`/`need_serialized_dag` mark moves to the remaining DB classes.
Branch venv classes keep `db_test` (their multi-task state assertions
need a real DAG run).

Measured: the two classes run ~3x faster at `-n 4` (157 tests, 89s vs
~266s serial); larger gains at CI worker counts.

Report URL: https://github.com/apache/airflow/actions/runs/27495806460

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to