Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,7 @@ jobs:
- name: Maven Tests
id: tests
if: >-
matrix.modules != 'plugin/trino-singlestore'
&& ! (contains(matrix.modules, 'trino-bigquery') && contains(matrix.profile, 'cloud-tests-2'))
! (contains(matrix.modules, 'trino-bigquery') && contains(matrix.profile, 'cloud-tests-2'))
&& ! (contains(matrix.modules, 'trino-delta-lake') && contains(matrix.profile, 'cloud-tests'))
&& ! (contains(matrix.modules, 'trino-iceberg') && contains(matrix.profile, 'cloud-tests'))
&& ! (contains(matrix.modules, 'trino-redshift') && contains(matrix.profile, 'cloud-tests'))
Expand Down Expand Up @@ -629,13 +628,6 @@ jobs:
-Dtesting.azure-abfs-access-key="${ABFS_ACCESSKEY}" \
-Dtesting.gcp-storage-bucket="${GCP_STORAGE_BUCKET}" \
-Dtesting.gcp-credentials-key="${GCP_CREDENTIALS_KEY}"
- name: Memsql Tests
id: tests-memsql
env:
MEMSQL_LICENSE: ${{ secrets.MEMSQL_LICENSE }}
if: matrix.modules == 'plugin/trino-singlestore' && (env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || env.MEMSQL_LICENSE != '')
run: |
$MAVEN test ${MAVEN_TEST} -pl :trino-singlestore -Dmemsql.license=${MEMSQL_LICENSE}
- name: Cloud BigQuery Tests
id: tests-bq
env:
Expand Down Expand Up @@ -791,7 +783,6 @@ jobs:
|| steps.tests-azure.outcome == 'failure'
|| steps.tests-gcs.outcome == 'failure'
|| steps.tests-delta.outcome == 'failure'
|| steps.tests-memsql.outcome == 'failure'
|| steps.tests-bq.outcome == 'failure'
|| steps.tests-bq-ci.outcome == 'failure'
|| steps.tests-bq-smoke.outcome == 'failure'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/sphinx/connector/singlestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ creating tables in an external SingleStore database.

To connect to SingleStore, you need:

- SingleStore version 7.1.4 or higher.
- SingleStore version 7.8 or higher.
- Network access from the Trino coordinator and workers to SingleStore. Port
3306 is the default port.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public DistributedQueryRunner build()
public static void main(String[] args)
throws Exception
{
// You need to set 'memsql.license' to VM options
QueryRunner queryRunner = builder(new TestingSingleStoreServer())
.addCoordinatorProperty("http-server.http.port", "8080")
.setInitialTables(TpchTable.getTables())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ protected OptionalInt maxSchemaNameLength()
protected void verifySchemaNameLengthFailurePermissible(Throwable e)
{
// The error message says 60 char, but the actual limitation is 62
assertThat(e).hasMessageContaining("Distributed MemSQL requires the length of the database name to be at most 60 characters");
assertThat(e).hasMessageContaining("Distributed SingleStore requires the length of the database name to be at most 60 characters");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
import io.trino.testing.QueryRunner;
import io.trino.testing.TestingConnectorBehavior;

import static io.trino.plugin.singlestore.TestingSingleStoreServer.LATEST_TESTED_VERSION;

public class TestSingleStoreLatestConnectorSmokeTest
extends BaseJdbcConnectorSmokeTest
{
@Override
protected QueryRunner createQueryRunner()
throws Exception
{
TestingSingleStoreServer singleStoreServer = closeAfterClass(new TestingSingleStoreServer(TestingSingleStoreServer.LATEST_TESTED_TAG));
TestingSingleStoreServer singleStoreServer = closeAfterClass(new TestingSingleStoreServer(LATEST_TESTED_VERSION));
return SingleStoreQueryRunner.builder(singleStoreServer)
.setInitialTables(REQUIRED_TPCH_TABLES)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import io.trino.testing.sql.TestTable;
import org.junit.jupiter.api.Test;

import static io.trino.plugin.singlestore.TestingSingleStoreServer.LATEST_TESTED_TAG;
import static io.trino.plugin.singlestore.TestingSingleStoreServer.LATEST_TESTED_VERSION;
import static io.trino.spi.type.VarcharType.createVarcharType;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
Expand All @@ -30,7 +30,7 @@ final class TestSingleStoreLatestTypeMapping
protected QueryRunner createQueryRunner()
throws Exception
{
singleStoreServer = closeAfterClass(new TestingSingleStoreServer(LATEST_TESTED_TAG));
singleStoreServer = closeAfterClass(new TestingSingleStoreServer(LATEST_TESTED_VERSION));
return SingleStoreQueryRunner.builder(singleStoreServer).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,26 @@
import java.sql.Statement;
import java.util.Set;

import static io.trino.testing.TestingProperties.requiredNonEmptySystemProperty;

public class TestingSingleStoreServer
extends JdbcDatabaseContainer<TestingSingleStoreServer>
{
private static final String MEM_SQL_LICENSE = requiredNonEmptySystemProperty("memsql.license");
public static final String DEFAULT_VERSION = "7.8";
public static final String LATEST_TESTED_VERSION = "8.9";

public static final String DEFAULT_TAG = "memsql/cluster-in-a-box:centos-7.1.13-11ddea2a3a-3.0.0-1.9.0";
public static final String LATEST_TESTED_TAG = "memsql/cluster-in-a-box:alma-8.0.4-c190bb9c08-4.0.10-1.14.4";
public static final String DEFAULT_TAG = "ghcr.io/singlestore-labs/singlestoredb-dev:latest";

public static final Integer SINGLESTORE_PORT = 3306;

public TestingSingleStoreServer()
{
this(DEFAULT_TAG);
this(DEFAULT_VERSION);
}

public TestingSingleStoreServer(String dockerImageName)
public TestingSingleStoreServer(String version)
{
super(DockerImageName.parse(dockerImageName));
super(DockerImageName.parse(DEFAULT_TAG));
addEnv("ROOT_PASSWORD", "memsql_root_password");
String option = dockerImageName.equals(LATEST_TESTED_TAG) ? "bash" : "";
withCommand("sh", "-xeuc",
option + " /startup && " +
// Lower the size of pre-allocated log files to 1MB (minimum allowed) to reduce disk footprint
"memsql-admin update-config --yes --all --set-global --key \"log_file_size_partitions\" --value \"1048576\" && " +
"memsql-admin update-config --yes --all --set-global --key \"log_file_size_ref_dbs\" --value \"1048576\" && " +
// re-execute startup to actually start the nodes (first run performs setup but doesn't start the nodes)
"exec " + option + " /startup");
addEnv("SINGLESTORE_VERSION", version);
start();
}

Expand All @@ -65,7 +56,6 @@ public Set<Integer> getLivenessCheckPortNumbers()
protected void configure()
{
addExposedPort(SINGLESTORE_PORT);
addEnv("LICENSE_KEY", MEM_SQL_LICENSE);
setStartupAttempts(3);
}

Expand Down
Loading