Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[yaml] Fix examples catalog tests #33027

Merged
merged 6 commits into from
Nov 13, 2024

Conversation

Polber
Copy link
Contributor

@Polber Polber commented Nov 5, 2024

This PR fixes a few tests in the YAML examples catalog, including enabling the Spanner tests which were previously excluded.

There are a couple of organizational changes including separating error_handling into a separate file. This was to allow LogForTesting to use the error_handling framework which is handy for examples tests that replace WriteTo transforms with LogForTesting ad-hoc that consume an error output of an upstream WriteTo transform.

This is also a prereq to #32289


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.

@Polber
Copy link
Contributor Author

Polber commented Nov 5, 2024

R: @robertwb

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@Polber Polber force-pushed the jkinard/fix-yaml-examples branch 2 times, most recently from 08cb64b to f6f87ac Compare November 7, 2024 18:24
Copy link
Contributor

@robertwb robertwb left a comment

Choose a reason for hiding this comment

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

Thanks.

@@ -876,8 +877,10 @@ def _parse_window_spec(spec):
return beam.WindowInto(window_fn)

@staticmethod
@beam.ptransform_fn
@maybe_with_exception_handling_transform_fn
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we expect this to every have errors (that we'd want to ignore)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only case for Python I can think of is if it is somehow not JSON parseable (Possibly a custom provider upstream that does not return Row)

For Java, I could see there being other issues (for starters, doesn't ERROR throw and exception when it logs?)

Regardless, this change was mostly for making it easier to hot-swap LogForTesting in example pipelines that define error_handling Write transforms. But I could also create a custom Log transform within the examples test file if you think that makes more sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, that's fine.

@robertwb
Copy link
Contributor

robertwb commented Nov 8, 2024

Looks like this needs a rebase.

Signed-off-by: Jeffrey Kinard <[email protected]>
Signed-off-by: Jeffrey Kinard <[email protected]>
Signed-off-by: Jeffrey Kinard <[email protected]>
Signed-off-by: Jeffrey Kinard <[email protected]>
Signed-off-by: Jeffrey Kinard <[email protected]>
@robertwb robertwb merged commit ab5c069 into apache:master Nov 13, 2024
91 checks passed
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.

2 participants