Skip to content

[Python] Deflake TextIO footer test - #39668

Merged
claudevdm merged 1 commit into
apache:masterfrom
bvolpato:bvolpato/fix-textio-footer-flake
Aug 11, 2026
Merged

[Python] Deflake TextIO footer test#39668
claudevdm merged 1 commit into
apache:masterfrom
bvolpato:bvolpato/fix-textio-footer-flake

Conversation

@bvolpato

@bvolpato bvolpato commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #39639.

TextSinkTest.test_write_pipeline_footer let the runner choose its output shard count even though its assertions expect one trailing footer. Text sinks add the footer to every shard, so a multi-shard run leaves extra footer lines in the combined output.

Use one output shard for this test, matching the adjacent header test. Per-shard header and footer behavior remains covered by test_write_max_bytes_per_shard.

Reproduction

Setting num_shards=5 on current master reproduces the failure deterministically: four footer lines remain after the assertion removes the final footer.

Testing

  • Python 3.13 Gradle/tox targeted test
  • 20 consecutive targeted test runs
  • Related footer, header, max-records-per-shard, and max-bytes-per-shard tests

  • Linked the issue with Fixes #39639.
  • No CHANGES.md entry needed for a test-only change.
  • Change is small and does not require an ICLA.

@bvolpato
bvolpato marked this pull request as ready for review August 7, 2026 02:38
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @claudevdm for label python.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@claudevdm claudevdm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks

@claudevdm
claudevdm merged commit 53b03f6 into apache:master Aug 11, 2026
103 of 104 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.

[Failing Test]: Flake in apache_beam.io.textio_test.TextSinkTest testMethod=test_write_pipeline_footer

2 participants