potiuk opened a new pull request, #76233: URL: https://github.com/apache/airflow/pull/76233
The non-DB core tests failed on `v3-4-test` ([run](https://github.com/apache/airflow/actions/runs/41314300281/job/124872283053)) with "Your test accessed the DB but `_AIRFLOW_SKIP_DB_TESTS` is set" in all 12 cases of `test_resolve_executor_name` and `test_resolve_executor_name_no_match`. The two tests stub out the team check with `@patch.object(executor_loader.ExecutorLoader, ...)`, which keeps the class object from when the test module was imported. `TestStandaloneCommand.test_calculate_env`, also a non-DB test, reloads `executor_loader`. When it runs earlier on the same xdist worker, the loader tests call the reloaded class, the patch sits on the old one, and the real team validation queries the database. Running the two tests in that order in one process reproduces it on main as well. Ran locally: `test_calculate_env` followed by both loader tests passes with the change (fails 9 of 12 without it); the whole `test_executor_loader.py` passes with `--skip-db-tests`. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5) Generated-by: Claude Code (Opus 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
