Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 45d8562

Browse files
authored
Revert "feat(bigtable): populate alts field in channel entry (#2702)"
This reverts commit 1bfb763.
1 parent 06f87ed commit 45d8562

3 files changed

Lines changed: 3 additions & 22 deletions

File tree

google-cloud-bigtable/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,6 @@
204204
<groupId>io.grpc</groupId>
205205
<artifactId>grpc-netty-shaded</artifactId>
206206
</dependency>
207-
<dependency>
208-
<groupId>io.grpc</groupId>
209-
<artifactId>grpc-alts</artifactId>
210-
</dependency>
211207
<dependency>
212208
<groupId>io.grpc</groupId>
213209
<artifactId>grpc-protobuf</artifactId>

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPool.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import io.grpc.Metadata;
3131
import io.grpc.MethodDescriptor;
3232
import io.grpc.Status;
33-
import io.grpc.alts.AltsContextUtil;
3433
import java.io.IOException;
3534
import java.time.Clock;
3635
import java.util.ArrayList;
@@ -566,8 +565,9 @@ static class Entry implements BigtableChannelObserver {
566565
}
567566

568567
void checkAndSetIsAlts(ClientCall<?, ?> call) {
569-
boolean currentIsAlts = AltsContextUtil.check(call);
570-
isAltsHolder.set(currentIsAlts);
568+
// TODO(populate ALTS holder)
569+
boolean result = false;
570+
isAltsHolder.compareAndSet(null, result);
571571
}
572572

573573
ManagedChannel getManagedChannel() {

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolTest.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import com.google.api.gax.grpc.ChannelFactory;
2323
import com.google.common.collect.Iterables;
24-
import io.grpc.Attributes;
2524
import io.grpc.CallOptions;
2625
import io.grpc.ClientCall;
2726
import io.grpc.ManagedChannel;
@@ -113,8 +112,6 @@ public void setUp() throws IOException {
113112
// Capture the listener when start is called
114113
// Configure mockClientCall.start to capture the listener
115114
doNothing().when(mockClientCall).start(listenerCaptor.capture(), any(Metadata.class));
116-
// Default to no ALTS context
117-
when(mockClientCall.getAttributes()).thenReturn(Attributes.EMPTY);
118115
}
119116

120117
private BigtableChannelPool.Entry getSingleEntry() {
@@ -236,16 +233,4 @@ public void testMixedRpcs() {
236233
assertThat(entry.getAndResetErrorCount()).isEqualTo(1); // The last failure
237234
assertThat(entry.totalOutstandingRpcs()).isEqualTo(0);
238235
}
239-
240-
@Test
241-
public void testNonAltsChannelReturnsFalse() {
242-
// empty attributes
243-
// cannot test true value as logic is complicated.
244-
// alts check looks at attributes.get(AltsProtocolNegotiator.AUTH_CONTEXT_KEY);
245-
when(mockClientCall.getAttributes()).thenReturn(Attributes.EMPTY);
246-
BigtableChannelPool.Entry entry = getSingleEntry();
247-
assertThat(entry.isAltsHolder.get()).isNull();
248-
startCall(unaryMethodDescriptor);
249-
assertThat(entry.isAltsChannel()).isFalse();
250-
}
251236
}

0 commit comments

Comments
 (0)