Skip to content

Support list indexing in nested template fields#63662

Open
Gautam-Bharadwaj wants to merge 5 commits intoapache:mainfrom
Gautam-Bharadwaj:fix-rtif-list-indexing
Open

Support list indexing in nested template fields#63662
Gautam-Bharadwaj wants to merge 5 commits intoapache:mainfrom
Gautam-Bharadwaj:fix-rtif-list-indexing

Conversation

@Gautam-Bharadwaj
Copy link
Contributor

@Gautam-Bharadwaj Gautam-Bharadwaj commented Mar 15, 2026

While working with nested template fields, I noticed that _get_nested_value logic only supports dictionary keys and object attributes. This is a limitation when users define sequences/lists in their operator's template fields. I've updated the logic to handle integer keys for list indexing (e.g., list.0).


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, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@uranusjr
Copy link
Member

Sounds reasonable to me. Can you add a test for this?

@Gautam-Bharadwaj
Copy link
Contributor Author

Gautam-Bharadwaj commented Mar 16, 2026

@uranusjr Thanks for the review! I've added unit tests for _get_nested_value covering dictionary keys, list indexing, and object attributes, as well as an integration test for RTIF. Ready for another look! 👋

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Mar 17, 2026
@Gautam-Bharadwaj
Copy link
Contributor Author

Hi @uranusjr ,@potiuk Sir,

Could you please take a look at this PR? If it looks good to you, please feel free to merge it.

Thanks in advance!

@Gautam-Bharadwaj
Copy link
Contributor Author

@uranusjr plz review this pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants