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

Ci cache gradle #7

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/backend-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
./gradlew test -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }} -P${{ matrix.backend }} -PskipWebITs
-x :web:test -x :clients:client-python:test -x :flink-connector:test -x :spark-connector:test -x :spark-connector:spark-common:test
-x :spark-connector:spark-3.3:test -x :spark-connector:spark-3.4:test -x :spark-connector:spark-3.5:test
-x :spark-connector:spark-runtime-3.3:test -x :spark-connector:spark-runtime-3.4:test -x :spark-connector:spark-runtime-3.5:test
-x :spark-connector:spark-runtime-3.3:test -x :spark-connector:spark-runtime-3.4:test -x :spark-connector:spark-runtime-3.5:test --profile

- name: Upload integrate tests reports
uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,17 @@ protected void setupContainer() {

@Override
public void start() {
LOG.info("starting Doris container...");
long currentTime = System.currentTimeMillis();

super.start();
Preconditions.check("Doris container startup failed!", checkContainerStatus(5));
Preconditions.check("Doris container password change failed!", changePassword());

LOG.info(
"Doris[{}] start successfully in {}ms",
container.getDockerImageName(),
System.currentTimeMillis() - currentTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,15 @@ protected void setupContainer() {

@Override
public void start() {
LOG.info("starting Hive container...");
long currentTime = System.currentTimeMillis();

super.start();
Preconditions.check("Hive container startup failed!", checkContainerStatus(15));
LOG.info(
"Hive container[{}] start successfully in {}ms",
container.getDockerImageName(),
System.currentTimeMillis() - currentTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,16 @@ public static Builder builder() {

@Override
public void start() {
LOG.info("starting Kafka container...");
long currentTime = System.currentTimeMillis();

super.start();
Preconditions.checkArgument(checkContainerStatus(5), "Kafka container startup failed!");

LOG.info(
"Kafka container[{}] start successfully in {}ms",
container.getDockerImageName(),
System.currentTimeMillis() - currentTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,15 @@ protected void setupContainer() {

@Override
public void start() {
LOG.info("starting MySQL container...");
long currentTime = System.currentTimeMillis();

super.start();
Preconditions.check("MySQL container startup failed!", checkContainerStatus(5));
LOG.info(
"MySQL container[{}] start successfully in {}ms",
container.getDockerImageName(),
System.currentTimeMillis() - currentTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,15 @@ protected void setupContainer() {

@Override
public void start() {
LOG.info("starting Ranger container...");
long currentTime = System.currentTimeMillis();

super.start();
Preconditions.check("PostgreSQL container startup failed!", checkContainerStatus(5));
LOG.info(
"PostgreSQL container[{}] start successfully in {}ms",
container.getDockerImageName(),
System.currentTimeMillis() - currentTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,20 @@ protected void setupContainer() {

@Override
public void start() {
LOG.info("starting Ranger container...");
long currentTime = System.currentTimeMillis();

super.start();

rangerUrl = String.format("http://localhost:%s", this.getMappedPort(6080));
rangerClient = new RangerClient(rangerUrl, authType, username, password, null);

Preconditions.check("Ranger container startup failed!", checkContainerStatus(10));

LOG.info(
"Ranger container[{}] start successfully in {}ms",
container.getDockerImageName(),
System.currentTimeMillis() - currentTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,18 @@ protected void setupContainer() {

@Override
public void start() {
LOG.info("starting Trino container...");
long currentTime = System.currentTimeMillis();

super.start();

Preconditions.check("Initialization Trino JDBC connect failed!", initTrinoJdbcConnection());
Preconditions.check("Trino container startup failed!", checkContainerStatus(5));

LOG.info(
"Trino container[{}] start successfully in {}ms",
container.getDockerImageName(),
System.currentTimeMillis() - currentTime);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class TrinoITContainers implements AutoCloseable {
}

public void launch(int gravitinoServerPort) throws Exception {
LOG.info("starting Trino IT containers...");
long currentTime = System.currentTimeMillis();

shutdown();

Map<String, String> env = new HashMap<>();
Expand All @@ -56,6 +59,9 @@ public void launch(int gravitinoServerPort) throws Exception {
}

resolveServerAddress();

LOG.info(
"Trino IT containers start successfully in {}ms", System.currentTimeMillis() - currentTime);
}

private void resolveServerAddress() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public static void startIntegrationTest() throws Exception {
}

serverConfig = new ServerConfig();
long currentTime = System.currentTimeMillis();
if (testMode != null && testMode.equals(ITUtils.EMBEDDED_TEST_MODE)) {
MiniGravitinoContext context =
new MiniGravitinoContext(customConfigs, ignoreIcebergRestService);
Expand Down Expand Up @@ -235,6 +236,11 @@ public static void startIntegrationTest() throws Exception {
.until(() -> isHttpServerUp(checkServerUrl));
}

LOG.info(
"Gravitino {} server start successfully in {}ms",
testMode,
System.currentTimeMillis() - currentTime);

JettyServerConfig jettyServerConfig =
JettyServerConfig.fromConfig(serverConfig, WEBSERVER_CONF_PREFIX);

Expand Down
31 changes: 31 additions & 0 deletions integration-test/trino-it/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@
#
version: '3.0'
services:
hive-kerberos:
image: datastrato/gravitino-ci-kerberos-hive:0.1.2
networks:
- trino-net
container_name: trino-ci-hive-kerberos
environment:
- HADOOP_USER_NAME=root
entrypoint: /bin/bash /tmp/hive/init.sh
volumes:
- ./init/hive:/tmp/hive
- ../build/trino-ci-container-log/hive-kerberos:/tmp/root
- ../build/trino-ci-container-log/hdfs-kerberos:/usr/local/hadoop/logs
healthcheck:
test: ["CMD", "/tmp/check-status.sh"]
interval: 10s
timeout: 60s
retries: 10

doris:
image: datastrato/gravitino-ci-doris:0.1.4
networks:
- trino-net
container_name: trino-ci-doris
volumes:
- ../build/trino-ci-container-log/doris/fe:/opt/apache-doris/fe/log
- ../build/trino-ci-container-log/doris/be:/opt/apache-doris/be/log
healthcheck:
test: ["CMD", "mysql", "-uroot", "-P9030", "-h127.0.0.1", "-e", "select 1"]
interval: 10s
timeout: 60s
retries: 10

hive:
image: datastrato/gravitino-ci-hive:0.1.12
Expand Down
Loading