googleapis / gax-java

This library has moved to https://github.com/googleapis/sdk-platform-java/tree/main/gax-java.
https://github.com/googleapis/gapic-generator-java/tree/main/gax-java
BSD 3-Clause "New" or "Revised" License
162 stars 119 forks source link

feat: de-experiment google-c2p resolver #1896

Closed mohanli-ml closed 1 year ago

mohanli-ml commented 1 year ago

Change in grpc-java: https://github.com/grpc/grpc-java/blob/master/googleapis/src/main/java/io/grpc/googleapis/GoogleCloudToProdNameResolverProvider.java#L39.

@apolcyn

suztomo commented 1 year ago

@mohanli-ml Can you copy paste the error message?

mohanli-ml commented 1 year ago

Error message:

/usr/local/bin/bazel
2022/[11](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:12)/21 23:15:52 Downloading https://releases.bazel.build/5.3.2/release/bazel-5.3.2-linux-x86_64...
bazel 5.3.2
Extracting Bazel installation...
DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "f66073dee0bc159157b0bd7f502d7d1ee0bc76b3c1eac9836927511bdc4b3fc1"
DEBUG: Repository com_google_protobuf instantiated at:
  /home/runner/work/gax-java/gax-java/WORKSPACE:13:37: in <toplevel>
  /home/runner/work/gax-java/gax-java/repositories.bzl:51:11: in com_google_api_gax_java_repositories
  /home/runner/work/gax-java/gax-java/repositories.bzl:139:14: in _maybe
Repository rule http_archive defined at:
  /home/runner/.cache/bazel/_bazel_runner/708235df2b9026c2ff59e4840c097026/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
DEBUG: Rule 'io_grpc_grpc_java' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "e258976ca0404fc6a6113a50add56857062828458f6[12](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:13)85c1b43f0bfae305e9e"
DEBUG: Repository io_grpc_grpc_java instantiated at:
  /home/runner/work/gax-java/gax-java/WORKSPACE:[13](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:14):37: in <toplevel>
  /home/runner/work/gax-java/gax-java/repositories.bzl:60:11: in com_google_api_gax_java_repositories
  /home/runner/work/gax-java/gax-java/repositories.bzl:139:[14](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:15): in _maybe
Repository rule http_archive defined at:
  /home/runner/.cache/bazel/_bazel_runner/708235df2b9026c2ff59e4840c097026/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
DEBUG: Rule 'bazel_skylib' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "28f81e36692e1d87823623a99966b2daf85af3fdc1b40f98e37bd5294f3dd185"
DEBUG: Repository bazel_skylib instantiated at:
  /home/runner/work/gax-java/gax-java/WORKSPACE:13:37: in <toplevel>
  /home/runner/work/gax-java/gax-java/repositories.bzl:68:11: in com_google_api_gax_java_repositories
  /home/runner/work/gax-java/gax-java/repositories.bzl:139:14: in _maybe
Repository rule http_archive defined at:
  /home/runner/.cache/bazel/_bazel_runner/708235df2b9026c2ff59e4840c097026/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
DEBUG: /home/runner/.cache/bazel/_bazel_runner/708235df2b9026c2ff59e4840c097026/external/io_grpc_grpc_java/java_grpc_library.bzl:76:14: in srcs attribute of @io_grpc_grpc_java//grpclb:load_balancer_java_grpc: Proto source with label @io_grpc_grpc_proto//:grpclb_load_balancer_proto should be in same package as consuming rule
INFO: Analyzed 133 targets (170 packages loaded, 2851 targets configured).
INFO: Found 11 targets and 122 test targets...
INFO: From Compiling src/google/protobuf/message_lite.cc:
In file included from /usr/include/string.h:535,
                 from external/com_google_protobuf/src/google/protobuf/stubs/port.h:39,
                 from external/com_google_protobuf/src/google/protobuf/stubs/common.h:48,
                 from external/com_google_protobuf/src/google/protobuf/message_lite.h:46,
                 from external/com_google_protobuf/src/google/protobuf/message_lite.cc:36:
