beam icon indicating copy to clipboard operation
beam copied to clipboard

Add streaming test for Write API sink

Open AlexZMLyu opened this issue 3 years ago • 19 comments

Add streaming test for BigQuery Write API

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Choose reviewer(s) and mention them in a comment (R: @username).
  • [ ] 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

See CI.md for more information about GitHub Actions CI.

AlexZMLyu avatar Jun 15 '22 23:06 AlexZMLyu

Can one of the admins verify this patch?

asf-ci avatar Jun 15 '22 23:06 asf-ci

Can one of the admins verify this patch?

asf-ci avatar Jun 15 '22 23:06 asf-ci

Can one of the admins verify this patch?

asf-ci avatar Jun 15 '22 23:06 asf-ci

Can one of the admins verify this patch?

asf-ci avatar Jun 15 '22 23:06 asf-ci

Can one of the admins verify this patch?

asf-ci avatar Jun 15 '22 23:06 asf-ci

@chamikaramj Hi Cham, please kindly review the patch.

AlexZMLyu avatar Jun 15 '22 23:06 AlexZMLyu

R: @chamikaramj

yirutang avatar Jun 15 '22 23:06 yirutang

R: @pabloem

AlexZMLyu avatar Jun 21 '22 17:06 AlexZMLyu

Run Java PostCommit

pabloem avatar Jun 21 '22 17:06 pabloem

@AlexZMLyu please run ./gradlew :sdks:java:io:google-cloud-platform:spotlessApply to format the code and fix spotless issue

pabloem avatar Jun 21 '22 17:06 pabloem

Running postcommit that exercises these tests: https://ci-beam.apache.org/job/beam_PostCommit_Java_DataflowV1/1765/

pabloem avatar Jun 21 '22 17:06 pabloem

Talked to @pabloem offline. The TestStream class that I used here as the streaming source is not compatible with Dataflow runner. I will edit the code using the GenerateSequence and overriding the expand method to serve as the streaming source instead.

AlexZMLyu avatar Jun 21 '22 22:06 AlexZMLyu

TestStream should work fine on Runner v2, and is preferable.

robertwb avatar Jul 15 '22 19:07 robertwb

Robert, thanks for letting me know. Do I need to change my code to utilize the Runner V2?

AlexZMLyu avatar Jul 21 '22 18:07 AlexZMLyu

This test is disabled for Runner v2 currently: https://github.com/apache/beam/blob/67e6726ffeb47d2ada0122369fa230833ce0f026/runners/google-cloud-dataflow-java/build.gradle#L642

Trying to re-enable here: https://github.com/apache/beam/pull/21814

(you can try it on this PR similarly)

chamikaramj avatar Jul 21 '22 18:07 chamikaramj

Run PostCommit_Java_DataflowV2

AlexZMLyu avatar Jul 25 '22 17:07 AlexZMLyu

There was no failed test in https://ci-beam.apache.org/job/beam_PostCommit_Java_DataflowV2_PR/112/testReport/ Why the Dataflow V2 Java Post Commit Tests failed?

AlexZMLyu avatar Jul 25 '22 19:07 AlexZMLyu

Do I need to wait for approval of PR #21814 to run Runner v2 here?

AlexZMLyu avatar Aug 08 '22 20:08 AlexZMLyu

Run PostCommit_Java_DataflowV2

AlexZMLyu avatar Aug 08 '22 20:08 AlexZMLyu

Seems like Storage Write API tests are still failing for Runner v2: https://ci-beam.apache.org/job/beam_PostCommit_Java_DataflowV2_PR/111/testReport/junit/org.apache.beam.sdk.io.gcp.bigquery/BigQueryIOStorageWriteIT/testBigQueryStorageWrite30MProto/

So we can just get the Runner v1 version in (this PR).

chamikaramj avatar Aug 12 '22 00:08 chamikaramj

Retest this please

chamikaramj avatar Aug 12 '22 00:08 chamikaramj

Run PostCommit_Java_DataflowV1

chamikaramj avatar Aug 12 '22 00:08 chamikaramj

Run PostCommit_Java_Dataflow

chamikaramj avatar Aug 12 '22 00:08 chamikaramj

Run Java PreCommit

chamikaramj avatar Aug 12 '22 01:08 chamikaramj

Seems like the new tests failed the post-commit test suite: https://ci-beam.apache.org/job/beam_PostCommit_Java_DataflowV1_PR/124/

chamikaramj avatar Aug 12 '22 05:08 chamikaramj

Then I still need to change the streaming source from TestStream to something else, right?

AlexZMLyu avatar Aug 15 '22 21:08 AlexZMLyu

Yeah, I think it's probably ok to use GenerateSequence (a bounded source) for a simple integration test that use the streaming Runner v1. Separately we should check why this still failed for Runner v2.

chamikaramj avatar Aug 17 '22 02:08 chamikaramj

Run PostCommit_Java_DataflowV1

AlexZMLyu avatar Aug 30 '22 21:08 AlexZMLyu

Run PostCommit_Java_DataflowV1

AlexZMLyu avatar Sep 01 '22 18:09 AlexZMLyu

Run Spotless PreCommit

chamikaramj avatar Sep 13 '22 00:09 chamikaramj