Skip to content

Bugfix: SQL not rendered in Rendered Templates view #60739

Merged
amoghrajesh merged 2 commits into
apache:mainfrom
sarth-akvaish:bug/SQL-not-rendered
Feb 23, 2026
Merged

Bugfix: SQL not rendered in Rendered Templates view #60739
amoghrajesh merged 2 commits into
apache:mainfrom
sarth-akvaish:bug/SQL-not-rendered

Conversation

@sarth-akvaish

Copy link
Copy Markdown
Contributor

This PR resolves the issue of not rendering SQL (other also like bash command) in the Rendered Templates tab in the specific Task.

Fixes : #60589

What is happening currently ?

Rendered Template fields are generated inside the task runner after jinja rendering and then sent to the API server to be stored in the RTIF table.

The task runner only serialized the top-level template fields defined on the operator(for ex - configuration)
Nested renderer paths (such as configuration.query.query) were not extracted or sent.

As a result The RTIF model and UI were functioning correctly, but the required data never reached them.

What changed made

The task runner logic si updated to corrrectly capture rendered template values after rendering and senfd them to the API server.
Becuase the UI is data driven, it immediately began displaying the correct rendered templates with proper title and syntax, without any changes in teh UI code.

Image after fixing this issue

Screenshot from 2026-01-18 12-23-18
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@nathadfield

Copy link
Copy Markdown
Contributor

@sarth-akvaish I noticed that no one has given this a review yet. @ashb, @amoghrajesh and @kaxil if one of you gets a spare moment to take a look, we'd be most appreciative.

@ashb ashb left a comment

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.

Change looks about okay, but please add some unit tests covering this

@sarth-akvaish

Copy link
Copy Markdown
Contributor Author

Change looks about okay, but please add some unit tests covering this

Sure, will update the PR. Thanks

@sarth-akvaish

sarth-akvaish commented Feb 11, 2026

Copy link
Copy Markdown
Contributor Author

Hi @ashb, I've added the tests. Thanks

@nathadfield

Copy link
Copy Markdown
Contributor

@sarth-akvaish Looks like there are some conflicts that need resolving too.

@sarth-akvaish sarth-akvaish force-pushed the bug/SQL-not-rendered branch 3 times, most recently from 0a8d9c8 to 14ae6bb Compare February 12, 2026 04:27
@eladkal eladkal changed the title Bigquery SQL Renderering Issue Bugfix: SQL not rendered in Rendered Templates view Feb 12, 2026
@ashb

ashb commented Feb 12, 2026

Copy link
Copy Markdown
Member

Ptal @amoghrajesh

@amoghrajesh amoghrajesh requested a review from ashb February 12, 2026 10:21

@amoghrajesh amoghrajesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM +1 with one comment

Comment thread task-sdk/tests/task_sdk/execution_time/test_task_runner.py Outdated
@sarth-akvaish

Copy link
Copy Markdown
Contributor Author

Updated the PR

@amoghrajesh amoghrajesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM +1

@nathadfield

Copy link
Copy Markdown
Contributor

Is someone with merge powers prepared to press the button on this one?

@amoghrajesh amoghrajesh merged commit e0cd6e2 into apache:main Feb 23, 2026
101 checks passed
@amoghrajesh

Copy link
Copy Markdown
Contributor

@nathadfield done! Thank you!

@nathadfield

Copy link
Copy Markdown
Contributor

Thank you and thanks to @sarth-akvaish for the fix!

github-actions Bot pushed a commit that referenced this pull request Feb 23, 2026
(cherry picked from commit e0cd6e2)

Co-authored-by: Sarthak Vaish <108884904+sarth-akvaish@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-1-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-1-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Feb 23, 2026
(cherry picked from commit e0cd6e2)

Co-authored-by: Sarthak Vaish <108884904+sarth-akvaish@users.noreply.github.com>
vatsrahul1001 pushed a commit that referenced this pull request Mar 3, 2026
)

(cherry picked from commit e0cd6e2)

Co-authored-by: Sarthak Vaish <108884904+sarth-akvaish@users.noreply.github.com>
vatsrahul1001 pushed a commit that referenced this pull request Mar 4, 2026
)

(cherry picked from commit e0cd6e2)

Co-authored-by: Sarthak Vaish <108884904+sarth-akvaish@users.noreply.github.com>
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
Ankurdeewan pushed a commit to Ankurdeewan/airflow that referenced this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQuery SQL not extracted in Rendered Templates view

5 participants