Skip to content

Document native template rendering type coercion (#34641)#69152

Merged
potiuk merged 1 commit into
apache:mainfrom
deepujain:fix-34641-native-template-coercion
Jul 4, 2026
Merged

Document native template rendering type coercion (#34641)#69152
potiuk merged 1 commit into
apache:mainfrom
deepujain:fix-34641-native-template-coercion

Conversation

@deepujain

@deepujain deepujain commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Title: Document native template rendering type coercion (#34641)

Summary

Document that render_template_as_native_obj=True uses Jinja native rendering and can coerce numeric-looking strings into Python numbers. This keeps the current behavior intact while making the tradeoff clear in both the operator templating docs and the Params docs.

Changes

  • airflow-core/docs/core-concepts/operators.rst -- add a note that NativeEnvironment follows Python literal rules and can convert strings such as "42" to 42.
  • airflow-core/docs/core-concepts/params.rst -- add the same caution where typed Params and native template rendering are introduced.

Test plan

  • git diff --check
  • prek run --stage pre-commit --files airflow-core/docs/core-concepts/operators.rst airflow-core/docs/core-concepts/params.rst
  • CI passes
Was generative AI tooling used to co-author this PR?
  • Yes (OpenAI Codex)

Generated-by: OpenAI Codex following the guidelines

Fixes #34641

@shahar1 shahar1 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.

@deepujain please note that you (or your operator) should include AI attribution in the PR as we state in the AI guidelines.
This PR, as well as others, are blocked from being merged until this is corrected.
Please be warned that creating additional PRs except for the 10 you've already created (listed below) without addressing the above might cause in a permanent block from Apache organization on GitHub.

List of PRs:

@shahar1 shahar1 dismissed their stale review June 30, 2026 06:26

AI attribution addressed

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jul 2, 2026

@potiuk potiuk 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.

Docs-only — correct and useful caveat about native-template type coercion ("42" -> 42). Verified the diff. LGTM.

@potiuk potiuk added this to the Airflow 3.3.1 milestone Jul 4, 2026
@potiuk potiuk added the backport-to-v3-3-test Backport to v3-3-test label Jul 4, 2026
@potiuk potiuk merged commit b5a60ce into apache:main Jul 4, 2026
69 checks passed
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-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-3-test PR Link

potiuk pushed a commit that referenced this pull request Jul 5, 2026
…#69152) (#69389)

(cherry picked from commit b5a60ce)

Co-authored-by: Deepak Jain <deepujain@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v3-3-test Backport to v3-3-test kind:documentation ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jinja NativeEnvironment causing unexpected argument type change

3 participants