potiuk commented on issue #20254: URL: https://github.com/apache/airflow/issues/20254#issuecomment-1019607499
I think there are two main resasons why we have the few scripts: The bash script is needed because _script_init.sh is called to set the "AIRFLOW_CI_IMAGE` variable - this variable is then used internally by some tests to determine which image should be tested. But in our case we can get the image from the BuildParams instead: https://github.com/apache/airflow/blob/bad070f7f484a9b4065a0d86195a1e8002d9bfef/dev/breeze/src/airflow_breeze/ci/build_params.py#L68 So what we really need to do is to create BuildParams class, set the python version from PYTHON_MAJOR_MINOR_VERSION environment variable and retrieve `airlfow_ci_image` from there (And set it as AIRFLOW_CI_IMAGE env variable using `os.environ`. @mik-laj - do I get it right? Maybe we can figure a good way of retrieveing the image easier ? Originally the `ci_run_docker_tests.py` does a bit more - it actually bootstraps a virtualenv and runs "pytest" command in it with appropriate parameter. And I think we do not really need it. We already have `breeze` virtualenv - we might want to add there missing dependencies in setup.cfg (in the script we have "pytest", "pytest-xdist", "requests" - I think we only miss `requests`). So instead we can immediately call `python -m pytest ./docker-tests/tests_examples_of_prod_image_building.py`. Do I get it right @mik-laj ? Then we will not need any "bash script" to run it or even any "intermediate script" - not even the "freespace" equivalent -- 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]
