Apache Airflow version
2.6.3
What happened
If I use PythonVirtualEnvOperator with airflow tasks test command, it installs package outside of virtualenv.
It is quite strange that scheduled task does not behave like this but with tasks test command.
I checked this behavior in two OS, Debian GNU/Linux 11 (bullseye) and MacOS 13.0
The detail is in how to reproduce
What you think should happen instead
No response
How to reproduce
helmfile version: 1.10.0
airflow version: 2.6.3
- make task using PythonVirtualEnvOperator with module that is preinstalled in system-site-packages
in my case, it is openpyxl which is one of constraints of airflow.
in 2.6.3 openpyxl==3.1.2
following is my operator that I found the bug.
PythonVirtualenvOperator(
task_id='test_venv',
dag=dag,
python_callable=dummy_callable,
requirements='openpyxl==3.0.10',
)
- deploy airflow with helmfile
- go to worker with kubectl exec command
- check version of openpyxl with pip freeze command. It shows 3.1.2
- run command 'airflow tasks test dag_id task_id' with the task defined above.
- recheck version of openpyxl with pip freeze command. It shows 3.0.10
Operating System
Debian GNU/Linux 11 (bullseye), MacOS 13.0
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
2.6.3
What happened
If I use PythonVirtualEnvOperator with airflow tasks test command, it installs package outside of virtualenv.
It is quite strange that scheduled task does not behave like this but with tasks test command.
I checked this behavior in two OS, Debian GNU/Linux 11 (bullseye) and MacOS 13.0
The detail is in how to reproduce
What you think should happen instead
No response
How to reproduce
helmfile version: 1.10.0
airflow version: 2.6.3
in my case, it is openpyxl which is one of constraints of airflow.
in 2.6.3 openpyxl==3.1.2
following is my operator that I found the bug.
Operating System
Debian GNU/Linux 11 (bullseye), MacOS 13.0
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct