The GitHub Actions job "Tests" on airflow.git has failed.
Run started by GitHub user potiuk (triggered by potiuk).

Head commit for run:
1ef0b37106f17e0674056cbe828fea0ee427619e / Jarek Potiuk <[email protected]>
Remove requirement for test_ prefix for pytest test modules

Currently we had a requirement to use `test_` prefix for modules for all
our tests, however this means that we could have missed some of the
tests from pytest collection when they were placed in a module without
the `test_` prefix. This happenedi already: see #30311 and #30306

The previous attempts to remove it failed, because cassandra tests
seemed to be incompatible with pytest collection when we allowed all
Python files, also there were a few names that caused the pytest
collection to fail with selecting all Python files for collection.

The move is accompanied by converting pytest configuration to
pyproject.toml.

After long investigation, it turned out that the cause of cassandra
failures was pytest assert rewrite with collided with Cython-related
type_codes.py definition of types.

See https://github.com/datastax/python-driver/pull/1142 for PR
that is aimed to fix it on cassandra side, in the meantime we
are manually patching the type_codes.py file from Cassandra by adding
PYTEST_DONT_REWRITE to its docstring when building the CI image for
testing.

Another error was using run_module method which also suffers from
assert rewriting incompatibilities but this could be fixed by using
run_path instead. https://github.com/pytest-dev/pytest/issues/9007

Also test in docker_tests should be run with working directory
being docker_tests in order to apply pyproject.toml from their
directory (without specifying asyncio mode).

The following changes are applied:

* conversion of pytest configuration from pytest.ini to
  pyproject.toml (for main project, docker_tests and breeze)

* adding automated patching of Cassandra type_codes.py with
  PYTEST_DONT_REWRITE docstring marker

* add pyproject.toml to docker context in order to include it in
  sources of airflow in the image

* remove pytest.ini from docker compose mounting and automated removal
  in entrypoin in case old image is used

* rename few breeze function to not start with "test_" so that they
  are not collected as test methods

* remove few test dags from collecton by pytest by name

* replace run_module with run_path usage in EKS test and test_www.

* CI workflow is updated to use docker_tests as working directory
  for those tests

* perf dags were moved out of the tests/test_utils dir to dev
  directory.

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

With regards,
GitHub Actions via GitBox


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

Reply via email to