Skip to content

Commit

Permalink
Merge pull request #17388 from michalszynkiewicz/grpc-devui-fixes
Browse files Browse the repository at this point in the history
gRPC Dev UI fixes
gsmet authored May 20, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 89fcb0b + e83ab26 commit 6fd054d
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -268,24 +268,23 @@ void definializeGrpcFieldsForDevMode(BuildProducer<BytecodeTransformerBuildItem>
}

@BuildStep
HealthBuildItem addHealthChecks(GrpcServerBuildTimeConfig config,
void addHealthChecks(GrpcServerBuildTimeConfig config,
List<BindableServiceBuildItem> bindables,
BuildProducer<HealthBuildItem> healthBuildItems,
BuildProducer<AdditionalBeanBuildItem> beans) {
boolean healthEnabled = false;
if (!bindables.isEmpty()) {
boolean healthEnabled = config.mpHealthEnabled;
healthEnabled = config.mpHealthEnabled;

if (config.grpcHealthEnabled) {
beans.produce(AdditionalBeanBuildItem.unremovableOf(GrpcHealthEndpoint.class));
healthEnabled = true;
}

if (healthEnabled) {
beans.produce(AdditionalBeanBuildItem.unremovableOf(GrpcHealthStorage.class));
}
return new HealthBuildItem("io.quarkus.grpc.runtime.health.GrpcHealthCheck",
config.mpHealthEnabled);
} else {
return null;
healthBuildItems.produce(new HealthBuildItem("io.quarkus.grpc.runtime.health.GrpcHealthCheck",
config.mpHealthEnabled));
}
if (healthEnabled || LaunchMode.current() == LaunchMode.DEVELOPMENT) {
beans.produce(AdditionalBeanBuildItem.unremovableOf(GrpcHealthStorage.class));
}
}

Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ public class GrpcServerRecorder {
private Map<String, List<String>> blockingMethodsPerService = Collections.emptyMap();

private static volatile DevModeWrapper devModeWrapper;
private static volatile List<GrpcServiceDefinition> services;
private static volatile List<GrpcServiceDefinition> services = Collections.emptyList();

public static List<GrpcServiceDefinition> getServices() {
return services;

0 comments on commit 6fd054d

Please sign in to comment.