mirror of https://github.com/apache/druid.git
Fix MySQL drivers setup for Revised ITs (#13800)
* download both mysql drivers and use org.mariadb.jdbc.Driver for now * use com.mysql.jdbc.Driver
This commit is contained in:
parent
f67abf2e99
commit
9ffaba9c7f
|
@ -37,8 +37,14 @@ on:
|
|||
description: 'IT test Category'
|
||||
required: true
|
||||
type: string
|
||||
mysql_driver:
|
||||
description: 'MySQL driver to use'
|
||||
required: false
|
||||
type: string
|
||||
default: com.mysql.jdbc.Driver
|
||||
|
||||
env:
|
||||
MYSQL_DRIVER_CLASSNAME: ${{ inputs.mysql_driver }} # Used by tests to connect to metadata store directly.
|
||||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
|
||||
|
||||
jobs:
|
||||
|
|
|
@ -34,3 +34,4 @@ jobs:
|
|||
use_indexer: ${{ matrix.indexer }}
|
||||
script: ./it.sh github ${{ matrix.it }}
|
||||
it: ${{ matrix.it }}
|
||||
mysql_driver: com.mysql.jdbc.Driver
|
||||
|
|
|
@ -29,6 +29,7 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
MYSQL_DRIVER_CLASSNAME: com.mysql.jdbc.Driver # Used to set druid config in docker image for revised ITs
|
||||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
|
||||
|
||||
jobs:
|
||||
|
|
|
@ -202,12 +202,19 @@
|
|||
<version>${com.google.apis.client.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- Tests can choose either the MySQL or MariaDB driver. -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mariadb.jdbc</groupId>
|
||||
<artifactId>mariadb-java-client</artifactId>
|
||||
<version>${mariadb.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jdbi</groupId>
|
||||
<artifactId>jdbi</artifactId>
|
||||
|
|
|
@ -275,6 +275,7 @@ public class Initializer
|
|||
property("druid.client.https.certAlias", "druid");
|
||||
property("druid.client.https.keyManagerPassword", "druid123");
|
||||
property("druid.client.https.keyStorePassword", "druid123");
|
||||
propertyEnvVarBinding("druid.metadata.mysql.driver.driverClassName", "MYSQL_DRIVER_CLASSNAME");
|
||||
|
||||
// More env var bindings for properties formerly passed in via
|
||||
// a generated config file.
|
||||
|
|
|
@ -41,6 +41,9 @@ cd /
|
|||
|
||||
# Test-specific way to define extensions. Compose defines two test-specific
|
||||
# variables. We combine these to create the final form converted to a property.
|
||||
if [ -n "$MYSQL_DRIVER_CLASSNAME" ]; then
|
||||
export druid_metadata_mysql_driver_driverClassName="$MYSQL_DRIVER_CLASSNAME"
|
||||
fi
|
||||
if [ -n "$druid_extensions_loadList" ]; then
|
||||
echo "Using the provided druid_extensions_loadList=$druid_extensions_loadList"
|
||||
else
|
||||
|
|
|
@ -202,7 +202,6 @@ Reference: https://dzone.com/articles/build-docker-image-from-maven
|
|||
<environmentVariables>
|
||||
<MYSQL_VERSION>${mysql.version}</MYSQL_VERSION>
|
||||
<MARIADB_VERSION>${mariadb.version}</MARIADB_VERSION>
|
||||
<MYSQL_DRIVER_CLASSNAME>com.mysql.jdbc.Driver</MYSQL_DRIVER_CLASSNAME>
|
||||
<MYSQL_IMAGE_VERSION>${mysql.image.version}</MYSQL_IMAGE_VERSION>
|
||||
<CONFLUENT_VERSION>${confluent-version}</CONFLUENT_VERSION>
|
||||
<KAFKA_VERSION>${apache.kafka.version}</KAFKA_VERSION>
|
||||
|
|
Loading…
Reference in New Issue