mik-laj commented on code in PR #25780: URL: https://github.com/apache/airflow/pull/25780#discussion_r961924081
########## airflow/example_dags/example_python_operator.py: ########## @@ -32,6 +36,20 @@ log = logging.getLogger(__name__) +PYTHON = sys.executable + +BASE_DIR = tempfile.gettempdir() +EXTERNAL_PYTHON_ENV = Path(BASE_DIR, "venv-for-system-tests") + +# [START howto_initial_operator_external_python] + +EXTERNAL_PYTHON_PATH = EXTERNAL_PYTHON_ENV / "bin" / "python" + +# [END howto_initial_operator_external_python] + +if not EXTERNAL_PYTHON_PATH.exists(): + venv.create(EXTERNAL_PYTHON_ENV) Review Comment: This means that the virtual environment will also be created when the user only executes the command. ``` AIRFLOW__CORE__LOAD_EXAMPLES=true airflow dags list ``` I don't think this is expected and we should run it as a separate task. -- 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]