In function 'void* memcpy(void*, const void*, size_t)',
    inlined from 'uint8_t* google::protobuf::io::EpsCopyOutputStream::WriteRaw(const void*, int, uint8_t*)' at external/com_google_protobuf/src/google/protobuf/io/coded_stream.h:684:16,
    inlined from 'virtual uint8_t* google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(uint8_t*, google::protobuf::io::EpsCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/implicit_weak_message.h:103:28,
    inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/message_lite.cc:411:30:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' specified size between 1844674407[15](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:16)62067968 and 1844674407370955[16](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:17)15 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling src/google/protobuf/message_lite.cc [for host]:
In file included from /usr/include/string.h:535,
                 from external/com_google_protobuf/src/google/protobuf/stubs/port.h:39,
                 from external/com_google_protobuf/src/google/protobuf/stubs/common.h:48,
                 from external/com_google_protobuf/src/google/protobuf/message_lite.h:46,
                 from external/com_google_protobuf/src/google/protobuf/message_lite.cc:36:
In function 'void* memcpy(void*, const void*, size_t)',
    inlined from 'uint8_t* google::protobuf::io::EpsCopyOutputStream::WriteRaw(const void*, int, uint8_t*)' at external/com_google_protobuf/src/google/protobuf/io/coded_stream.h:684:16,
    inlined from 'virtual uint8_t* google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(uint8_t*, google::protobuf::io::EpsCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/implicit_weak_message.h:103:28,
    inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/message_lite.cc:411:30:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' specified size between [18](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:19)446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
FAIL: //gax:com.google.api.gax.retrying.ScheduledRetryingExecutorTest (see /home/runner/.cache/bazel/_bazel_runner/708235df2b9026c2ff59e4840c097026/execroot/com_google_api_gax_java/bazel-out/k8-fastbuild/testlogs/gax/com.google.api.gax.retrying.ScheduledRetryingExecutorTest/test.log)
INFO: From Testing //gax:com.google.api.gax.retrying.ScheduledRetryingExecutorTest:
==================== Test output for //gax:com.google.api.gax.retrying.ScheduledRetryingExecutorTest:
JUnit4 Test Runner
..................E............
Time: 5.[19](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:20)8
There was 1 failure:
1) testCancelOuterFutureAfterStart[Custom retry settings: true](com.google.api.gax.retrying.ScheduledRetryingExecutorTest)
java.lang.AssertionError
    at org.junit.Assert.fail(Assert.java:87)
    at org.junit.Assert.assertTrue(Assert.java:42)
    at org.junit.Assert.assertTrue(Assert.java:53)
    at com.google.api.gax.retrying.ScheduledRetryingExecutorTest.testCancelOuterFutureAfterStart(ScheduledRetryingExecutorTest.java:269)

FAILURES!!!
Tests run: 30,  Failures: 1

BazelTestRunner exiting with a return value of 1
JVM shutdown hooks (if any) will run now.
The JVM will exit once they complete.

-- JVM shutdown starting at [20](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:21)22-11-[21](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:22) 23:[22](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:23):[46](https://github.com/googleapis/gax-java/actions/runs/3518888871/jobs/5898273210#step:8:47) --

================================================================================
suztomo commented 1 year ago

Indeed testCancelOuterFutureAfterStart seems irrelevant. Retrying.

From "downstream / graalvm (22.2.0, 11, orgpolicy) "

com.google.api.gax.retrying.ScheduledRetryingExecutorTest > testCancelOuterFutureBeforeStart[Custom retry settings: false] FAILED
    org.mockito.exceptions.verification.NoInteractionsWanted: 
    No interactions wanted here:
    -> at com.google.api.gax.retrying.AbstractRetryingExecutorTest.testCancelOuterFutureBeforeStart(AbstractRetryingExecutorTest.java:247)
    But found this interaction on mock 'tracer':
    -> at com.google.api.gax.retrying.FailingCallable.call(FailingCallable.java:85)
    Actually, above is the only interaction with this mock.
        at app//com.google.api.gax.retrying.AbstractRetryingExecutorTest.testCancelOuterFutureBeforeStart(AbstractRetryingExecutorTest.java:247)
suztomo commented 1 year ago

All checks have passed

suztomo commented 1 year ago

@mohanli-ml When we release this change, do we need to wait for any change in the backend?

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

suztomo commented 1 year ago

Mohan told the backend works for both scheme.