-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
templates_dict, op_args, op_kwargs no longer rendered in PythonVirtualenvOperator #23557
Closed
2 tasks done
Labels
affected_version:2.3
Issues Reported for 2.3
area:core-operators
Operators, Sensors and hooks within Core Airflow
kind:bug
This is a clearly a bug
Milestone
Comments
eladkal
added a commit
to eladkal/airflow
that referenced
this issue
May 7, 2022
The `PythonVirtualenvOperator` templated_fields override `PythonOperator` templated_fields which caused functionality not to work as expected. fixes: apache#23557
Nice. Was wondering how to "inherit" class variables. |
@eladkal Doesn't the length of template_ext need to match length of template_fields? |
Nvm, as requirements is first, doesn't matter. |
Lets leave issue open till the fix is merged |
eladkal
added a commit
that referenced
this issue
May 9, 2022
* Fix `PythonVirtualenvOperator` templated_fields The `PythonVirtualenvOperator` templated_fields override `PythonOperator` templated_fields which caused functionality not to work as expected. fixes: #23557
leahecole
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Oct 4, 2022
* Fix `PythonVirtualenvOperator` templated_fields The `PythonVirtualenvOperator` templated_fields override `PythonOperator` templated_fields which caused functionality not to work as expected. fixes: apache/airflow#23557 (cherry picked from commit 1657bd2827a3299a91ae0abbbfe4f6b80bd4cdc0) GitOrigin-RevId: 08a771b805c64b0016d95fcbc9d4c98f7267b071
leahecole
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Dec 7, 2022
* Fix `PythonVirtualenvOperator` templated_fields The `PythonVirtualenvOperator` templated_fields override `PythonOperator` templated_fields which caused functionality not to work as expected. fixes: apache/airflow#23557 (cherry picked from commit 1657bd2827a3299a91ae0abbbfe4f6b80bd4cdc0) GitOrigin-RevId: 08a771b805c64b0016d95fcbc9d4c98f7267b071
leahecole
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Jan 27, 2023
* Fix `PythonVirtualenvOperator` templated_fields The `PythonVirtualenvOperator` templated_fields override `PythonOperator` templated_fields which caused functionality not to work as expected. fixes: apache/airflow#23557 GitOrigin-RevId: 1657bd2827a3299a91ae0abbbfe4f6b80bd4cdc0
kosteev
pushed a commit
to kosteev/composer-airflow-test-copybara
that referenced
this issue
Sep 12, 2024
* Fix `PythonVirtualenvOperator` templated_fields The `PythonVirtualenvOperator` templated_fields override `PythonOperator` templated_fields which caused functionality not to work as expected. fixes: apache/airflow#23557 (cherry picked from commit 1657bd2827a3299a91ae0abbbfe4f6b80bd4cdc0) GitOrigin-RevId: 08a771b805c64b0016d95fcbc9d4c98f7267b071
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Sep 18, 2024
* Fix `PythonVirtualenvOperator` templated_fields The `PythonVirtualenvOperator` templated_fields override `PythonOperator` templated_fields which caused functionality not to work as expected. fixes: apache/airflow#23557 GitOrigin-RevId: 1657bd2827a3299a91ae0abbbfe4f6b80bd4cdc0
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Nov 7, 2024
* Fix `PythonVirtualenvOperator` templated_fields The `PythonVirtualenvOperator` templated_fields override `PythonOperator` templated_fields which caused functionality not to work as expected. fixes: apache/airflow#23557 GitOrigin-RevId: 1657bd2827a3299a91ae0abbbfe4f6b80bd4cdc0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affected_version:2.3
Issues Reported for 2.3
area:core-operators
Operators, Sensors and hooks within Core Airflow
kind:bug
This is a clearly a bug
Apache Airflow version
2.3.0 (latest released)
What happened
Templated strings in templates_dict, op_args, op_kwargs of PythonVirtualenvOperator are no longer rendered.
What you think should happen instead
All templated strings in templates_dict, op_args and op_kwargs must be rendered, i.e. these 3 arguments must be template_fields of PythonVirtualenvOperator, as it was in Airflow 2.2.3
How to reproduce
No response
Operating System
Ubuntu 20.04
Versions of Apache Airflow Providers
No response
Deployment
Virtualenv installation
Deployment details
No response
Anything else
This is due to template_fields class variable being set in PythonVirtualenvOperator
template_fields: Sequence[str] = ('requirements',)
that overrode class variable of PythonOperator
template_fields = ('templates_dict', 'op_args', 'op_kwargs')
.I read in some discussion that wanted to make requirements a template field for PythonVirtualenvOperator, but we must specify all template fields of parent class as well.
template_fields: Sequence[str] = ('templates_dict', 'op_args', 'op_kwargs', 'requirements',)
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: