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

Cleanup product test file names #23553

Merged
merged 2 commits into from
Sep 29, 2024
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,13 @@ private Environment getEnvironment()
// the test jar is hundreds MB and file system bind is much more efficient
.withFileSystemBind(testJar.getPath(), "/docker/test.jar", READ_ONLY)
.withFileSystemBind(cliJar.getPath(), "/docker/trino-cli", READ_ONLY)
.withCopyFileToContainer(forClasspathResource("docker/presto-product-tests/common/standard/set-trino-cli.sh"), "/etc/profile.d/set-trino-cli.sh")
.withCopyFileToContainer(forClasspathResource("docker/trino-product-tests/common/standard/set-trino-cli.sh"), "/etc/profile.d/set-trino-cli.sh")
.withEnv("JAVA_HOME", jdkProvider.getJavaHome())
.withCommand(ImmutableList.<String>builder()
.add(
jdkProvider.getJavaCommand(),
"-Xmx1g",
"-Djava.util.logging.config.file=/docker/presto-product-tests/conf/tempto/logging.properties",
"-Djava.util.logging.config.file=/docker/trino-product-tests/conf/tempto/logging.properties",
"-Duser.timezone=Asia/Kathmandu",
// https://bugs.openjdk.org/browse/JDK-8327134
"-Djava.security.manager=allow",
Expand All @@ -361,7 +361,7 @@ private Environment getEnvironment()
"-jar", "/docker/test.jar",
"--config", String.join(",", ImmutableList.<String>builder()
.add("tempto-configuration.yaml") // this comes from classpath
.add("/docker/presto-product-tests/conf/tempto/tempto-configuration-for-docker-default.yaml")
.add("/docker/trino-product-tests/conf/tempto/tempto-configuration-for-docker-default.yaml")
.add(CONTAINER_TEMPTO_PROFILE_CONFIG)
.add(environmentConfig.getTemptoEnvironmentConfigFile())
.add(container.getEnvMap().getOrDefault("TEMPTO_CONFIG_FILES", "/dev/null"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public final class DockerFiles
implements AutoCloseable
{
public static final String ROOT_PATH = "docker/presto-product-tests/";
public static final String ROOT_PATH = "docker/trino-product-tests/";

private static final Logger log = Logger.get(DockerFiles.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ private void addConfiguredFeaturesConfig()
catch (IOException e) {
throw new RuntimeException(e);
}
String temptoConfig = "/docker/presto-product-tests/conf/tempto/tempto-configured-features.yaml";
String temptoConfig = "/docker/trino-product-tests/conf/tempto/tempto-configured-features.yaml";
testContainer.withCopyFileToContainer(forHostPath(tempFile.getPath()), temptoConfig);
// add custom tempto config and configured_features to arguments if there are any other groups enabled
String[] commandParts = testContainer.getCommandParts();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static void configureTempto(Environment.Builder builder, ResourceProvider
builder.configureContainer(TESTS, dockerContainer -> {
Path path = configDir.getPath("tempto-configuration.yaml");
String suffix = getParentDirectoryName(path) + "-" + randomNameSuffix();
String temptoConfig = "/docker/presto-product-tests/conf/tempto/tempto-configuration-for-" + suffix + ".yaml";
String temptoConfig = "/docker/trino-product-tests/conf/tempto/tempto-configuration-for-" + suffix + ".yaml";
dockerContainer
.withCopyFileToContainer(forHostPath(path), temptoConfig)
.withEnv("TEMPTO_CONFIG_FILES", temptoConfigFiles ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void extendEnvironment(Environment.Builder builder)
CONTAINER_TEMPTO_PROFILE_CONFIG)
.withCopyFileToContainer(
forHostPath(configDir.getPath("cert/truststore.jks")),
"/docker/presto-product-tests/truststore.jks"));
"/docker/trino-product-tests/truststore.jks"));
}

public DockerContainer createClient(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void extendEnvironment(Environment.Builder builder)
"password=\"admin-secret\" " +
"user_admin=\"admin-secret\";")
.withEnv("ZOOKEEPER_SASL_ENABLED", "false")
.withClasspathResourceMapping("docker/presto-product-tests/conf/environment/multinode-kafka-sasl-plaintext/kafka_server_jaas.conf", "/tmp/kafka_server_jaas.conf", BindMode.READ_ONLY));
.withClasspathResourceMapping("docker/trino-product-tests/conf/environment/multinode-kafka-sasl-plaintext/kafka_server_jaas.conf", "/tmp/kafka_server_jaas.conf", BindMode.READ_ONLY));
builder.configureContainer(Kafka.SCHEMA_REGISTRY, container -> container
.withStartupAttempts(3)
.withStartupTimeout(Duration.ofMinutes(5))
Expand All @@ -63,7 +63,7 @@ public void extendEnvironment(Environment.Builder builder)
.withEnv("SCHEMA_REGISTRY_KAFKASTORE_SASL_JAAS_CONFIG", "org.apache.kafka.common.security.plain.PlainLoginModule required " +
"username=\"admin\" " +
"password=\"admin-secret\";")
.withClasspathResourceMapping("docker/presto-product-tests/conf/environment/multinode-kafka-sasl-plaintext/kafka_server_jaas.conf", "/tmp/kafka_server_jaas.conf", BindMode.READ_ONLY));
.withClasspathResourceMapping("docker/trino-product-tests/conf/environment/multinode-kafka-sasl-plaintext/kafka_server_jaas.conf", "/tmp/kafka_server_jaas.conf", BindMode.READ_ONLY));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void extendEnvironment(Environment.Builder builder)
.withEnv("KAFKA_SSL_CLIENT_AUTH", "required")
.withEnv("KAFKA_SECURITY_INTER_BROKER_PROTOCOL", "SSL")
.withEnv("KAFKA_SECURITY_PROTOCOL", "SSL")
.withClasspathResourceMapping("docker/presto-product-tests/conf/environment/multinode-kafka-ssl/secrets", "/etc/kafka/secrets", BindMode.READ_ONLY));
.withClasspathResourceMapping("docker/trino-product-tests/conf/environment/multinode-kafka-ssl/secrets", "/etc/kafka/secrets", BindMode.READ_ONLY));
builder.configureContainer(Kafka.SCHEMA_REGISTRY, container -> container
.withStartupAttempts(3)
.withStartupTimeout(Duration.ofMinutes(5))
Expand All @@ -73,7 +73,7 @@ public void extendEnvironment(Environment.Builder builder)
.withEnv("SCHEMA_REGISTRY_SSL_KEYSTORE_TYPE", "JKS")
.withEnv("SCHEMA_REGISTRY_SSL_KEY_PASSWORD", "confluent")
.withEnv("SCHEMA_REGISTRY_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM", "https")
.withClasspathResourceMapping("docker/presto-product-tests/conf/environment/multinode-kafka-ssl/secrets", "/var/private/ssl", BindMode.READ_ONLY));
.withClasspathResourceMapping("docker/trino-product-tests/conf/environment/multinode-kafka-ssl/secrets", "/var/private/ssl", BindMode.READ_ONLY));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public final class Standard
private static final int COLLECTOR_GRPC_PORT = 4317;

