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] propogate error_handling to windowing composite config #33443

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Polber
Copy link
Contributor

@Polber Polber commented Dec 23, 2024

There was a bug with pipeline-level windowing with transforms that define error_handling in which pipelines would fail with error:

Ambiguous output at line 16: Stream has outputs [None, 'errors']

This was due to a check to ensure a transform only outputs a "good" collection and optionally a collection defined by the named output in the error_handling config. Since the error_handling was not propagated to the top-level composite constructed as part of pipeline-level windowing, the check would fail.

Example affected pipeline:

pipeline:
  transforms:
    - type: ReadFromPubSub
      name: Stream
      config:
        topic: projects/pubsub-public-data/topics/taxirides-realtime
        format: json
        schema:
          type: object
          properties:
            ride_id: {type: string}
        error_handling:
          output: errors
    - type: LogForTesting
      name: Log messages
      input: Stream
    - type: LogForTesting
      name: Log errors
      config:
        level: INFO
      input: Stream.errors
  windowing:
    type: fixed
    size: 60
options:
  streaming: true

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 Dec 23, 2024

R: @robertwb

Copy link
Contributor

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

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 for finding and fixing this.

sdks/python/apache_beam/yaml/yaml_transform.py Outdated Show resolved Hide resolved
sdks/python/apache_beam/yaml/yaml_transform.py Outdated Show resolved Hide resolved
Signed-off-by: Jeffrey Kinard <[email protected]>
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.

3 participants