diff --git a/serving/src/test/java/feast/serving/it/BaseAuthIT.java b/serving/src/test/java/feast/serving/it/BaseAuthIT.java index bdbe432ed8e..be327814fe3 100644 --- a/serving/src/test/java/feast/serving/it/BaseAuthIT.java +++ b/serving/src/test/java/feast/serving/it/BaseAuthIT.java @@ -30,7 +30,7 @@ public class BaseAuthIT { static final String FEATURE_NAME = "feature_1"; static final String ENTITY_ID = "entity_id"; static final String PROJECT_NAME = "project_1"; - static final int CORE_START_MAX_WAIT_TIME_IN_MINUTES = 3; + static final int SERVICE_START_MAX_WAIT_TIME_IN_MINUTES = 3; static final String CLIENT_ID = "client_id"; static final String CLIENT_SECRET = "client_secret"; static final String TOKEN_URL = "http://localhost:4444/oauth2/token"; @@ -42,6 +42,8 @@ public class BaseAuthIT { static final String CORE = "core_1"; + static final String JOB_CONTROLLER = "jobcontroller_1"; + static final String HYDRA = "hydra_1"; static final int HYDRA_PORT = 4445; @@ -51,6 +53,8 @@ public class BaseAuthIT { static final int FEAST_CORE_PORT = 6565; + static final int FEAST_JOB_CONTROLLER_PORT = 6570; + @DynamicPropertySource static void properties(DynamicPropertyRegistry registry) { registry.add("feast.stores[0].name", () -> "online"); diff --git a/serving/src/test/java/feast/serving/it/ServingServiceOauthAuthenticationIT.java b/serving/src/test/java/feast/serving/it/ServingServiceOauthAuthenticationIT.java index e50693f8ac8..476b017c6e1 100644 --- a/serving/src/test/java/feast/serving/it/ServingServiceOauthAuthenticationIT.java +++ b/serving/src/test/java/feast/serving/it/ServingServiceOauthAuthenticationIT.java @@ -67,13 +67,18 @@ public class ServingServiceOauthAuthenticationIT extends BaseAuthIT { public static DockerComposeContainer environment = new DockerComposeContainer( new File("src/test/resources/docker-compose/docker-compose-it-hydra.yml"), - new File("src/test/resources/docker-compose/docker-compose-it-core.yml")) + new File("src/test/resources/docker-compose/docker-compose-it.yml")) .withExposedService(HYDRA, HYDRA_PORT, forHttp("/health/alive").forStatusCode(200)) .withExposedService( CORE, - 6565, + FEAST_CORE_PORT, Wait.forLogMessage(".*gRPC Server started.*\\n", 1) - .withStartupTimeout(Duration.ofMinutes(CORE_START_MAX_WAIT_TIME_IN_MINUTES))); + .withStartupTimeout(Duration.ofMinutes(SERVICE_START_MAX_WAIT_TIME_IN_MINUTES))) + .withExposedService( + JOB_CONTROLLER, + FEAST_JOB_CONTROLLER_PORT, + Wait.forLogMessage(".*gRPC Server started.*\\n", 1) + .withStartupTimeout(Duration.ofMinutes(SERVICE_START_MAX_WAIT_TIME_IN_MINUTES))); @BeforeAll static void globalSetup() throws IOException, InitializationError, InterruptedException { diff --git a/serving/src/test/java/feast/serving/it/ServingServiceOauthAuthorizationIT.java b/serving/src/test/java/feast/serving/it/ServingServiceOauthAuthorizationIT.java index 5f4b169d8d2..50111fcd155 100644 --- a/serving/src/test/java/feast/serving/it/ServingServiceOauthAuthorizationIT.java +++ b/serving/src/test/java/feast/serving/it/ServingServiceOauthAuthorizationIT.java @@ -72,16 +72,21 @@ public class ServingServiceOauthAuthorizationIT extends BaseAuthIT { public static DockerComposeContainer environment = new DockerComposeContainer( new File("src/test/resources/docker-compose/docker-compose-it-hydra.yml"), - new File("src/test/resources/docker-compose/docker-compose-it-core.yml"), + new File("src/test/resources/docker-compose/docker-compose-it.yml"), new File("src/test/resources/docker-compose/docker-compose-it-keto.yml")) .withExposedService(HYDRA, HYDRA_PORT, forHttp("/health/alive").forStatusCode(200)) .withExposedService( CORE, - 6565, + FEAST_CORE_PORT, Wait.forLogMessage(".*gRPC Server started.*\\n", 1) - .withStartupTimeout(Duration.ofMinutes(CORE_START_MAX_WAIT_TIME_IN_MINUTES))) + .withStartupTimeout(Duration.ofMinutes(SERVICE_START_MAX_WAIT_TIME_IN_MINUTES))) + .withExposedService( + JOB_CONTROLLER, + FEAST_JOB_CONTROLLER_PORT, + Wait.forLogMessage(".*gRPC Server started.*\\n", 1) + .withStartupTimeout(Duration.ofMinutes(SERVICE_START_MAX_WAIT_TIME_IN_MINUTES))) .withExposedService("adaptor_1", KETO_ADAPTOR_PORT) - .withExposedService("keto_1", KETO_PORT, forHttp("/health/ready").forStatusCode(200));; + .withExposedService("keto_1", KETO_PORT, forHttp("/health/ready").forStatusCode(200)); @DynamicPropertySource static void initialize(DynamicPropertyRegistry registry) { diff --git a/serving/src/test/resources/docker-compose/core/application-it.yml b/serving/src/test/resources/docker-compose/core/application-it.yml index 35f2ee54631..1298ff99055 100644 --- a/serving/src/test/resources/docker-compose/core/application-it.yml +++ b/serving/src/test/resources/docker-compose/core/application-it.yml @@ -1,12 +1,4 @@ feast: - jobs: - polling_interval_milliseconds: 30000 - job_update_timeout_seconds: 240 - active_runner: direct - runners: - - name: direct - type: DirectRunner - options: {} stream: type: kafka options: diff --git a/serving/src/test/resources/docker-compose/docker-compose-it-core.yml b/serving/src/test/resources/docker-compose/docker-compose-it.yml similarity index 76% rename from serving/src/test/resources/docker-compose/docker-compose-it-core.yml rename to serving/src/test/resources/docker-compose/docker-compose-it.yml index bb7cdce8abb..7f994e6d9e0 100644 --- a/serving/src/test/resources/docker-compose/docker-compose-it-core.yml +++ b/serving/src/test/resources/docker-compose/docker-compose-it.yml @@ -18,6 +18,20 @@ services: - -jar - /opt/feast/feast-core.jar - --spring.config.location=classpath:/application.yml,file:/etc/feast/application.yml + + jobcontroller: + image: gcr.io/kf-feast/feast-jobcontroller:latest + volumes: + - ./job-controller/application-it.yml:/etc/feast/application.yml + depends_on: + - kafka + ports: + - 6570:6570 + command: + - java + - -jar + - /opt/feast/feast-job-controller.jar + - --spring.config.location=classpath:/application.yml,file:/etc/feast/application.yml kafka: image: confluentinc/cp-kafka:5.2.1 diff --git a/serving/src/test/resources/docker-compose/job-controller/application-it.yml b/serving/src/test/resources/docker-compose/job-controller/application-it.yml new file mode 100644 index 00000000000..118ce378726 --- /dev/null +++ b/serving/src/test/resources/docker-compose/job-controller/application-it.yml @@ -0,0 +1,16 @@ +feast: + core-host: core + jobs: + enabled: true + polling_interval_milliseconds: 30000 + job_update_timeout_seconds: 240 + active_runner: direct + runners: + - name: direct + type: DirectRunner + options: {} + stream: + type: kafka + options: + topic: feast-features + bootstrapServers: "kafka:9092,localhost:9094" \ No newline at end of file