damccorm opened a new pull request, #41795:
URL: https://github.com/apache/beam/pull/41795
Note: this PR was auto-generated by tooling. Before moving it out of draft,
the author has done a full review of the PR, specifically evaluating it on the
following criteria:
- The PR is an appropriate fix for the issue (e.g. we're not changing a test
to avoid a bug)
- The PR is a simple fix to the issue (e.g. we're not adding infra when we
could just modify a test)
- The PR is not covering for other problems (e.g. if we're bumping timeouts,
it is not because we're covering for a performance problem)
Full details of the methodology of generation and review can be found here -
https://docs.google.com/document/d/14lj7ECVov4T4EdwmIzNlWrRGE3lLDMOwX5xUMGzaLoc/edit?usp=sharing
If you have concerns with the PR or with the underlying methodology used to
generate this, please comment below - they will be addressed by the author not
the tooling :)
## Summary
Fixes intermittent batch-size assertion failures in
`BatchElementsTest.test_constant_batch_no_metrics` (and sibling
`test_constant_batch`) on `PrismRunner`, as seen in `PostCommit Python
Versions` (https://github.com/apache/beam/actions/runs/45284290949; note the
other failure in that run,
`PipeTest.test_pipes_csv_to_json_and_lists_the_files`, was already merged in
`#41488`).
## Root Cause
Both tests assert exact single-bundle batch sizes `equal_to([10, 10, 10,
5])` over 35 elements, but used `beam.Create(range(35))` with the default
`reshuffle=True`. On `PrismRunner`, the inserted `Reshuffle` can split elements
across multiple bundles, yielding smaller trailing batches per bundle instead
of `[10, 10, 10, 5]` (matching the pattern merged in `#41635` and
`test_windowed_batches` at `util_test.py:489`).
## Changes
- `sdks/python/apache_beam/transforms/util_test.py`: Pass `reshuffle=False`
to `beam.Create(range(35), reshuffle=False)` in `test_constant_batch` and
`test_constant_batch_no_metrics`.
### Verification
- Triggered `beam_PostCommit_Python_Versions.yml` workflow run on branch:
[`46472282227`](https://github.com/apache/beam/actions/runs/46472282227)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]