Skip to content

Commit af5b41e

Browse files
chore: clenaup dependencies, fix tests
1 parent 67c5149 commit af5b41e

File tree

6 files changed

+28
-25
lines changed

6 files changed

+28
-25
lines changed

.snyk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ ignore:
55
SNYK-JAVA-IONETTY-1042268:
66
- '*':
77
reason: No replacement available
8-
expires: 2021-12-31T00:00:00.000Z
8+
expires: 2022-03-31T00:00:00.000Z
99
patch: {}
1010

hypertrace-core-graphql-common-schema/src/main/java/org/hypertrace/core/graphql/common/schema/attributes/arguments/AttributeExpression.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.util.Optional;
99
import javax.annotation.Nonnull;
1010
import javax.annotation.Nullable;
11-
import lombok.AllArgsConstructor;
1211
import lombok.Value;
1312
import lombok.experimental.Accessors;
1413

hypertrace-core-graphql-gateway-service-utils/src/test/java/org/hypertrace/core/graphql/utils/gateway/AttributeExpressionConverterTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import static org.junit.jupiter.api.Assertions.assertEquals;
44
import static org.mockito.Mockito.when;
55

6-
import java.util.Optional;
76
import org.hypertrace.core.graphql.attributes.AttributeModel;
87
import org.hypertrace.core.graphql.common.request.AttributeAssociation;
98
import org.hypertrace.core.graphql.common.schema.attributes.arguments.AttributeExpression;
@@ -34,7 +33,7 @@ void convertsAttributeExpressionWithSubpath() {
3433
attributeExpressionConverter
3534
.convert(
3635
AttributeAssociation.of(
37-
this.mockAttribute, new AttributeExpression("tags", Optional.of("spantag"))))
36+
this.mockAttribute, new AttributeExpression("tags", "spantag")))
3837
.blockingGet());
3938
}
4039