public static final String CONTAINER_HEALTH_D = "/etc/health.d/";
public static final String CONTAINER_CONF_ROOT = "/docker/presto-product-tests/";
public static final String CONTAINER_TRINO_ETC = CONTAINER_CONF_ROOT + "conf/presto/etc";
public static final String CONTAINER_CONF_ROOT = "/docker/trino-product-tests/";
public static final String CONTAINER_TRINO_ETC = CONTAINER_CONF_ROOT + "conf/trino/etc";
public static final String CONTAINER_TRINO_JVM_CONFIG = CONTAINER_TRINO_ETC + "/jvm.config";
public static final String CONTAINER_TRINO_SECRETS_CONFIG = CONTAINER_TRINO_ETC + "/secrets.toml";
public static final String CONTAINER_TRINO_ACCESS_CONTROL_PROPERTIES = CONTAINER_TRINO_ETC + "/access-control.properties";
Expand All @@ -79,7 +79,7 @@ public final class Standard
* @deprecated please use {@link EnvironmentContainers#configureTempto} instead.
*/
@Deprecated
public static final String CONTAINER_TEMPTO_PROFILE_CONFIG = "/docker/presto-product-tests/conf/tempto/tempto-configuration-profile-config-file.yaml";
public static final String CONTAINER_TEMPTO_PROFILE_CONFIG = "/docker/trino-product-tests/conf/tempto/tempto-configuration-profile-config-file.yaml";

private final DockerFiles dockerFiles;
private final PortBinder portBinder;
Expand Down Expand Up @@ -122,7 +122,7 @@ public void extendEnvironment(Environment.Builder builder)
}

