-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[BEAM-11205] Libraries-BOM 20.0.0 with gRPC and protobuf #14527
Conversation
Run Java_Examples_Dataflow PreCommit |
Run PythonLint PreCommit |
9f7e71f
to
8bcc6de
Compare
Run PythonLint PreCommit |
MetricsTest.java:450 has
Interestingly, the https://gist.github.com/suztomo/dafc42d93be94822a5c750aec7b5574f My first time to see such randomness in Java build. Cham is working on fixing the test. |
8bcc6de
to
2b36069
Compare
This comment has been minimized.
This comment has been minimized.
f1b6d20
to
7fe131c
Compare
...oud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImplTest.java
Outdated
Show resolved
Hide resolved
@@ -502,7 +502,9 @@ public void testGetSizeBytesWhenFileNotFoundBatchRetry() throws Exception { | |||
|
|||
// 429: Too many requests, then 200: OK. | |||
when(mockResponse.getStatusCode()).thenReturn(429, 200); | |||
when(mockResponse.getContent()).thenReturn(toStream("error"), toStream(content)); | |||
// Google-http-client:1.39.1 and above does not read content stream of the error response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be true unless disconnect is being called somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'll create a test case for google-http-java-client to verify this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turned out that it was mock setup that had wrong assumption that getStatusCode is called once per response.
317fbb0
to
779bb77
Compare
Run Java Postcommit |
Run GoPortable PreCommit |
Run Java_Examples_Dataflow PreCommit |
Run Python PreCommit |
Run PostCommit_Java_Hadoop_Versions |
Run PostCommit_Java_Dataflow |
Run PostCommit_Java_DataflowV2 |
Run Java HadoopFormatIO Performance Test |
Run BigQueryIO Streaming Performance Test Java |
Run Dataflow ValidatesRunner |
Run Java_Examples_Dataflow PreCommit |
Run PostCommit_Java_DataflowV2 |
34 successful checks! |
Run Java Precommit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up @suztomo Looking good!
Since google-http-client 1.39.1, it started to call getStatusCode twice per a response. However certain tests assumed that the method was called once per response and reused the same mock response object. The test shouldn't assume getStatusCode is called once per response. Therefore The tests that interact with multiple responses now prepare different mock objects for different responses.
The google-cloud-bigquerystorage 1.12.0 has old gax-httpjson version 0.78.0, which causes dependency conflicts. The libraries-bom 20.0.0 has google-cloud-bigquerystorage 1.17.0 but the version has removed a method used in Beam ( apache#14563). Unfortunatley even 1.17.0 does not have compatible version of gax-httpjson. Therefore, this commit fixes the dependency conflict by declaring newer gax-httpjson (version from the libraries-bom) on the sdks/java/io/google-cloud-platform module.
dedc6c3
to
f03a076
Compare
Run PostCommit_Java_DataflowV2 |
Run Java PostCommit |
Run PostCommit_Java_Dataflow |
Run Dataflow ValidatesRunner |
Run SQL Postcommit |
Run PythonDocker PreCommit |
Run Java_Examples_Dataflow PreCommit |
Run Portable_Python PreCommit |
Run PythonDocker PreCommit |
Run PostCommit_Java_Dataflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @suztomo ! LGTM
Let's just make sure that our Java tests are all passing, but feel free to merge after that.
@pabloem Thank you. All Java tests passed. (Portable_Python and PythonDocker have been failing in pull requests in this repo) |
Upgrading the libraries-bom version to 20.0.0 along with gRPC and protobuf.
Changes in mock object setup in failed tests
Some GCP-related tests failed. The latest google-http-client internally calls
getStatusCode()
twice per HTTP response. This change broke some tests where their mock setups had assumed that the method call occurs only once per request (and the tests were reusing the same mock response object for different responses). I updated the mock setup so that it now prepares different mock response objects for different responses.Linkage Check
No new linkage errors. https://gist.github.com/suztomo/ac11c74fb24ebb8ac0e11791a8be11a9
Initially it had problem with old gax-httpjson used by google-cloud-bigquerystorage (log). Declaring gax-httpjson as a dependency of google-cloud-platform module fixed the linkage errors.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.