hypertrace-core-graphql-platform/build.gradle.kts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ plugins {
55
dependencies {
66
constraints {
77

8-
api("org.hypertrace.core.grpcutils:grpc-context-utils:0.6.2")
9-
api("org.hypertrace.core.grpcutils:grpc-client-utils:0.6.2")
10-
api("org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.6.2")
11-
api("org.hypertrace.gateway.service:gateway-service-api:0.1.172-SNAPSHOT")
8+
api("org.hypertrace.core.grpcutils:grpc-context-utils:0.7.0")
9+
api("org.hypertrace.core.grpcutils:grpc-client-utils:0.7.0")
10+
api("org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.7.0")
11+
api("org.hypertrace.gateway.service:gateway-service-api:0.2.0")
1212
api("org.hypertrace.core.attribute.service:caching-attribute-service-client:0.13.6")
1313

1414
api("com.google.inject:guice:4.2.3")
@@ -21,12 +21,12 @@ dependencies {
2121
api("org.projectlombok:lombok:1.18.18")
2222
api("com.google.code.findbugs:jsr305:3.0.2")
2323
api("com.typesafe:config:1.4.1")
24-
api("com.google.guava:guava:30.1-jre")
24+
api("com.google.guava:guava:31.0.1-jre")
2525
api("com.graphql-java-kickstart:graphql-java-servlet:10.1.0")
26-
api("io.grpc:grpc-api:1.42.0")
27-
api("io.grpc:grpc-core:1.42.0")
28-
api("io.grpc:grpc-stub:1.42.0")
29-
api("io.grpc:grpc-context:1.42.0")
26+
api("io.grpc:grpc-api:1.43.1")
27+
api("io.grpc:grpc-core:1.43.1")
28+
api("io.grpc:grpc-stub:1.43.1")
29+
api("io.grpc:grpc-context:1.43.1")
3030
api("com.fasterxml.jackson.core:jackson-databind:2.12.6")
3131
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.6")
3232
api("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.6")
@@ -37,7 +37,7 @@ dependencies {
3737
}
3838

3939
runtime("org.apache.logging.log4j:log4j-slf4j-impl:2.17.1")
40-
runtime("io.grpc:grpc-netty:1.42.0")
40+
runtime("io.grpc:grpc-netty:1.43.1")
4141
runtime("io.netty:netty-codec-http2:4.1.71.Final")
4242
runtime("io.netty:netty-handler-proxy:4.1.71.Final")
4343
}

hypertrace-core-graphql-span-schema/src/test/java/org/hypertrace/core/graphql/span/dao/SpanLogEventRequestBuilderTest.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import org.hypertrace.core.graphql.spi.config.GraphQlServiceConfig;
4747
import org.hypertrace.core.graphql.utils.gateway.GatewayUtilsModule;
4848
import org.hypertrace.core.graphql.utils.grpc.GrpcChannelRegistry;
49-
import org.hypertrace.gateway.service.v1.common.ColumnIdentifier;
5049
import org.hypertrace.gateway.service.v1.common.Expression;
5150
import org.hypertrace.gateway.service.v1.common.Filter;
5251
import org.hypertrace.gateway.service.v1.common.LiteralConstant;
@@ -168,7 +167,7 @@ void testBuildRequest() {
168167
.setOperator(AND)
169168
.addChildFilter(
170169
Filter.newBuilder()
171-
.setLhs(buildUnaliasedSelection("spanId"))
170+
.setLhs(buildAliasedSelection("spanId"))
172171
.setOperator(IN)
173172
.setRhs(buildStringList("span1", "span2", "span3"))))
174173
.build();
@@ -208,7 +207,7 @@ void testBuildRequest_addSpanId() {
208207
.setOperator(AND)
209208
.addChildFilter(
210209
Filter.newBuilder()
211-
.setLhs(buildUnaliasedSelection("spanId"))
210+
.setLhs(buildAliasedSelection("spanId"))
212211
.setOperator(IN)
213212
.setRhs(buildStringList("span1", "span2", "span3"))))
214213
.build();
@@ -219,13 +218,10 @@ void testBuildRequest_addSpanId() {
219218

220219
Expression buildAliasedSelection(String name) {
221220
return Expression.newBuilder()
222-
.setColumnIdentifier(ColumnIdentifier.newBuilder().setColumnName(name).setAlias(name))
223-
.build();
224-
}
225-
226-
Expression buildUnaliasedSelection(String name) {
227-
return Expression.newBuilder()
228-
.setColumnIdentifier(ColumnIdentifier.newBuilder().setColumnName(name))
221+
.setAttributeExpression(
222+
org.hypertrace.gateway.service.v1.common.AttributeExpression.newBuilder()
223+
.setAttributeId(name)
224+
.setAlias(name))
229225
.build();
230226
}
231227

hypertrace-core-graphql-span-schema/src/test/java/org/hypertrace/core/graphql/span/dao/SpanLogEventResponseConverterTest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.stream.Collectors;
2222
import org.hypertrace.core.graphql.attributes.AttributeStore;
2323
import org.hypertrace.core.graphql.common.request.AttributeRequest;
24+
import org.hypertrace.core.graphql.common.request.AttributeRequestBuilder;
2425
import org.hypertrace.core.graphql.common.schema.attributes.arguments.AttributeExpression;
2526
import org.hypertrace.core.graphql.common.utils.BiConverter;
2627
import org.hypertrace.core.graphql.context.GraphQlRequestContext;
@@ -40,13 +41,15 @@ class SpanLogEventResponseConverterTest {
4041

4142
@Mock AttributeStore attributeStore;
4243
@Mock GraphQlRequestContext requestContext;
44+
@Mock AttributeRequestBuilder attributeRequestBuilder;
4345

4446
private SpanLogEventResponseConverter spanLogEventResponseConverter;
4547

4648
@BeforeEach
4749
void beforeEach() {
4850
spanLogEventResponseConverter =
49-
new SpanLogEventResponseConverter(attributeMapConverter, attributeStore);
51+
new SpanLogEventResponseConverter(
52+
attributeMapConverter, attributeStore, attributeRequestBuilder);
5053
}
5154

5255
@Test
@@ -56,6 +59,9 @@ void testBuildResponse() {
5659

5760
when(attributeStore.getForeignIdAttribute(any(), anyString(), anyString()))
5861
.thenReturn(Single.just(spanIdAttribute.attributeExpression().attribute()));
62+
when(attributeRequestBuilder.buildForAttribute(
63+
spanIdAttribute.attributeExpression().attribute()))
64+
.thenReturn(spanIdAttribute);
5965

6066
doAnswer(
6167
invocation -> {
@@ -86,6 +92,9 @@ void testBuildResponse_spanIdNotRequested() {
8692

8793
when(attributeStore.getForeignIdAttribute(any(), anyString(), anyString()))
8894
.thenReturn(Single.just(spanIdAttribute.attributeExpression().attribute()));
95+
when(attributeRequestBuilder.buildForAttribute(
96+
spanIdAttribute.attributeExpression().attribute()))
97+
.thenReturn(spanIdAttribute);
8998

9099
doAnswer(
91100
invocation -> {

0 commit comments

Comments
 (0)