Commit Graph

441 Commits

Author SHA1 Message Date
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
Eric Anderson 3de7e74c57
xds: Build third-party protos in separate build step
This dramatically shortens build time, even for full builds. A full
assemble of xds on my laptop goes from 1m 46s to 33s at least because
errorprone is disabled for the protos.
2022-07-07 07:26:38 -07:00
sanjaypujare 6271bab20d
istio-interop-testing: create a separate project and add istio echo server code (#9321)
* istio-interop-testing: create a separate project and add istio echo server code
after removing from the grpc-interop-testing project

* add jib support

* use imported echo.proto from istio repo

* use context to propagate values from interceptor so the service's echo method has all values required to compose EchoResponse
2022-06-29 14:52:19 -07:00
yifeizhuang 377e3ce557
Start 1.49.0 development cycle (#9322) 2022-06-29 11:00:27 -07:00
Eric Anderson c1c69829db build.gradle: Clear Class-Path from shadowJar manifest
The generated Class-Path is simply wrong and it will actually be
attempted to be used at runtime.

Fixes #8606
2022-06-14 17:39:14 -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
Eric Anderson 5b825e8b17 Remove classifiers from ext.libraries
Classifier can't be specified in version catalog.
2022-06-14 14:04:10 -07:00
Eric Anderson 746cb15fdd Bump Guava to 31.1
error_prone_core itself was not upgraded, even though the annotations
were to keep the change minimal.
2022-06-06 16:15:43 -07:00
Eric Anderson 4d00e0cb02 xds: Remove unused Bouncy Castle dependency 2022-06-06 12:29:43 -07:00
Vladimir Chizhov 0490ced91c
Bump GSON to 2.9.0 (#9215) 2022-05-31 15:07:22 -07:00
Sergii Tkachenko 9cb3c6e688 Start 1.48.0 development cycle 2022-05-18 13:57:28 -07:00
DNVindhya 15ecc0714e
gcp-observability: add grpc-census as a dependency and update opencensus version (#9140) 2022-05-03 20:52:34 -07:00
sanjaypujare 41c027c11b
netty: implement UdsNameResolver and UdsNettyChannelProvider (#9113)
* netty: implement UdsNameResolver and UdsNettyChannelProvider
When the scheme is "unix:" we get the UdsNettyChannelProvider to
create a NettyChannelBuilder with DomainSocketAddress type and
other related params needed for UDS sockets
2022-05-02 16:41:50 -07:00
Eric Anderson 369f87becd Revert "auth: Add support for Retryable interface"
This reverts commit 0963f3151d. This
causes dependency problems when importing into Google, as
google-auth-library-java needs to be upgraded and that requires an
upgrade to google-http-java-client to bring in
https://github.com/googleapis/google-http-java-client/pull/1505 .
Reverting for now and will roll forward once those upgrades are
performed.
2022-04-27 15:38:13 -07:00
Eric Anderson 0963f3151d
auth: Add support for Retryable interface
Retryable was added in google-auth-library 1.5.3 to make clear the
situations that deserve a retry of the RPC. Bump to that version and
swap away from the imprecise IOException heuristic.
go/auth-correct-retry

Fixes #6808
2022-04-26 08:59:08 -07:00
Eric Anderson 4a137d6ef0 Start 1.47.0 development cycle 2022-04-11 10:41:33 -07:00
Carl Mastrangelo 6554061076
all: bump PerfMark to 0.25.0 (#8948) 2022-03-29 07:53:34 -07:00
Terry Wilson ec3db2b454
Start 1.46.0 development cycle (#8939) 2022-02-23 08:23:41 -08:00
Eric Anderson a8a81e709d
Bump Google Auth, Guava, Auto Value
The Google Auth version is getting quite old. The new version pulls in
newer Guava and Auto Value. Two require Java 8: Google Auth since 1.x,
Guava since 31.x. Google Auth only needs Auto Value 1.8.2, but this
bumps to the latest, so all three are at their latest versions.
2022-02-16 15:47:24 -08:00
nafeabd b35506b144
netty: Include both x86 and Arm64 epoll as dependency for grpc-netty-shaded 2022-02-09 13:21:36 -08:00
Eric Anderson 7cf048eb28
Drop Java 7 support
Oracle's Premier Support for Java 7 ended in July 2019. Per gRFC P5,
dropping support for the only release. Android is able to desugar many
Java 8 language features.
2022-01-18 07:17:51 -08:00
yifeizhuang 26f0d611db
Start 1.45.0 development cycle (#8825) 2022-01-12 12:08:22 -08:00
Eric Anderson 58a7ace6ac
Bump ErrorProne to 2.10.0
Previous versions of error prone were incompatible with Java 17 javac.

In grpc-api, errorprone is now api dependency because it is on a public
API.  I was happy to see that Gradle failed the build without the dep
change, although the error message wasn't super clear as to the cause.

It seems that previously -PerrorProne=false did nothing. I'm guessing
this is due to a behavior change of Gradle at some point. Swapping to
using the project does build without errorProne, although the build
fails with Javac complaining certain classes are unavailable. It's
unclear why. It doesn't seem to be caused by the error-prone plugin.
I've left it failing as a pre-existing issue.

ClientCalls/ServerCalls had Deprecated removed from some methods because
they were only deprecated in the internal class, not the API. And with
Deprecated, InlineMeSuggester complained.

I'm finding InlineMeSuggester to be overzealous, complaining about
package-private methods. In time we may figure out how to use it better,
or we may request changes to the checker in error-prone.
2022-01-12 12:06:27 -08:00
Eric Anderson 9e8375850b
build.gradle: Add missing dependsOn for generated code sync
When messing with error prone for another commit, Gradle started
producing a clear warning the dependsOn was missing. But the warning
was not reliable. However, even when no warning was printed it is clear
the task was broken.
2022-01-10 14:59:19 -08:00
sanjaypujare d7f951a9d8
all: update netty to 4.1.72.Final and tcnative to 2.0.46.Final (#8780) 2022-01-07 15:34:59 -08:00
Eric Anderson d44de5069d
Bump to Gradle 6.9 and update plugins
These changes make the build compatible with Gradle 7, except for
Android which requires plugin updates.

I removed animalsniffer from binder because it did nothing (as there
were no signatures) and it was failing after setting toolVersion. It
failed because animalsniffer is only compatible with java plugin. After
this change I put the withId(animalsniffer) loading inside the
withId(java) to avoid a plugin ordering failure. That made it safe again
for binder to load animalsniffer, but it is still best to remove the
plugin from binder as it is misleading.

I did not upgrade Android plugin versions as newer versions (even 3.6)
require dealing with androidx (#8421).
2022-01-07 09:54:50 -08:00
Eric Anderson 80c3be0f80
Bump protobuf to 3.19.2 2022-01-06 09:08:50 -08:00
Eric Anderson d9eb30cd92
Bump GSON to 2.8.9 2021-12-15 14:03:36 -08:00
Eric Anderson efd968bcbb Upgrade Protobuf to 3.19.1 and Guava to 30.1.1
Protobuf uses Guava 30.1.1, so I upgrade it at the same time. It also
caused an update to rules_jvm_external and reworking the Bazel build.
Protobuf no longer requires bind() so they were dropped. Although
Protobuf's protobuf_deps() brings in rules_jvm_external, and so we don't
need to define it ourselves, it seems better to define it directly and
not depend on transitive deps since we use it directly.

Protobuf now has support for maven_install() by exposing
PROTOBUF_MAVEN_ARTIFACTS, which required reorganizing the WORKSPACE to
use maven_install() after loading protobuf. Protobuf still doesn't
define target overrides for itself so we still maintain those. When
reorganizing the WORKSPACE I noticed http_archive should ideally be
above io_grpc_grpc_java as most users will need it there, so I fixed
that since there were lots of other load()-reordering already.
2021-12-09 10:35:39 -08:00
ZHANG Dapeng 65c00cf24e
Start 1.44.0 development cycle (#8729) 2021-11-30 11:53:56 -08:00
Sergii Tkachenko 6d41b4283a Start 1.43.0 development cycle 2021-10-20 13:47:03 -04:00
markb74 fcc7b9694e
Add LifecycleOnDestroyHelper to support shutdown of channel/server on Android lifecycle changes (#8568) 2021-09-29 20:04:47 +02:00
ZHANG Dapeng 25022f6846
dep: bump netty to 4.1.63.Final and tcnative to 2.0.38.Final (#8167)
Upgrade Netty. This should also resolve #7830.
2021-09-21 09:14:54 -07:00
Eric Anderson 1f1396f3f0 Start 1.42.0 development cycle 2021-09-08 09:10:20 -07:00
Kurt Alfred Kluever 46d47d52d9
Update error-prone to the latest release (2.9.0) (#8456)
required as a prerequisite to using `@InlineMe.`
2021-08-27 11:24:27 -07:00
yifeizhuang fddc6552b3
upgrade cronet to 92.4515.131 (#8445) 2021-08-24 14:58:14 -07:00
Eric Anderson 75691c8588 build.gradle: Remove non-standard MANIFEST.MF attributes
Including the build user's name doesn't provide much value and may
surprise some people. Built-JDK is actually wrong, as it is reporting
Gradle's Java version, not the javac version. And Source-/Target-
Compatibility isn't useful if nobody looks at it. Generally people just
look at the bytecode version itself, which is much more reliable and
doesn't have questions as to whether it should be '8' or '1.8'.
2021-08-02 14:14:02 -07:00
yifeizhuang 343eed1c04
Start 1.41.0 development cycle (#8351) 2021-07-28 15:27:55 -07:00
ZHANG Dapeng e980ebd118
Start 1.40.0 development cycle (#8263) 2021-06-16 08:04:43 -07:00
Eric Anderson 5642e01243
Replace failOnVersionConflict() with custom requireUpperBoundDeps
failOnVersionConflict has never been good for us. It is equivalent to
Maven dependencyConvergence which we discourage our users to use because
it is too tempermental and _creates_ version skew issues over time.
However, we had no real alternative for determining if our deps would be
misinterpeted by Maven.

failOnVersionConflict has been a constant drain and makes it really hard
to do seemingly-trivial upgrades. As evidenced by protobuf/build.gradle
in this change, it also caused _us_ to introduce a version downgrade.

This introduces our own custom requireUpperBoundDeps implementation so
that we can get back to simple dependency upgrades _and_ increase our
confidence in a consistent dependency tree.
2021-06-11 14:01:18 -07:00
Eric Anderson 29618a6bb6 Bump Protobuf to 3.17.2
Removed some references to the protobuf version from COMPILING.md and
compiler/README.md to make updates a tiny bit easier.
2021-06-07 11:20:48 -07:00
markb74 8e18c11bbd
binder: BinderTransport implementation. (#8031)
This is the first major code drop for binderchannel, containing the transport class and its internals.
2021-05-26 14:54:32 +02:00
Eric Gribkoff c0eca6de25
Start 1.39.0 development cycle (#8147) 2021-05-05 16:30:38 -07:00
Eric Anderson a81bf14f1f Upgrade to Guava 30.1, which warns on Java 7
This change can have large impact from two aspects:
1. It calls out a _large_ impact on the _few_ Java 7 users.
2. It may have _small_ impact on the _many_ Android users.

https://github.com/grpc/grpc-java/issues/4671 tracks gRPC's removal of
Java 7 support. We are quite eager to drop Java 7 support as that would
allow using new language features like default methods. Guava is also
dropping Java 7 support and starting in 30.1 it will warn when used on
Java 7. The purpose of the warning is to help discover users that are
negatively impacted by dropping Java 7 before it becomes a bigger
problem.

The Guava logging check was implemented in such a way that there is an
optional class that uses Java 8 bytecode. While the class is optional at
runtime, the Android build system notices when dexing and fails if
Java 8 language featutres are not enabled. We believe this will not be a
problem for most Android users, but they may need to add to their build:

```
android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
```

See also https://github.com/google/guava/releases/tag/v30.1
2021-04-19 09:16:00 -07:00
markb74 9fc32f1bc9
binder: Add LeakSafeOneWayBinder and tests. (#8021)
Another util class, this one with tests which need to run on
an Android emulator.
2021-03-31 17:39:10 +01:00
Sergii Tkachenko e4b292aa9b Start 1.38.0 development cycle 2021-03-25 18:49:03 -04:00
markb74 c6d48f7cb1
binder: Some basic binderchannel util code (#7796)
This just adds the ServiceBinding class and
BindServiceFlags, internal utils.

Most binderchannel code relies heavily on Java8 features,
so I'm keeping that requirement, since grpc-java plans to
require Java8 eventually anyway.
2021-03-24 15:40:11 -07:00
Eric Anderson 2140480736 Start 1.37.0 development cycle 2021-02-11 13:53:10 -08:00
Chengyuan Zhang 01ed082281
xds: clean up value-typed classes (#7863)
This change cleans up most value-typed classes in EnvoyProtoData, which represent immutable xDS configurations used in gRPC. This introduces AutoValue for reducing the amount of boilerplate code for pure data classes.

Not all value-typed classes in xDS have been migrated, some would need more invasive refactoring and would be done next. This change is a pure no-op refactoring. No behavior change should be introduced.

For more details, see PR description.
2021-02-05 12:48:38 -08:00
Elliotte Rusty Harold 43d2e53a2a
alts: Remove dependency on Apache commons lang 2021-01-06 10:05:44 -08:00