Commit Graph

66 Commits

Author SHA1 Message Date
Jihun Cho 1c3432c3fb
all: migrate gradle publish from maven to use maven-publish plugin (#5289) 2019-01-31 17:38:43 -08:00
Eric Anderson e06b941eb7 alts,services: Sync proto sources from grpc-proto
This syncs to grpc/grpc-proto@f9af5e19f7
2019-01-15 16:15:22 -08:00
Jiangtao Li 4d90b37a0a
ALTS: release handshaker channel if no longer needed (#5210)
* ALTS: release handshaker channel if no longer needed
2019-01-11 14:57:08 -08:00
Kun Zhang 1ed196c585
core: promote the new API in CallCredentials2 (#5216)
This is the 3rd step of #4901

- The deprecated `CC.applyRequestMetadata(... Attributes ...)` is now **replaced** by the new API `CC.applyRequestMetadata(... CC.MetadataApplier ...)` transformed from `CC2.applyRequestMetadata(... CC2.MetadataApplier ...)`.
- The Attributes keys in `CallCredentials` were deprecated, and now deleted.
- The deprecated interface `CC.MetadataApplier` is **replaced** by an equivalent abstract class.
- `CallCredentials2` is now marked as deprecated, while keeping its interface intact so that it won't break current implementations that are still on `CallCredentials2`.
- From this point on, implementations should do a one-line change from `extends CallCredentials2` to `extends CallCredentials`
- `GoogleAuthLibraryCallCredentials` is kept as `CallCredentials2` for now, as there is an internal consumer that expects it to be `CallCredentials2`.
2019-01-10 15:16:18 -08:00
Eric Anderson 4adcf24363
Downgrade to Guava 25.1
This is temporary for the 1.18 release to give users a bit more time to
get past the breaking changes to Beta APIs in Guava 26.

Fixes #5166
2019-01-08 16:22:48 -08:00
Eric Anderson e74576b85b Remove old BetaApi failure suppressions
We've been on newer versions of Guava for a while now; these no longer
do anything.

Reworded the comment for Stopwatch.createUnstarted(), because it is not
safe (it doesn't matter if the method isn't marked Beta; you have to use
Ticker), except for the fact it is only used in our tests.
2019-01-08 16:07:40 -08:00
ZHANG Dapeng df21e40285
all: fix lint 2019-01-02 15:28:44 -08:00
ZHANG Dapeng 49475c6759
alts: Fix ambiguous assertThat() in TsiFrameHandlerTest 2019-01-02 11:41:00 -08:00
Jihun Cho 9eeceab597
alts: TsiFrameHandler doesn't throw exception when flush after closed (#5180)
also, error / log messages will contain state of FrameHandler
2018-12-20 10:12:37 -08:00
Eric Anderson f1f3dbcbd6 alts: Fix SHARED_HANDSHAKER_CHANNEL after first close
Since the Resource shared the executor service between invocations, but
didn't null it out on shutdown, it could bring up a new channel with a
terminated event loop. The channel would then proceed to panic on usage.

I noticed this problem while looking into what was necessary for #4755.
2018-12-19 09:59:01 -07:00
Thomas Broyer 2ffc46d6fa Update net.ltgt.errorprone to 0.6 and enable Error Prone on JDK 10+ 2018-12-13 10:17:06 -08:00
Carl Mastrangelo 23dadaa85d
alts: add debugging statements for ALTS 2018-12-11 16:44:51 -08:00
Eric Anderson 03300cb2de alts: Eagerly add interceptor in GoogleDefaultChannelBuilder
This allows calling build() multiple times as well as prevents other
interceptors from being able to detect that we've implemented
CallCredential attachment via an interceptor. (Previously they could
have set their own CallCredentials which would have overridden the
default creds.)
2018-12-07 16:13:18 -08:00
Carl Mastrangelo 81121fd8e4
alts: make sure to always free frame protector 2018-11-28 11:52:27 -08:00
Kun Zhang 02f0dca8d4
Fix buildifier warnings (#5058) 2018-11-14 07:12:11 -08:00
Rodrigo Queiro 8481943866 Add missing j2objc dependency to Bazel build
This avoids a warning when building artifacts that depend on Guava.

Fixes #5046.
2018-11-13 13:39:35 -08:00
ZHANG Dapeng 41c8d8020f
all: fix lint 2018-10-23 14:03:46 -07:00
Jiangtao Li c8712877a1
alts: remove empty line in the proto (#4979) 2018-10-23 10:49:15 -07:00
Kun Zhang ade5c497f4
Revert "core: promote CallCredentials API v2. (#4952)" (#4983)
This reverts commit ef8a84421d.

Firebase is not yet ready to migrate to the new API. Will try again once we made the release and migrated them to CallCredentials2.
2018-10-22 16:43:37 -07:00
Carl Mastrangelo e757c7dea0
alts: update alts protos to match grpc-proto 2018-10-19 14:32:40 -07:00
Thomas Broyer 183e1f6735 all: update Error Prone to 2.3.2
This will allow enabling Error Prone on JDK 10+ (after
updating the net.ltgt.errorprone plugin), and is also a
prerequisite to that plugin update.

Also remove net.ltgt.apt plugin, as Gradle has native
support for annotationProcessor.
2018-10-19 13:08:36 -07:00
Jiangtao Li e6e3eb8420
alts: update handshaker proto (#4966) 2018-10-17 16:41:01 -07:00
Eric Anderson 959323be97
Add build support for Java 11
It appears everything was already working on Java 11, except
build-specific and testing issues. Updating to Netty 4.1.30 (#4940)
probably fixed the last true Java 11 incompatibility.

Fixes #4933
2018-10-17 11:49:30 -07:00
Kun Zhang ef8a84421d
core: promote CallCredentials API v2. (#4952)
This is Step 3 of #4901.  The old interface has been deprecated in the
latest release.  Now it's time to replace it with the new API.
2018-10-15 15:37:20 -07:00
Kun Zhang fbfc3a40d0
core: add Grpc.TRANSPORT_ATTR_LOCAL_ADDR (#4906)
Resolves #4135
2018-10-03 16:43:37 -07:00
Eric Anderson 99a2cac07a netty: Add ProtocolNegotiator.close
This notifies the negotiator when it will no longer be used, allowing it
to clean up any resources.
2018-10-03 08:48:35 -07:00
Kun Zhang ebbf8005be
doc: organize Attributes with annotations. (#4892)
* doc: organize Attributes Keys with annotations.

Keys are annotated with the following annotations:

1. Grpc.TransportAttr: transport attributes returned by
{Client,Server}Call.getAttributes().

2. NameResolver.ResolutionResultAttr: attributes passed as the
argument of NameResolver.Listener.onAddresses() and
LoadBalancer.handleResolvedAddressGroups()

3. EquivalentAddressGroup.Attr: attributes from
EquivalentAddressGroups.

* Expand the usage of annotations to Attributes variables.
2018-10-01 10:11:01 -07:00
Jesse Wilson 8b16899bc1 Upgrade to Guava 26.0-android and jsr305 3.0.2 2018-09-28 13:23:55 -07:00
Jiangtao Li 8e72351a65
alts: plumb authority to ALTS protocol negotiator (#4880)
alts: plumb authority to ALTS protocol negotiator
2018-09-27 19:27:45 -07:00
Eric Anderson 693779dba7
alts: Remove usage of TransportCreationParamsFilterFactory
Provide a ProtocolNegotiatorFactory instead.
TransportCreationParamsFilterFactory is being removed.
2018-09-24 17:32:04 -07:00
Eric Anderson 6f71472cf4 alts: Initialize ProtocolNegotiators eagerly
This simplifies the construction process, as we have fewer "interesting"
phases to weed through.
2018-09-17 16:49:56 -07:00
Carl Mastrangelo b0f423295b
all: use Java7 brackets 2018-09-14 13:52:29 -07:00
Eric Anderson 7efbc36c72 netty: Initialize ProtocolNegotiators eagerly
This simplifies the construction paradigm and leads to the eventual
removal of TransportCreationParamsFilterFactory. The eventual end goal
is to be able to shut down ProtocolNegotiators as is necessary for ALTS.

The only reason the initialization was delayed was for 'authority', so
we now plumb the authority through GrpcHttp2ConnectionHandler.
2018-09-12 08:16:54 -07:00
ZHANG Dapeng c8975e987b
all: fix lint warnings in import 2018-09-11 16:24:44 -07:00
zpencer 4d366ce978
all: move Channelz to io.grpc as InternalChannelz (#4797)
This is an API used to coordinate across packages and must live in
`io.grpc`.

Prepending `Internal` makes it easier to detect and hide this class
from public visibility when using certain build tools.

fixes #4796
2018-09-04 16:52:01 -07:00
Jiangtao Li 433ac00de4
alts: convert handshaker service channel to SharedResourceHolder (#4802)
alts: convert handshaker service channel to SharedResourceHolder
2018-08-29 10:09:09 -07:00
Jiangtao Li 87513d8e83
alts: if ALTS is not running on GCP, fails call (#4807)
alts: if ALTS is not running on GCP, fails call rather than RuntimeException
2018-08-29 08:59:16 -07:00
Jiangtao Li 8d6ba2335a
alts: add Google Default Channel implementation (#4742)
alts: add Google Default Channel implementation
2018-08-27 15:27:35 -07:00
Eric Anderson 3792242ae1
alts: Use grpc-netty-shaded instead of grpc-netty
There's no good way to provide users of ALTS a choice between grpc-netty
and grpc-netty-shaded. Since Netty is not exposed through the ALTS API
surface, we opt for the shaded version as it has fewer deployment
issues. However, this also means that we _can't_ expose any Netty API,
like EventLoopGroup.
2018-08-15 17:39:20 -07:00
Jiangtao Li 499f95d3ec
alts: add call credential security level attribute (#4657) 2018-07-19 10:55:22 -07:00
Carl Mastrangelo 146b6006b3
compiler,stub: update RpcMethod docs and usage 2018-07-12 17:01:47 -07:00
jbingham-google ffcb3b964b compiler, stub: Rename inputType and outputType in @RpcMethod 2018-07-10 13:24:50 -07:00
jbingham-google 9229e30287 compiler, stub: Add @RpcMethod annotation
This annotation will enable Java APT to generate code.

Addresses part of #3173.
2018-07-06 17:02:01 -07:00
Shohei Kamimori a20f4812d6 alts: de-flake AltsHandshakerStubTest
Intended to resolve #4291.
Previously AltsHandshakerStubTest.closeEarlyTest is flaky because it is async.
De-flake the test by removing executors.
2018-06-20 18:03:45 -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
Carl Mastrangelo 4c4fda3e5d
stub: remove static Method descriptors and stabilize method accessors 2018-06-05 11:19:28 -07:00
jiangtaoli2016 81f98af578 alts: add grpclb runtime 2018-05-24 14:05:01 -07:00
zpencer 21b73bbdc1
core: partially stabilize Attributes API (#4458)
Deprecate static builder method, Keys.of(), add a notice of plans to
remove keys(), emphasize that the name is only a debug label.
The `@ExperimentalAPI` is left on the class because there are still
issues around hashCode/equals.
2018-05-14 11:30:06 -07:00
Carl Mastrangelo 60a0b0c471
all: normalize copyright header 2018-05-03 14:55:21 -07:00
Carl Mastrangelo 6046831e58
alts: make imported files have imports below package, and set licence 2018-04-26 14:48:11 -07:00