Skip to content

template rendering issue in passing templates_dict param using task decorator - #26390

Merged
potiuk merged 1 commit into
apache:mainfrom
Bowrna:file_rendering_task_decorator
Sep 19, 2022
Merged

template rendering issue in passing templates_dict param using task decorator#26390
potiuk merged 1 commit into
apache:mainfrom
Bowrna:file_rendering_task_decorator

Conversation

@Bowrna

@Bowrna Bowrna commented Sep 14, 2022

Copy link
Copy Markdown
Contributor

closes: #22072
Fix for the following issue:
The filenames inside the templates_dict is rendered in PythonOperator while it doesn't get rendered when passed as parameter using @task decorator.

This PR fixes the issue and updates the documentation and adds in the system test.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@Bowrna
Bowrna requested review from kaxil and potiuk as code owners September 14, 2022 10:08
@Bowrna
Bowrna force-pushed the file_rendering_task_decorator branch 2 times, most recently from e0555d9 to 0846183 Compare September 14, 2022 14:44
Comment thread airflow/decorators/python.py Outdated
Comment on lines 38 to 39

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test for the case you are mentioning

@Bowrna
Bowrna force-pushed the file_rendering_task_decorator branch 3 times, most recently from 976dd52 to f9fd527 Compare September 16, 2022 10:05
@Bowrna Bowrna closed this Sep 16, 2022
@Bowrna Bowrna reopened this Sep 16, 2022
@Bowrna
Bowrna force-pushed the file_rendering_task_decorator branch 3 times, most recently from a3429c5 to a138bf9 Compare September 17, 2022 09:47
@Bowrna Bowrna closed this Sep 17, 2022
@Bowrna Bowrna reopened this Sep 17, 2022
@Bowrna Bowrna closed this Sep 18, 2022
@Bowrna Bowrna reopened this Sep 18, 2022
@Bowrna
Bowrna force-pushed the file_rendering_task_decorator branch 2 times, most recently from 63ced93 to 170417a Compare September 18, 2022 12:27
@Bowrna
Bowrna force-pushed the file_rendering_task_decorator branch from 170417a to 88f6bf1 Compare September 19, 2022 10:09
@potiuk
potiuk merged commit 4bf0cb9 into apache:main Sep 19, 2022
@Bowrna

Bowrna commented Sep 20, 2022

Copy link
Copy Markdown
Contributor Author

@kaxil I will add the tests for this PR as a separate PR. This PR got merged before adding the test

@jedcunningham jedcunningham added this to the Airflow 2.4.1 milestone Sep 23, 2022
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Sep 23, 2022
jedcunningham pushed a commit that referenced this pull request Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@task decorator does not handle "templates_exts" argument correctly (files are not rendered)

4 participants