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

Head commit for run:
1865c20f5bfb07ec82120a8115ea5934bdd00325 / Jarek Potiuk <[email protected]>
Improve, speed up, simplify  and stabilize airflow-ctl tests suite

The tests in airflow-ctl failed occasionally when run with xdist, also
the definition of the airflow-ctl dependencies in pyproject.toml did
not properly reflect dependencies needed to run the tests - they
silently assumed that tests are always run in a complete workspace,
where all packages were installed. That is pretty unnecessary and
it was possible to improve the devel-common to handle minimum set
of requirements for airflow-ctl so that it does not have to install
unnecessary depedencies.

Since `airflow-ctl` does not now require airflow nor sqlalchemy for
installation and tests we can use the power of `uv` to automatically
install and run the tests without the need of CI image - airflow-ctl
is supposed to be small and standalone package so set of dependencies
it has should make it possible to install it without having all the
700+ dependencies in the CI nor having system dependencies installed in
Debian image.

Another problem was that when the tests were run with MacOS keyring, the
login test was hanging waiting for user entry.

This PR fixes those problems:

* devel-common distribution does not have to have airflow nor sqlalchemy
  as dependency - this way airflow-ctl distribution can run tests
  without all packages installed

* instead of platformdirs user_config_dir, we use direct retrieval
  of configuration folder following airflow pattern (AIRLFOW_HOME
  or ~/airflow). This allows to easily patch airflow home to use
  temporary directory for each test - which solves the xdist
  failures when tests running in parallel were overriding each-others
  config folder

* patching all paths that the test can ask for password makes it not
  hang when keyring is installed

* breeze airflow-ctl tests perform `uv sync` in airflow-ctl directory
  in order to make sure that no other dependencies are used during
  CI tests.

* test_command.py file is .gitignored and deleted after the test are
  run

* breeze testing airflow-ctl now does not require CI images to be
  run, we are using `uv run` to autonaticaly install the venv
  in the right python version, which simplifies and speeds up running.

* for airflow-ctl we use --use-local-hatch to build the packages
  locally

After this change running tests for airflow-ctl can be done very
easily with:

* breeze testing airfllw-ctl --python N.N

or

* cd airflow-ctl; uv run --python N.N pytest

They should be equivalent.

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

With regards,
GitHub Actions via GitBox


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

Reply via email to