Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c11f45d
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie Aug 20, 2025
8486ac1
don't rename binder
jdcormie Aug 20, 2025
efd855f
ComponentName
jdcormie Aug 20, 2025
68535c1
Merge branch 'master' into isolated-process-2
jdcormie Aug 21, 2025
80eee58
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie Aug 20, 2025
6fd88de
Merge branch 'isolated-process-2' of https://github.com/jdcormie/grpc…
jdcormie Aug 28, 2025
643144c
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie Aug 20, 2025
aedc3bc
ComponentName
jdcormie Aug 20, 2025
6c73cca
Merge remote-tracking branch 'origin/master' into isolated-process-2
jdcormie Aug 28, 2025
ddf4f2f
Merge branch 'master' of https://github.com/grpc/grpc-java into isola…
jdcormie Aug 29, 2025
d9509b5
Upgrade guava version to 33.4.8 (#12219)
zrlw Aug 29, 2025
c208ab3
factor out the decorate() and wrap() calls common to all handshakes
jdcormie Aug 29, 2025
9746bb4
allow java21 in jre matrix (#12281)
shivaspeaks Sep 1, 2025
b339022
Remove org.apache.tomcat:annotations-api dep
ejona86 Sep 2, 2025
01f2862
xds: Pretty-print Resource in logs
ejona86 Aug 28, 2025
5a54372
android-interop-testing : Fix lint warnings in android-interop and bi…
Sangamesh1997 Sep 4, 2025
d4e1b69
otel: subchannel metrics A94 (#12202)
AgraVator Sep 8, 2025
b2a95ca
netty, okhttp: Add allow header for response code 405 (#12334)
JoeCqupt Sep 10, 2025
7d6ea28
Add a basic SocketStats with just the local and remote addresses. (#1…
jdcormie Sep 11, 2025
e91378c
binder: Only accept post-setup transactions from the server UID we ac…
jdcormie Sep 12, 2025
24e3ba1
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie Aug 20, 2025
9ff81d9
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie Aug 20, 2025
72024df
ComponentName
jdcormie Aug 20, 2025
0e2e9bc
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie Aug 20, 2025
b60b721
ComponentName
jdcormie Aug 20, 2025
883e471
factor out the decorate() and wrap() calls common to all handshakes
jdcormie Aug 29, 2025
9e86b35
Merge branch 'isolated-process-2' of https://github.com/jdcormie/grpc…
jdcormie Sep 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
jre: [8, 11, 17]
jre: [8, 11, 17, 21]
fail-fast: false # Should swap to true if we grow a large matrix

steps:
Expand Down
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
"com.google.auto.value:auto-value:1.11.0",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.11.0",
"com.google.errorprone:error_prone_annotations:2.30.0",
"com.google.errorprone:error_prone_annotations:2.36.0",
"com.google.guava:failureaccess:1.0.1",
"com.google.guava:guava:33.3.1-android",
"com.google.guava:guava:33.4.8-android",
"com.google.re2j:re2j:1.8",
"com.google.s2a.proto.v2:s2a-proto:0.1.2",
"com.google.truth:truth:1.4.2",
Expand All @@ -41,7 +41,7 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
"io.perfmark:perfmark-api:0.27.0",
"junit:junit:4.13.2",
"org.checkerframework:checker-qual:3.12.0",
"org.checkerframework:checker-qual:3.49.5",
"org.codehaus.mojo:animal-sniffer-annotations:1.24",
]
# GRPC_DEPS_END
Expand Down
1 change: 0 additions & 1 deletion alts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies {
libraries.guava.jre, // JRE required by protobuf-java-util from grpclb
libraries.google.auth.oauth2Http
def nettyDependency = implementation project(':grpc-netty')
compileOnly libraries.javax.annotation

shadow configurations.implementation.getDependencies().minus(nettyDependency)
shadow project(path: ':grpc-netty-shaded', configuration: 'shadow')
Expand Down
2 changes: 0 additions & 2 deletions android-interop-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ dependencies {
exclude group: 'com.google.guava'
}

compileOnly libraries.javax.annotation

androidTestImplementation 'androidx.test.ext:junit:1.1.3',
'androidx.test:runner:1.4.0'
}
Expand Down
7 changes: 4 additions & 3 deletions android-interop-testing/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<uses-permission android:name="android.permission.INTERNET" />
<!-- For UDS -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-sdk tools:overrideLibrary="io.grpc.android"/>

<application
Expand All @@ -16,8 +18,7 @@
android:name="androidx.multidex.MultiDexApplication">
<activity
android:name=".TesterActivity"
android:exported="true"
android:label="@string/app_name" >
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private void startTest(String testCase) {
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(
hostEdit.getWindowToken(), 0);
enableButtons(false);
resultText.setText("Testing...");
resultText.setText(R.string.testing_message);

String host = hostEdit.getText().toString();
String portStr = portEdit.getText().toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="text"
android:hint="Enter Host"
/>
<EditText
Expand Down
1 change: 1 addition & 0 deletions android-interop-testing/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<resources>
<string name="app_name">gRPC Integration Test</string>
<string name="testing_message">Testing…</string>
</resources>
5 changes: 5 additions & 0 deletions api/src/main/java/io/grpc/EquivalentAddressGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public final class EquivalentAddressGroup {
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/6138")
public static final Attributes.Key<String> ATTR_AUTHORITY_OVERRIDE =
Attributes.Key.create("io.grpc.EquivalentAddressGroup.ATTR_AUTHORITY_OVERRIDE");
/**
* The name of the locality that this EquivalentAddressGroup is in.
*/
public static final Attributes.Key<String> ATTR_LOCALITY_NAME =
Attributes.Key.create("io.grpc.EquivalentAddressGroup.LOCALITY");
private final List<SocketAddress> addrs;
private final Attributes attrs;

Expand Down
32 changes: 32 additions & 0 deletions api/src/main/java/io/grpc/LongUpDownCounterMetricInstrument.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 2025 The gRPC Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.grpc;

import java.util.List;

/**
* Represents a long-valued up down counter metric instrument.
*/
@Internal
public final class LongUpDownCounterMetricInstrument extends PartialMetricInstrument {
public LongUpDownCounterMetricInstrument(int index, String name, String description, String unit,
List<String> requiredLabelKeys,
List<String> optionalLabelKeys,
boolean enableByDefault) {
super(index, name, description, unit, requiredLabelKeys, optionalLabelKeys, enableByDefault);
}
}
41 changes: 41 additions & 0 deletions api/src/main/java/io/grpc/MetricInstrumentRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,47 @@ public LongCounterMetricInstrument registerLongCounter(String name,
}
}

/**
* Registers a new Long Up Down Counter metric instrument.
*
* @param name the name of the metric
* @param description a description of the metric
* @param unit the unit of measurement for the metric
* @param requiredLabelKeys a list of required label keys
* @param optionalLabelKeys a list of optional label keys
* @param enableByDefault whether the metric should be enabled by default
* @return the newly created LongUpDownCounterMetricInstrument
* @throws IllegalStateException if a metric with the same name already exists
*/
public LongUpDownCounterMetricInstrument registerLongUpDownCounter(String name,
String description,
String unit,
List<String> requiredLabelKeys,
List<String> optionalLabelKeys,
boolean enableByDefault) {
checkArgument(!Strings.isNullOrEmpty(name), "missing metric name");
checkNotNull(description, "description");
checkNotNull(unit, "unit");
checkNotNull(requiredLabelKeys, "requiredLabelKeys");
checkNotNull(optionalLabelKeys, "optionalLabelKeys");
synchronized (lock) {
if (registeredMetricNames.contains(name)) {
throw new IllegalStateException("Metric with name " + name + " already exists");
}
int index = nextAvailableMetricIndex;
if (index + 1 == metricInstruments.length) {
resizeMetricInstruments();
}
LongUpDownCounterMetricInstrument instrument = new LongUpDownCounterMetricInstrument(
index, name, description, unit, requiredLabelKeys, optionalLabelKeys,
enableByDefault);
metricInstruments[index] = instrument;
registeredMetricNames.add(name);
nextAvailableMetricIndex += 1;
return instrument;
}
}

/**
* Registers a new Double Histogram metric instrument.
*
Expand Down
25 changes: 24 additions & 1 deletion api/src/main/java/io/grpc/MetricRecorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ default void addDoubleCounter(DoubleCounterMetricInstrument metricInstrument, do
* Adds a value for a long valued counter metric instrument.
*
* @param metricInstrument The counter metric instrument to add the value against.
* @param value The value to add.
* @param value The value to add. MUST be non-negative.
* @param requiredLabelValues A list of required label values for the metric.
* @param optionalLabelValues A list of additional, optional label values for the metric.
*/
Expand All @@ -66,6 +66,29 @@ default void addLongCounter(LongCounterMetricInstrument metricInstrument, long v
metricInstrument.getOptionalLabelKeys().size());
}

/**
* Adds a value for a long valued up down counter metric instrument.
*
* @param metricInstrument The counter metric instrument to add the value against.
* @param value The value to add. May be positive, negative or zero.
* @param requiredLabelValues A list of required label values for the metric.
* @param optionalLabelValues A list of additional, optional label values for the metric.
*/
default void addLongUpDownCounter(LongUpDownCounterMetricInstrument metricInstrument,
long value,
List<String> requiredLabelValues,
List<String> optionalLabelValues) {
checkArgument(requiredLabelValues != null
&& requiredLabelValues.size() == metricInstrument.getRequiredLabelKeys().size(),
"Incorrect number of required labels provided. Expected: %s",
metricInstrument.getRequiredLabelKeys().size());
checkArgument(optionalLabelValues != null
&& optionalLabelValues.size() == metricInstrument.getOptionalLabelKeys().size(),
"Incorrect number of optional labels provided. Expected: %s",
metricInstrument.getOptionalLabelKeys().size());
}


/**
* Records a value for a double-precision histogram metric instrument.
*
Expand Down
18 changes: 16 additions & 2 deletions api/src/main/java/io/grpc/MetricSink.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,26 @@ default void addDoubleCounter(DoubleCounterMetricInstrument metricInstrument, do
* Adds a value for a long valued counter metric associated with specified metric instrument.
*
* @param metricInstrument The counter metric instrument identifies metric measure to add.
* @param value The value to record.
* @param value The value to record. MUST be non-negative.
* @param requiredLabelValues A list of required label values for the metric.
* @param optionalLabelValues A list of additional, optional label values for the metric.
*/
default void addLongCounter(LongCounterMetricInstrument metricInstrument, long value,
List<String> requiredLabelValues, List<String> optionalLabelValues) {
List<String> requiredLabelValues, List<String> optionalLabelValues) {
}

/**
* Adds a value for a long valued up down counter metric associated with specified metric
* instrument.
*
* @param metricInstrument The counter metric instrument identifies metric measure to add.
* @param value The value to record. May be positive, negative or zero.
* @param requiredLabelValues A list of required label values for the metric.
* @param optionalLabelValues A list of additional, optional label values for the metric.
*/
default void addLongUpDownCounter(LongUpDownCounterMetricInstrument metricInstrument, long value,
List<String> requiredLabelValues,
List<String> optionalLabelValues) {
}

/**
Expand Down
2 changes: 2 additions & 0 deletions api/src/main/java/io/grpc/StatusException.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
*/
public class StatusException extends Exception {
private static final long serialVersionUID = -660954903976144640L;
@SuppressWarnings("serial") // https://github.com/grpc/grpc-java/issues/1913
private final Status status;
@SuppressWarnings("serial")
private final Metadata trailers;

/**
Expand Down
2 changes: 2 additions & 0 deletions api/src/main/java/io/grpc/StatusRuntimeException.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
public class StatusRuntimeException extends RuntimeException {

private static final long serialVersionUID = 1950934672280720624L;
@SuppressWarnings("serial") // https://github.com/grpc/grpc-java/issues/1913
private final Status status;
@SuppressWarnings("serial")
private final Metadata trailers;

/**
Expand Down
1 change: 0 additions & 1 deletion authz/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies {
libraries.guava.jre // JRE required by transitive protobuf-java-util

annotationProcessor libraries.auto.value
compileOnly libraries.javax.annotation

testImplementation project(':grpc-testing'),
project(':grpc-testing-proto'),
Expand Down
1 change: 0 additions & 1 deletion benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ dependencies {
classifier = "linux-x86_64"
}
}
compileOnly libraries.javax.annotation

testImplementation libraries.junit,
libraries.mockito.core
Expand Down
13 changes: 11 additions & 2 deletions binder/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<queries>

<intent>
<action android:name="android.intent.action.VIEW" />
</intent>

</queries>

</manifest>
Loading
Loading