builder.addContainers(createTrinoCoordinator(), createTestsContainer());
// default catalogs copied from /docker/presto-product-tests
// default catalogs copied from /docker/trino-product-tests
builder.addConnector("blackhole");
builder.addConnector("jmx");
builder.addConnector("system");
Expand Down Expand Up @@ -180,7 +180,7 @@ private DockerContainer createTrinoCoordinator()
private DockerContainer createTestsContainer()
{
return new DockerContainer("ghcr.io/trinodb/testing/almalinux9-oj17:" + imagesVersion, TESTS)
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath()), "/docker/presto-product-tests")
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath()), "/docker/trino-product-tests")
.withCommand("bash", "-xeuc", "echo 'No command provided' >&2; exit 69")
.waitingFor(new WaitAllStrategy()) // don't wait
.withStartupCheckStrategy(new IsRunningStartupCheckStrategy());
Expand All @@ -192,14 +192,14 @@ public static DockerContainer createTrinoContainer(DockerFiles dockerFiles, File
DockerContainer container = new DockerContainer(dockerImageName, logicalName)
.withNetworkAliases(logicalName + ".docker.cluster")
.withExposedLogPaths("/var/trino/var/log", "/var/log/container-health.log")
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath()), "/docker/presto-product-tests")
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath("conf/presto/etc/jvm.config")), CONTAINER_TRINO_JVM_CONFIG)
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath("conf/presto/etc/secrets.toml")), CONTAINER_TRINO_SECRETS_CONFIG)
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath()), "/docker/trino-product-tests")
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath("conf/trino/etc/jvm.config")), CONTAINER_TRINO_JVM_CONFIG)
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath("conf/trino/etc/secrets.toml")), CONTAINER_TRINO_SECRETS_CONFIG)
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath("health-checks/trino-health-check.sh")), CONTAINER_HEALTH_D + "trino-health-check.sh")
// the server package is hundreds MB and file system bind is much more efficient
.withFileSystemBind(serverPackage.getPath(), "/docker/presto-server.tar.gz", READ_ONLY)
.withEnv("JAVA_HOME", jdkProvider.getJavaHome())
.withCommand("/docker/presto-product-tests/run-presto.sh")
.withCommand("/docker/trino-product-tests/run-presto.sh")
.withStartupCheckStrategy(new IsRunningStartupCheckStrategy())
.waitingForAll(forLogMessage(".*======== SERVER STARTED ========.*", 1), forHealthcheck())
.withStartupTimeout(Duration.ofMinutes(5));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public String getHadoopBaseImage()
@Override
public String getTemptoEnvironmentConfigFile()
{
return "/docker/presto-product-tests/conf/tempto/tempto-configuration-for-hms-only.yaml";
return "/docker/trino-product-tests/conf/tempto/tempto-configuration-for-hms-only.yaml";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void extendEnvironment(Environment.Builder builder)
container.setDockerImageName(dockerImageName);
container.withCopyFileToContainer(
forHostPath(getCoreSiteOverrideXml()),
"/docker/presto-product-tests/conf/environment/multinode-azure/core-site-overrides.xml");
"/docker/trino-product-tests/conf/environment/multinode-azure/core-site-overrides.xml");
container.withCopyFileToContainer(
forHostPath(configDir.getPath("apply-azure-config.sh")),
CONTAINER_HADOOP_INIT_D + "apply-azure-config.sh");
Expand All @@ -106,7 +106,7 @@ public void extendEnvironment(Environment.Builder builder)
.withEnv("ABFS_ACCOUNT", abfsAccount)
.withEnv("ABFS_ACCESS_KEY", abfsAccessKey));

String temptoConfig = "/docker/presto-product-tests/conf/tempto/tempto-configuration-abfs.yaml";
String temptoConfig = "/docker/trino-product-tests/conf/tempto/tempto-configuration-abfs.yaml";
builder.configureContainer(TESTS, container -> container
.withEnv("ABFS_CONTAINER", abfsContainer)
.withEnv("ABFS_ACCOUNT", abfsAccount)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ public void extendEnvironment(Environment.Builder builder)
builder.configureContainer(HADOOP, container -> {
container.withCopyFileToContainer(
forHostPath(getCoreSiteOverrideXml(containerGcpCredentialsFile)),
"/docker/presto-product-tests/conf/environment/multinode-gcs/core-site-overrides.xml");
"/docker/trino-product-tests/conf/environment/multinode-gcs/core-site-overrides.xml");
container.withCopyFileToContainer(
forHostPath(getHiveSiteOverrideXml(gcpStorageBucket)),
"/docker/presto-product-tests/conf/environment/multinode-gcs/hive-site-overrides.xml");
"/docker/trino-product-tests/conf/environment/multinode-gcs/hive-site-overrides.xml");
container.withCopyFileToContainer(
forHostPath(dockerFiles.getDockerFilesHostPath("conf/environment/multinode-gcs/apply-gcs-config.sh")),
CONTAINER_HADOOP_INIT_D + "apply-gcs-config.sh");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void extendEnvironment(Environment.Builder builder)
builder.configureContainer(TESTS, container -> container
.withCopyFileToContainer(
forHostPath(configDir.getPath("secrets")),
"/docker/presto-product-tests/conf/tempto/secrets"));
"/docker/trino-product-tests/conf/tempto/secrets"));
}

