Xiroo opened a new issue, #32879:
URL: https://github.com/apache/airflow/issues/32879
### 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
0. 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 I found the bug.
PythonVirtualenvOperator(
task_id='test_venv',
dag=dag,
python_callable=dummy_callable,
requirements='openpyxl==3.0.10',
)
1. deploy airflow with helmfile
2. go to worker with kubectl exec command
3. check version of openpyxl with pip freeze command. It shows 3.1.2
4. run command 'airflow tasks test dag_id task_id' with the task defined
above.
5. 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?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]