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

Properly handle timestamp prefixing of unkown window types. #30587

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

robertwb
Copy link
Contributor

@robertwb robertwb commented Mar 8, 2024

This was exposed by #28972 when the set of "known" coders was inadvertently reduced.


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 robertwb requested a review from Abacn March 8, 2024 20:49
@robertwb
Copy link
Contributor Author

robertwb commented Mar 8, 2024

R: @Abacn

@github-actions github-actions bot added the python label Mar 8, 2024
@robertwb robertwb marked this pull request as draft March 8, 2024 20:50
Copy link
Contributor

github-actions bot commented Mar 8, 2024

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

This was exposed by apache#28972 when the set of "known" coders was
inadvertently reduced.
@robertwb robertwb force-pushed the unknown-window-coder branch from 4d71d6d to 8d8f294 Compare March 8, 2024 20:54
@robertwb robertwb marked this pull request as ready for review March 8, 2024 20:54
@shunping
Copy link
Contributor

Gentle ping on the review request. @Abacn

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

tested test_windowing_before_sql locally and passed

For curiosity, what caused the window being "unknown" for that specific test?

And after this change, it seems the window is still "unknown" but the timestamp value is accessible, or I understood it incorrectly?

@@ -538,6 +570,7 @@ def maybe_length_prefixed_and_safe_coder(self, coder_id):
spec=coder.spec, component_coder_ids=safe_component_ids))
return new_coder_id, safe_coder_id
else:
# A completely unkown coder. Wrap the entire thing in a length prefix.
Copy link
Contributor

Choose a reason for hiding this comment

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

I see, the bytes encountered in XVR_Direct test was due to here

@robertwb
Copy link
Contributor Author

tested test_windowing_before_sql locally and passed

For curiosity, what caused the window being "unknown" for that specific test?

Due to the environment nesting it didn't realize that "interval window" type was understood by all SDKs, so fell back to the generic/unknown wrapping.

And after this change, it seems the window is still "unknown" but the timestamp value is accessible, or I understood it incorrectly?

Yep, that's exactly it.

@robertwb robertwb merged commit 0bfe06b into apache:master Mar 13, 2024
72 checks passed
@Abacn
Copy link
Contributor

Abacn commented Mar 18, 2024

It seems this PR breaks Samza and Spark VR PostCommit, https://github.com/apache/beam/actions/workflows/beam_PostCommit_Python_ValidatesRunner_Samza.yml?query=event%3Aschedule and https://github.com/apache/beam/actions/workflows/beam_PostCommit_Python_ValidatesRunner_Spark.yml?query=event%3Aschedule

though Flink and Dataflow VR PostCommit remains green

Error message

test_custom_window_type (apache_beam.runners.portability.spark_runner_test.SparkRunnerTest) failed

E       RuntimeError: Pipeline test_custom_window_type_1710372598.7745032_87e88bc1-0f78-497a-b23a-02d9a534d8ac failed in state FAILED: java.lang.IllegalArgumentException: Unknown or unsupported WindowFn: beam:window_fn:pickled_python:v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants