Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove spring-boot from the feast serving application #2127

Merged
merged 7 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Remove verbose logging
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Dec 28, 2021
commit bf3269fe5e68853ea60557eb09eeaf0f914d7517
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@
import feast.serving.config.*;
import io.grpc.Server;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ServingGuiceApplication {
private static final Logger LOGGER = LoggerFactory.getLogger(ServingGuiceApplication.class);

public static void main(String[] args) throws InterruptedException, IOException {

LOGGER.info("Args: {}", args);
if (args.length == 0) {
throw new RuntimeException(
"Path to application configuration file needs to be specifed via CLI");
Expand Down
34 changes: 1 addition & 33 deletions java/serving/src/test/java/feast/serving/it/ServingBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import feast.proto.types.ValueProto;
import feast.serving.config.*;
import feast.serving.grpc.OnlineServingGrpcServiceV2;
import feast.serving.registry.RegistryFile;
import feast.serving.service.ServingServiceV2;
import feast.serving.util.DataGenerator;
import io.grpc.*;
import io.grpc.inprocess.InProcessChannelBuilder;
Expand All @@ -45,19 +43,14 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.DockerComposeContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.junit.jupiter.Testcontainers;

@Testcontainers
abstract class ServingBase {
public static final Logger logger = LoggerFactory.getLogger(ServingBase.class);

static DockerComposeContainer environment;

ServingServiceGrpc.ServingServiceBlockingStub servingStub;
Expand Down Expand Up @@ -129,22 +122,10 @@ ApplicationProperties applicationProperties() {
new InstrumentationConfig(),
appPropertiesModule);

logger.info("Created Injector");

OnlineServingGrpcServiceV2 onlineServingGrpcServiceV2 =
injector.getInstance(OnlineServingGrpcServiceV2.class);

for (final Map.Entry<Key<?>, Binding<?>> e : injector.getAllBindings().entrySet()) {
logger.info("{}: {}", e.getKey(), e.getValue());
}
logger.info("OnlineServingGrpcService: {}", onlineServingGrpcServiceV2);
logger.info("ServingService: {}", injector.getInstance(ServingServiceV2.class));

serverName = InProcessServerBuilder.generateName();
logger.info("Using server name: {}", serverName);

RegistryFile registryFile = injector.getInstance(RegistryFile.class);
logger.info("Registry File contents: {}", registryFile.getContent());

server =
InProcessServerBuilder.forName(serverName)
Expand All @@ -154,25 +135,12 @@ ApplicationProperties applicationProperties() {
.build();
server.start();

for (final ServerServiceDefinition def : server.getServices()) {
logger.info("Service Descriptor: {}", def.getServiceDescriptor().getName());
}

logger.info("Registered InProcess Server");

channel = InProcessChannelBuilder.forName(serverName).usePlaintext().directExecutor().build();

servingStub =
ServingServiceGrpc.newBlockingStub(channel)
.withDeadlineAfter(5, TimeUnit.SECONDS)
.withWaitForReady();
logger.info("Created Serving Stub: {}", servingStub);

ServingAPIProto.GetFeastServingInfoRequest req =
ServingAPIProto.GetFeastServingInfoRequest.newBuilder().build();
ServingAPIProto.GetFeastServingInfoResponse servingInfoResponse =
servingStub.getFeastServingInfo(req);
logger.info("Got servingInfoResponse: {}", servingInfoResponse);
}

@AfterEach
Expand Down Expand Up @@ -300,7 +268,7 @@ public void shouldGetOnlineFeaturesWithNotFoundStatus() {
}
}

@Disabled
@Test
public void shouldRefreshRegistryAndServeNewFeatures() throws InterruptedException {
updateRegistryFile(
registryProto
Expand Down