beam icon indicating copy to clipboard operation
beam copied to clipboard

[YAML] Add the ability to pre-process yaml files with jinja2.

Open robertwb opened this issue 10 months ago • 11 comments

This will allow Beam YAML to be used for various template applications.


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.

robertwb avatar Apr 15 '24 19:04 robertwb

R: @Polber @damccorm

robertwb avatar Apr 15 '24 19:04 robertwb

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

github-actions[bot] avatar Apr 15 '24 19:04 github-actions[bot]

isort wants to put jinja2 after apache_beam, e.g.

 import apache_beam as beam
+import jinja2

Not sure how to resolve that.

robertwb avatar Apr 15 '24 23:04 robertwb

RowCoderTest, YamlIntegration, and Docs issues seem pre-existing.

robertwb avatar Apr 16 '24 00:04 robertwb

Precommit failures look real? Its not failing on master, but I also don't see any relevant changes here - https://github.com/apache/beam/actions/workflows/beam_PreCommit_Python.yml?query=event%3Aschedule

damccorm avatar Apr 16 '24 20:04 damccorm

A merge to master seems to have resolved the row coder issues. Running a full suite of tests again.

robertwb avatar Apr 16 '24 22:04 robertwb

(resolved some conflicts and cleaned up CHANGES.md while at it)

damccorm avatar Apr 17 '24 13:04 damccorm

Oh whoops, missed https://github.com/apache/beam/pull/30976/commits/91d4dc1af683c87808048bc03ed180522b12c13d - thanks for catching

damccorm avatar Apr 17 '24 15:04 damccorm

So I'm still trying to figure out why these same tests pass in isolation ( https://github.com/apache/beam/actions/runs/8722508185/job/23928542728?pr=30976 ) but fail when all tests are enabled ( https://github.com/apache/beam/actions/runs/8724953372/job/23936757826?pr=30976 ) especially when this PR doesn't seem to even touch any related code. And I've been unable to reproduce this locally as well.

robertwb avatar Apr 17 '24 16:04 robertwb

Given the uncertainty with what's going on here, another option is to put the changes in to the dataflow template itself in the short term.

robertwb avatar Apr 17 '24 16:04 robertwb

Given the uncertainty with what's going on here, another option is to put the changes in to the dataflow template itself in the short term.

I'll draft up a PR for that

Polber avatar Apr 17 '24 17:04 Polber