Fix ULR metadata propagation test flake#38437
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a flakiness issue in the MetadataPropagationTest by explicitly enabling metadata support in the WindowedValueCoder during test execution. This ensures that the test environment is correctly configured for metadata propagation, preventing intermittent failures. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request modifies MetadataPropagationTest.java to enable metadata support within the testMetadataPropagationParameter test case. The review feedback identifies a likely compilation error due to a typo in the class name and warns that modifying global static state within a test can lead to test interference and flakes, recommending the use of setup and teardown mechanisms for better isolation.
| @Test | ||
| @Category({ValidatesRunner.class, NeedsRunner.class}) | ||
| public void testMetadataPropagationParameter() { | ||
| WindowedValues.WindowedValueCoder.setMetadataSupported(); |
There was a problem hiding this comment.
| @Test | ||
| @Category({ValidatesRunner.class, NeedsRunner.class}) | ||
| public void testMetadataPropagationParameter() { | ||
| WindowedValues.WindowedValueCoder.setMetadataSupported(); |
There was a problem hiding this comment.
Setting global static state within a ValidatesRunner test can lead to test interference and flakes in other tests. Since this test is part of a suite that may run in parallel or in a shared JVM, consider using a setup/teardown mechanism (like @Before and @After) to ensure the state is properly initialized and reset, maintaining test isolation.
|
hi, #38431 was fixing flake for Prism, anything else is failing? |
@stankiewicz hi, yes it is a separate issue apart of that prism, PostCommit Java ValidatesRunner ULR is still failing on MetadataPropagationTest.testMetadataPropagationParameter (portable metadata/coder mismatch path), so that one needs its own fix |
|
can you give me log how it is failing on this test? |
2026-05-11T06:13:36Z > Task :runners:portability:java:ulrLoopbackValidatesRunnerTests org.apache.beam.sdk.coders.CoderException: java.io.EOFException: reached end of stream after reading 0 bytes; 8 bytes expected |
|
Do we still need this PR? The code change here is already in the master branch. The latest test runs on master branch is green. |
|
Assigning reviewers: R: @kennknowles for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Fixes: #33859
Successful run: https://github.com/apache/beam/actions/runs/25664543588
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.