private void addCatalogs(DockerContainer container)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void extendEnvironment(Environment.Builder builder)
builder.configureContainer(MINIO_CONTAINER_NAME, container ->
container.withCopyFileToContainer(forHostPath(minioBucketDirectory), "/data/" + S3_SPOOLING_BUCKET));

String temptoConfig = "/docker/presto-product-tests/conf/tempto/tempto-configuration-spooling.yaml";
String temptoConfig = "/docker/trino-product-tests/conf/tempto/tempto-configuration-spooling.yaml";
builder.configureContainer(TESTS, testContainer -> {
testContainer
.withCopyFileToContainer(forHostPath(configDir.getPath("tempto-configuration.yaml")), temptoConfig)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void configureTrinoContainer(DockerContainer container, String role)
container
.withCopyFileToContainer(
forHostPath(configDir.getPath("secrets.toml")),
"/docker/presto-product-tests/conf/presto/etc/secrets.toml")
"/docker/trino-product-tests/conf/trino/etc/secrets.toml")
.withCopyFileToContainer(
forHostPath(configDir.getPath("generateSecrets.sh")),
"/docker/presto-init.d/generateSecrets.sh")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void extendEnvironment(Environment.Builder builder, Map<String, String> e
private void configureCompatibilityTestContainer(Environment.Builder builder, Config config)
{
boolean java22 = config.getCompatibilityTestVersion() >= 447;
String jvmConfig = java22 ? "conf/presto/etc/jvm.config" : "conf/presto/etc/jvm-pre-jdk22.config";
String jvmConfig = "conf/trino/etc/" + (java22 ? "jvm.config" : "jvm-pre-jdk22.config");
String dockerImage = config.getCompatibilityTestDockerImage();
String containerConfigDir = getConfigurationDirectory(dockerImage);
DockerContainer container = new DockerContainer(dockerImage, COMPATIBILTY_TEST_CONTAINER_NAME)
Expand All @@ -78,7 +78,7 @@ private void configureCompatibilityTestContainer(Environment.Builder builder, Co
.withCopyFileToContainer(forHostPath(configDir.getPath(getConfigFileFor(dockerImage))), containerConfigDir + "config.properties")
.withCopyFileToContainer(forHostPath(configDir.getPath(getHiveConfigFor(dockerImage))), containerConfigDir + "catalog/hive.properties")
.withCopyFileToContainer(forHostPath(configDir.getPath(getIcebergConfigFor(dockerImage))), containerConfigDir + "catalog/iceberg.properties")
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath()), "/docker/presto-product-tests")
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath()), "/docker/trino-product-tests")
.withStartupCheckStrategy(new IsRunningStartupCheckStrategy())
.waitingForAll(forLogMessage(".*======== SERVER STARTED ========.*", 1), forHealthcheck())
.withStartupTimeout(Duration.ofMinutes(5));
Expand Down Expand Up @@ -131,11 +131,11 @@ private String getIcebergConfigFor(String dockerImage)
private void configureTestsContainer(Environment.Builder builder, Config config)
{
int version = getVersionFromDockerImageName(config.getCompatibilityTestDockerImage());
String temptoConfig = version <= 350 ? "presto-tempto-configuration.yaml" : "trino-tempto-configuration.yaml";
String temptoConfig = version <= 350 ? "legacy-tempto-configuration.yaml" : "tempto-configuration.yaml";
builder.configureContainer(TESTS, container -> container
.withCopyFileToContainer(
forHostPath(configDir.getPath(temptoConfig)),
"/docker/presto-product-tests/conf/tempto/tempto-configuration-profile-config-file.yaml"));
"/docker/trino-product-tests/conf/tempto/tempto-configuration-profile-config-file.yaml"));
}

protected int getVersionFromDockerImageName(String dockerImageName)
Expand Down
electrum marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

This file was deleted.

This file was deleted.

Loading