Commit Graph

6024 Commits

Author SHA1 Message Date
sanjaypujare 7d9b76e330
examples: add an example for OAuth (#10560) 2023-09-18 09:56:16 -07:00
Larry Safran 6f09466edb
netty: Eliminate buffer release when there is an error as caller still owns the buffer. (#10537)
* netty: Eliminate buffer release when there is an error as caller still owns the buffer.
---------

Co-authored-by: Sergii Tkachenko <hi@sergii.org>
2023-09-15 15:18:03 -07:00
Larry Safran e1334eae7b
Change Round Robin and WeightedRoundRobin into petiole policies (#10528)
* Change Round Robin and WeightedRoundRobin into petiole policies
2023-09-15 10:27:36 -07:00
Terry Wilson 69986b542e COMPILING.md: Fix small typo 2023-09-14 12:03:20 -07:00
Eric Anderson 3eb5d20f6c servlet: Avoid lincheck for normal testing
It is slow, and just tries a bunch of possibilities. Leave it around for
developers to run locally, but it isn't precise enough to run on every
build. This change reduces the build of servlet in isolation by
1 minute. I suspect the gains are larger in a full grpc build because it
is very CPU-intensive; it uses 600% CPU on my 8-thread CPU when running
by itself.
2023-09-13 10:49:37 -07:00
John Cormie 134b0490d5
Enable indirect addressing using <intent-filter>s. (#10550)
AndroidComponentAddress now accepts an Intent with merely a package
restriction, not a full ComponentName. This lets clients avoid hard
coding Service class names that they don't control.

Fixes #9062
2023-09-12 17:27:35 -07:00
yifeizhuang 5f480de2ee
stub: enable throwing rejected execution exception on ThreadlessExecutor shutdown (#10555) 2023-09-12 13:41:15 -07:00
sanjaypujare 923ac60416
api: don't generate Java7 bytecode with Java 20+ (#10552)
Java 20+ don't support --release 7, so we just will use the default (8).
2023-09-11 13:41:50 -07:00
Eric Anderson b839b38b83 api: Add grpc-okhttp to suggestions if no server is available
Since 3b61799 OkHttp can support Grpc.newServerBuilderForPort().
2023-09-11 13:40:26 -07:00
yifeizhuang 6335e0be3e
core: DEADLINE_EXCEEDED gives hints for slow resolver (#10545) 2023-09-08 15:09:18 -07:00
yifeizhuang 75af7abf45
Update README etc to reference 1.58.0 (#10547) 2023-09-08 10:35:14 -07:00
Larry Safran 878e301a5c
netty: Respect io.netty.allocator.type="unpooled" when getting Netty Allocator (#10543)
Fixes #10292
2023-09-07 14:58:46 -07:00
Eric Anderson d4a163461a netty: Touch ByteBuf when message framing has been decoded
When a memory leak occurs, it is really helpful to have access records
to understand where the buffer was being held when it leaked. retain()
when we create the NettyReadableBuffer already creates an access record
the ByteBuf, so here we track when the ByteBuf is passed to another
thread.

See #8330
2023-09-07 13:15:22 -07:00
Eric Anderson 131a0047c4 netty: Use UNAVAILABLE for connections closed while writing
Fixes #10474 and b/273930962
2023-09-06 12:41:03 -07:00
Stephane Landelle cb2b68e39d core: only try to resolve InternalCensusStatsAccessor once 2023-09-06 11:12:04 -07:00
Stephane Landelle 22863dda38 netty: Use JUL instead of String.format 2023-09-06 11:12:04 -07:00
Eric Anderson 461dc85ba6 api: Make offload executor's purpose more clear
Blocking can be confused with the blocking stub, which is unrelated. I'm
purposefully not saying "it is used only for X," as that isn't what we
need from the API. But it is still helpful to users to describe the
sorts of things that use it.

Fixes #10508
2023-09-06 07:44:35 -07:00
kotlaja 9ab35b05de
java_grpc_library.bzl: Disable Automatic Exec Groups inside grpc libraries (#10514) 2023-09-05 17:21:10 -07:00
Terry Wilson 36e0af66fe
core: de-expermentalize pick first config parsing (#10531) 2023-08-30 15:40:34 -07:00
Terry Wilson b63e1579ed
testing: Stabilize TestMethodDescriptors (#10530) 2023-08-30 12:54:20 -07:00
Eric Anderson d15daed5e4 interop-testing: Modernize stress test channel creation
OverrideAuthority() is the modern alternative to rewriting the
InetAddress, and can also work if we change the channel creation to use
target strings instead. We can use test CAs now without resorting to the
Netty-specific APIs. After this change, only 4 classes in
interop-testing depend on Netty.
2023-08-25 16:55:46 -07:00
Larry Safran 92174be3df
Log warning message when server side gets exception writing message to stream and allow multiple closes (#10513)
* Use internalClose instead of close when sendMessage has a RuntimeException.
* Change argument to internalClose to a Throwable instead of a Status.
* Rename internalClose to handleInternalError
2023-08-24 16:40:23 -07:00
yifeizhuang 9424f8b4c7
Start 1.59.0 development cycle (#10519) 2023-08-24 11:25:28 -07:00
Terry Wilson 5559d54f5d
examples: Android helloworld to pass Google lint (#10518)
These changes allow the Android helloworld example to pass the lint
checks of the Google internal build system.
2023-08-24 10:37:53 -07:00
Larry Safran 3fad52129f
Fix aarch_64 macs not being able to build the compiler module. (#10516) 2023-08-23 14:58:11 -07:00
Terry Wilson 2b4f649b0a
android: Min SDK level to 21 (#10505)
Google Play has dropped support for SDK levels 19 and 20 and so can we.
2023-08-22 10:47:31 -07:00
Eric Anderson 1fc3649556 interop-testing: Correctly expose API types to dependents
Interop-testing is both binaries and a library. It hadn't been updated
to use java-library and to expose API-surface dependencies to
dependents.

This fixes the error:
```
> Task :grpc-gae-interop-testing-jdk8:javadoc FAILED
javadoc: error - An internal exception has occurred.
        (com.sun.tools.javac.code.Symbol$CompletionFailure: class file for io.grpc.internal.testing.StreamRecorder not found)
Please file a bug against the javadoc tool via the Java bug reporting page
(http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com)
for duplicates. Include error messages and the following diagnostic in your report. Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for io.grpc.internal.testing.StreamRecorder not found
1 error
```
2023-08-21 07:38:17 -07:00
Larry Safran 55c5040cb5
Remove ThreadlessExecutor from BlockingServerStream (#10496)
* Remove ThreadlessExecutor from BlockingServerStream

fixes #10490
2023-08-18 10:16:43 -07:00
yifeizhuang eb18cba062
stablize ServerBuilder.handshakeTimeout (#10499) 2023-08-18 10:13:34 -07:00
Eric Anderson ceadf6df6d Upgrade to Gradle 8.3
Examples are updated to use the new version as well, which wasn't done
last time in f3f4ed4ef. That noticed some things that were missed
before.
2023-08-18 09:59:57 -07:00
Eric Anderson 67f4eabb42 xds: In tests, verify WRR static stride does not iterate too many times 2023-08-18 09:59:33 -07:00
Terry Wilson d987fb10aa
api: ManagedChannelBuilder note about ipv6 scope id JDK bug. (#10503)
Adds a note on how to avoid a JDK bug by converting an ipv6 scope ID to
its numeric form.
2023-08-17 18:05:15 -07:00
Tony An 97f4f8687c
xds: WRR scheduler clips weights (#10480) 2023-08-17 17:11:55 -07:00
Terry Wilson 26be0c7665
buildscripts: add missing $GRADLE_FLAGS to enable AndroidX (#10504) 2023-08-17 16:32:23 -07:00
Terry Wilson beaeeefdd2
examples: Android examples to use AGP 7.4.0 (#10497)
- Upgrades AGP version to 7.4.0
- Upgrades appcomat to use AndroidX
- Updates the `android.sh` build script to set the `android.useAndroidX` flag
2023-08-17 11:24:42 -07:00
Eric Anderson b13a656f46
servlet: Support configuration avoidance in build
Instead of adding explicit dependsOn to compileJava and sourcesJar,
adding the sync task to the sourceSet automatically propagates the
dependency to all consumers of the code.
2023-08-17 10:19:20 -07:00
sanjaypujare 0fd4e3b122
api: stabilize ServerCall.getAuthority() by removing experimental annotation (#10498) 2023-08-16 18:40:18 -07:00
Sergii Tkachenko 2e95631b10
testing: Stabilize GrpcCleanupRule, GrpcServerRule (#10494)
Closes #2488.
2023-08-16 18:33:58 -07:00
Eric Anderson 3e44bbfe4a Exclude Internal classes from javadoc 2023-08-16 15:38:30 -07:00
yifeizhuang 5f34c600c4
okhttp: okhttp client and server transport should use padded length for flow control (#10422) 2023-08-16 15:12:19 -07:00
Tony An 93118f4075
API stabilization: getRequestMarshaller, getResponseMarshaller (#10495) 2023-08-16 15:04:49 -07:00
Terry Wilson be16afd213
Update README etc to reference 1.57.2 (#10491) 2023-08-16 13:39:38 -07:00
Eric Anderson e6c77a368a xds: Add missing ExperimentalApi to OrcaServiceImpl 2023-08-16 11:24:59 -07:00
Larry Safran f90656293f
Mark MultiChildLoadBalancer as Internal. (#10481)
* Mark MultiChildLoadBalancer as Internal.  Cannot move to the internal package because of its use of classes in the util package.

* Exclude MultiChildLoadBalancer from javadoc generation.

* Fix javadoc creation.
2023-08-15 17:33:23 -07:00
Eric Anderson b5d7f1394d xds: Fix import scripts deleting the wrong files, use of trap, and full git clone
The scripts used `git rev-parse --show-toplevel` so it appeared they
could be used from any directory. But references to "GIT_BASE_DIR"
weren't absolute, so it did matter the starting directory. And it
mattered in a big way for xds/import.sh as if you ran it from the
grpc-java directory it would delete the xds directory in grpc-java, not
third_party.

The trap that deleted the GIT_BASE_DIR was very broken. In addition to
potentially deleting the wrong directory, it was unnecessary because
that directory was in tmpdir. But you can only have one trap per signal,
so this unnecessary trap disabled the trap that deleted tmpdir.

The script needed a full clone because it needed to check out a specific
commit. To work with --depth 1 you have to use some convoluted syntax.
But just downloading a tar.gz is easy and seems should work fine on Mac.

protoc-gen-validate/import.sh didn't have the trap problem, but seemed
to have drifted from the other scritps. All the scripts were synced to
match.
2023-08-15 16:54:32 -07:00
Mohan Li 5850de2f5f
pick_first: de-experiment pick first (#10475) 2023-08-15 15:48:24 -07:00
Eric Anderson 9585bc948a build.gradle: Modernize japicmp confiuration
Even though we don't really use japicmp, the configuration was resolving
artifacts even when the task was not executed. After some clean up, the
configuration looks more ordinary.
2023-08-14 17:01:38 -07:00
Eric Anderson 849186ac35
examples: Add pre-serialized-message example (#10112)
This came out of the question #9707, and could be useful to others.
2023-08-14 17:00:29 -07:00
Tony An fba7835de1
new pick first policy, architectural change (#10354) 2023-08-14 15:23:40 -07:00
Eric Anderson 778c209751 java_grpc_library.bzl: Allow toolchain to use annotation processors
While not easy to use because java_grpc_library() uses a fixed
toolchain, it is possible for downstream users to apply a patch to the
repo to add their own annotation processors. This feature was added
inside Google so exporting it reduces the diff between internal and
external and causes no harm.

cl/280287611
2023-08-14 12:51:18 -07:00