Commit Graph

51 Commits

Author SHA1 Message Date
Eric Anderson f458f229c6
gradle: Update plugins 2023-05-08 10:45:13 -07:00
Eric Anderson 4229191a23 Move gcp-observability interop binary out of interop-testing
gcp-observability has many dependencies so is a bit annoying in some
build systems to get working... just for it not to be used in
non-observability scenarios.

grpc-go and c core are using separate binaries for gcp-observability
interop testing, so do the same in Java, which makes interop-testing a
bit lighter.
2023-03-07 10:57:38 -08:00
Stanley Cheung b55ecd5c35
GCP Observability Interop Testing Client/Server for Java (#9858) 2023-03-06 08:24:42 -08:00
Eric Anderson 61f19d707a
Swap Animalsniffer to Java 8 and Android 19
Also added missing signatures. Swapping to version catalog will make
this process easier in the future.
2022-08-10 12:41:57 -07:00
Eric Anderson 0e45e04041
Avoid accidental locale-sensitive String.format()
%s is fairly safe (requires a Formattable to use Locale), so %d is the
main risk item. Places that really didn't need to use String.format()
were converted to plain string concatenation. Logging locations were
generally converted to using the log infrastructure's delayed
formatting, which is generally locale-sensitive but we're okay with
that. That wasn't done in okhttp, however, because Android frequently
doesn't use MessageFormat so we'd lose the parameters. Everywhere else
was explicitly defined to be Locale.US, to be consistent independent of
the default system locale.
2022-07-19 14:41:34 -07:00
Eric Anderson 0ff9f37b9e Use Gradle's task configuration avoidance APIs
This can avoid creating an additional 736 tasks (previously 502 out of
1591 were not created). That's not all that important as the build time
is essentially the same, but this lets us see the poor behavior of the
protobuf plugin in our own project and increase our understanding of how
to avoid task creation when developing the plugin. Of the tasks still
being created, protobuf is the highest contributor with 165 tasks,
followed by maven-publish with 76 and appengine with 53. The remaining
59 are from our own build, but indirectly caused by maven-publish.
2022-07-08 12:16:40 -07:00
Terry Wilson 7bd0797496
all: Update netty to 4.1.77.Final and netty_tcnative to 2.0.53.Final (#9027)
all: Update netty to 4.1.77.Final and netty_tcnative to 2.0.53.Final

Also switches to a non-release version of rules_jvm_external to allow Bazel build to work with artifact classifiers.
2022-06-24 10:47:27 -07:00
Eric Anderson b06942d63b Use Gradle's version catalog
This moves our depedencies into a plain file that can be read and
updated by tooling. While the current tooling is not particularly better
than just using gradle-versions-plugin, it should put us on better
footing. gradle-versions-plugin is actually pretty nice, but will be
incompatible with Gradle 8, so we need to wait a bit to see what the
future holds.

Left libraries as an alias for libs to reduce the commit size and make
it easier to revert if we don't end up liking this approach.

We're using Gradle 7.3.3 where it was an incubating fetaure. But in
Gradle 7.4 is became stable.
2022-06-14 14:04:10 -07:00
Chengyuan Zhang f33658a6d7
Migrate away from Jcenter (#8111)
Replaces jcenter with mavenCentral.
2021-04-22 15:59:36 -07:00
Eric Anderson a547e23f5e Migrate users of ManagedChannelBuilder.{forTarget,forAddress} to ChannelCredentials 2020-10-07 13:58:37 -05:00
Sergii Tkachenko c29ad76dae Explain test value for flow control window 2020-09-02 14:51:39 -04:00
Eric Anderson 026673cff5 gradle: Fix Gradle 6 warnings
Most of these are easy "replace X with Y."

The CreateStartScripts changes were because the scripts were being included in
the output zip/tar multiple times. The was because they were all using the same
output directory, and the entire output directory was being included for each.
The output directory tmp/ was particularly poor because other tasks were
dumping things into it, so our zip/tar was including those junk files as well.
2020-07-31 09:52:36 -05:00
Eric Anderson 3a43abef7b
interop-testing: Use normal runtimeOnly dep for xds (#7200)
This prevents grpc-xds and its transitive dependencies from being included
twice in distTar and distZip, which reduces the size from 60 MB to 40 MB. It
does mean that interop-testing as a whole depends on xds, but that should not
be an issue any longer. It was an issue before we started providing grpc-xds on
Maven Central.
2020-07-14 13:25:40 -07:00
Eric Anderson dc30d85765 Swap to new Google Maven Central mirror URL
As seen at https://maven-central.storage.googleapis.com/index.html . The old
URL still has content, but apparently is no longer being updated. For example,
jetty-alpn-agent-2.0.10.pom is not present.
2020-07-10 08:45:49 -05:00
Eric Anderson cb5ceaaaa0 interop-testing: Add integration test for RetriableStream 2020-07-09 16:46:00 -05:00
ZHANG Dapeng 0044f8ce56
all: migrate gradle build to java-library plugin
- Use gradle configuration `api` for dependencies that are part of grpc public api signatures.
- Replace deprecated gradle configurations `compile`, `testCompile`, `runtime` and `testRuntime`.
- With minimal change in dependencies: If we need dep X and Y to compile our code, and if X transitively depends on Y, then our build would still pass even if we only include X as `compile`/`implementation` dependency for our project. Ideally we should include both X and Y explicitly as `implementation` dependency for our project, but in this PR we don't add the missing Y if it is previously missing.
2020-05-04 16:44:30 -07:00
ZHANG Dapeng 7be75a0bcb
all: let interop test use shaded dependency correctly take 2
First rolls forward #6791, then fixes the issue of missing transitive dependency for the shadow configuration.
2020-03-04 16:10:46 -08:00
ZHANG Dapeng 1df7d7ea8e
Revert "all: let interop test use shaded dependency correctly (#6780)"
This reverts commit c5f48b8e38.  (#6780)

Revert because caused a regression in the ALTS tests. https://source.cloud.google.com/results/invocations/691d9965-fea1-487d-b606-352a5234039e/targets/grpc%2Fcore%2Fpull_request%2Flinux%2Fgrpc_interop_toprod/log

2020-03-01 20:02:12,491 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/SystemUtils
at io.grpc.alts.CheckGcpEnvironment.isRunningOnGcp(CheckGcpEnvironment.java:69)
at io.grpc.alts.CheckGcpEnvironment.isOnGcp(CheckGcpEnvironment.java:44)
at io.grpc.alts.ComputeEngineChannelBuilder.(ComputeEngineChannelBuilder.java:62)
at io.grpc.alts.ComputeEngineChannelBuilder.forTarget(ComputeEngineChannelBuilder.java:72)
at io.grpc.alts.ComputeEngineChannelBuilder.forAddress(ComputeEngineChannelBuilder.java:77)
at io.grpc.testing.integration.TestServiceClient$Tester.createChannel(TestServiceClient.java:399)
at io.grpc.testing.integration.AbstractInteropTest.setUp(AbstractInteropTest.java:309)
at io.grpc.testing.integration.TestServiceClient.setUp(TestServiceClient.java:198)
at io.grpc.testing.integration.TestServiceClient.main(TestServiceClient.java:56)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.SystemUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
2020-03-02 10:22:50 -08:00
ZHANG Dapeng c5f48b8e38
all: let interop test use shaded dependency correctly (#6780) 2020-02-28 10:04:46 -08:00
Sourabh Sarvotham Parkala e5d1244004
okhttp: updating okhttp version from 2.5.0 to 2.7.4 2020-02-24 12:23:11 -08:00
Eric Anderson 3c3a823a81 Swap to Gradle's Plugin DSL for much of build
Examples and android projects were left unchanged. They can be changed
later.

No plugin versions were changed, to make this as non-functional of a
change as possible. Upgrading Gradle to 5.6 was necessary for
pluginManagement in settings.gradle.
2019-09-13 09:42:17 -07:00
Carl Mastrangelo 7657523b28
all: update to error prone 2.3.3 2019-06-05 15:28:43 -07:00
Nguyen Quang Huy 05d5e4802a doc: Change http to https for security links
For security, we should change http into https links.

Co-Authored-By: Nguyen Van Trung [trungnvfet@outlook.com](mailto:trungnvfet@outlook.com)
Signed-off-by: Nguyen Quang Huy [huynq0911@gmail.com](mailto:huynq0911@gmail.com)
2019-02-27 17:25:42 -08:00
Eric Anderson c2f8d83663
gae-interop-testing: Remove jdk7 test
GAE Java 7 is dead as of January 16.
https://cloud.google.com/appengine/docs/deprecations/java7
2019-01-24 08:54:47 -08:00
Jihun Cho 51ab5b9432
interop-testing: update test proto to match grpc-proto. (#5003)
Update test proto to match stubby4 test server / grpc-proto repo.
- Deprecated PayloadType since it only provide 1 option.
- Change test cases to ignore deprecated field in Payload
2018-10-30 11:16:25 -07:00
Eric Anderson c318b4e9d6 gae-interop-testing: Make gradlew properly relative 2018-08-17 18:23:06 -07:00
Eric Anderson 54c4cc1e30 gae-interop-testing: Always test the version just deployed 2018-08-17 18:23:06 -07:00
Eric Anderson f8d30afb20 Handle exceptions in after 2018-08-17 17:25:54 -07:00
Eric Anderson 778804f4c5 gae-interop-testing/jdk7: Cleanup after Assert/Assume 2018-08-17 17:25:54 -07:00
Spencer Fang 60461d3b01 gae-interop-testing: disable timeoutOnSleepingServer
The test is flakey and we have exhausted the obvious clues. Since the
impact of this is likely low, let's `@Ignore` it.

See #4626
2018-08-17 17:09:19 -07:00
zpencer 3bc6e314bd
gae-interop-testing: increase response verbosity (#4765)
for jdk7 include the passing test names in the order they were run
for both, include the JUL log output

The runner should always print http response
2018-08-17 10:09:22 -07:00
Spencer Fang 9aa53b589d buildscripts,gae-interop-testing: do not promote versions by default
Only the dummy-default version should ever be promoted. Test versions
should have no traffic routed to it, so that deletions are
simpler. Versions receiving traffic can not be deleted in GAE.
2018-08-16 15:03:03 -07:00
Spencer Fang b821cf13b0 buildscripts,gae-interop-testing: Hardcode service name
This simplifies the kokoro script and makes things consistent between
the gradle script behavior and kokoro behavior.
2018-08-16 15:03:03 -07:00
Eric Anderson 6ef5742b42
gae-interop-testing: Disable special_status_message
The server doesn't support Echo Status.
2018-07-30 09:19:47 -07:00
ZHANG Dapeng 5ce10f0146
all: add gradle format checker
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
2018-06-11 18:35:18 -07:00
Eric Anderson e085a0eca0 Bump to Gradle 4.7
The new jmh plugin fixes a warning for the newer version of Gradle.
The new AppEngine plugin still produces a warning, but updating it
anyway so people know that upgrading the plugin doesn't fix the problem.
The new android-maven plugin fixes a build problem with the newer
Gradle.

The Visual Studio fixes were necessary starting ~4.4.
https://github.com/gradle/gradle-native/issues/34#issuecomment-335222096
describes the change in behavior.

There's nothing immediately being used as part of this update. It's just
to keep us current and to get us over that Visual Studio change hump.
2018-05-17 15:46:21 -07:00
Carl Mastrangelo 60a0b0c471
all: normalize copyright header 2018-05-03 14:55:21 -07:00
zpencer 2347384256
GAE: call channel.shutdown() (#4274)
OkHttpClientInteropServlet and NettyClientInteropServlet both run the
@After method from AbstractInteropTest. Let's make sure we await
termination.

For the long lived channel test, do the cleanup in `destroy`.
2018-04-02 16:02:55 -07:00
zpencer 6b753bdc35
buildscripts: add explicit dependency on appengine SDK (#4269)
This fixes the following in GAE:
java.lang.ClassNotFoundException: com.google.appengine.api.ThreadManager
2018-03-26 15:34:17 -07:00
zpencer 066ad3ceac
buildscripts,travis: fetch from mvn with retries (#4140)
A band aid for #3284, to make its symptoms less noticeable.
2018-03-01 19:11:24 -08:00
zpencer 73f0fe1eca
gae: retry on exceptions too, not just on non 200OK (#3885) 2017-12-19 16:13:24 -08:00
zpencer b6f556c088
core,okhttp: bump census to 0.10.0 which should fix GAE issue (#3833) 2017-12-08 11:30:52 -08:00
Kun Zhang efcd134209
interop-testing: start a new server for each test method. (#3816)
By doing this we can isolate the Census records for each test, and
eliminate the trial-and-error workaround in AbstractInteropTest.

This is a preferred fix for #3777 and supersedes #3803
2017-12-01 13:08:03 -08:00
zpencer d080bae2a1
gae-interop-testing: kokoro script to run interop tests in GAE (#3731) 2017-11-29 11:20:15 -08:00
Eric Anderson 30fb844790 gae-interop-testing: Pin appengine library version
While using + is convenient, it prevents builds from being
deterministic which makes it hard/impossible to reproduce a historic
build or execution results.
2017-11-10 15:28:22 -08:00
zpencer 970785d82b
gae-interop-testing: create new instance per test for okhttp (#3698)
Without this, the test is flakey for some test methods. The flakiness
is probably caused by AbstractInteropTest and not due to gRPC itself.
2017-11-09 16:07:58 -08:00
zpencer 2d212646bc
gae-interop-testing: use ManagedChannelBuilder, abort if devserver (#3680)
Turns out the ManagedChannelBuilder was misbehaving because the
devserver launcher ignores the app's jdk7 configuration and uses
whatever jdk is in JAVA_HOME. This is the reason
GrpcUtil.IS_RESTRICTED_APPENGINE was wrong.

Changing JAVA_HOME to point to jdk7 reveals that devservers lack
conscrypt. Adding an explicit check to make sure the jdk7 test is not
running in a dev server.
2017-11-07 15:01:03 -08:00
zpencer 6827f53785
gae-interop-testing: concrete channel builders (#3678)
Do not rely on ManagedChannelBuilder to select the correct concrete
type; directly instantiate the required type.
2017-11-07 12:59:13 -08:00
zpencer 2999d24bc7
gae-interop-testing: disable serverInProcess tests (#3679)
Tests that require serverInProcess() will not work because the server
is remote.
2017-11-07 12:58:49 -08:00
Eric Anderson ac63eabe60 gae-interop-testing: Remove gradle wrappers
Since the projects are placed in the root settings.gradle, they are subprojects
and don't need their own gradlew. In addition, the gradle version used here is
a different version than elsewhere, which is asking for confusion.
2017-10-06 14:01:38 -07:00