Skip to content

[yaml] - expand jinja method#38547

Draft
derrickaw wants to merge 4 commits into
apache:masterfrom
derrickaw:20260518_expandJinja
Draft

[yaml] - expand jinja method#38547
derrickaw wants to merge 4 commits into
apache:masterfrom
derrickaw:20260518_expandJinja

Conversation

@derrickaw
Copy link
Copy Markdown
Collaborator

  1. Fixes [Task]: YAML - update expand_jinja method #35936
  2. Adds support for relative paths

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@derrickaw derrickaw force-pushed the 20260518_expandJinja branch 2 times, most recently from 3139622 to 064f8c2 Compare May 20, 2026 12:24
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 92.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.73%. Comparing base (e83a1d5) to head (064f8c2).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
sdks/python/apache_beam/yaml/yaml_transform.py 90.90% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #38547   +/-   ##
=========================================
  Coverage     58.72%   58.73%           
  Complexity     7418     7418           
=========================================
  Files          1649     1649           
  Lines        212354   212415   +61     
  Branches       6330     6330           
=========================================
+ Hits         124712   124763   +51     
- Misses        83097    83107   +10     
  Partials       4545     4545           
Flag Coverage Δ
python 79.89% <92.50%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@derrickaw
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for Jinja search paths and comment stripping in Beam YAML templates. Key changes include updating _BeamFileIOLoader to resolve relative paths using provided search paths and implementing strip_leading_comments to handle license headers in templates. Feedback highlights a missing shutil import in the new tests, suggests using os.path.isabs() for cross-platform path validation, and recommends avoiding bare exception handling when loading files.

Comment thread sdks/python/apache_beam/yaml/yaml_transform_test.py
Comment thread sdks/python/apache_beam/yaml/yaml_transform.py Outdated
Comment thread sdks/python/apache_beam/yaml/yaml_transform.py Outdated
@derrickaw derrickaw force-pushed the 20260518_expandJinja branch from 064f8c2 to 7a9ce50 Compare May 20, 2026 21:11
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.

[Task]: YAML - update expand_jinja method

1 participant