Skip to content

Commit

Permalink
Merge pull request #7887 from fstagni/90_bumpDBsVersions
Browse files Browse the repository at this point in the history
[9.0] test: bumped DBs versions
  • Loading branch information
chrisburr authored Nov 19, 2024
2 parents 7443bb0 + 4f08b70 commit 31118ea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
matrix:
# TEST_NAME is a dummy variable used to make it easier to read the web interface
include:
- TEST_NAME: "MariaDB 10.6, elasticsearch:7.9.1"
ARGS: MYSQL_VER=mariadb:10.6.3 ES_VER=elasticsearch:7.9.1
- TEST_NAME: "MariaDB 11.4, elasticsearch:7.9.1"
ARGS: MYSQL_VER=mariadb:11.4.3 ES_VER=elasticsearch:7.9.1
- TEST_NAME: "DIPS"
ARGS: TEST_HTTPS=No
- TEST_NAME: "Force DEncode"
Expand Down
11 changes: 8 additions & 3 deletions integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

# Editable configuration
DEFAULT_HOST_OS = "el9"
DEFAULT_MYSQL_VER = "mysql:8.0.36"
DEFAULT_ES_VER = "opensearchproject/opensearch:2.11.1"
DEFAULT_MYSQL_VER = "mysql:8.0.40"
DEFAULT_ES_VER = "opensearchproject/opensearch:2.18.0"
DEFAULT_IAM_VER = "indigoiam/iam-login-service:v1.8.0"
FEATURE_VARIABLES = {
"DIRACOSVER": "master",
Expand Down Expand Up @@ -288,7 +288,8 @@ def prepare_environment(
subprocess.run(cmd + ["chown", "dirac", "/home/dirac"], check=True)

typer.secho("Creating MySQL user", fg=c.GREEN)
cmd = ["docker", "exec", "mysql", "mysql", f"--password={DB_ROOTPWD}", "-e"]
mysql_command = "mariadb" if "mariadb" in docker_compose_env["MYSQL_VER"].lower() else "mysql"
cmd = ["docker", "exec", "mysql", f"{mysql_command}", f"--password={DB_ROOTPWD}", "-e"]
# It sometimes takes a while for MySQL to be ready so wait for a while if needed
for _ in range(10):
ret = subprocess.run(
Expand Down Expand Up @@ -777,6 +778,10 @@ def _make_env(flags):
env["HOST_OS"] = flags.pop("HOST_OS", DEFAULT_HOST_OS)
env["CI_REGISTRY_IMAGE"] = flags.pop("CI_REGISTRY_IMAGE", "diracgrid")
env["MYSQL_VER"] = flags.pop("MYSQL_VER", DEFAULT_MYSQL_VER)
if "mariadb" in env["MYSQL_VER"].lower():
env["MYSQL_ADMIN_COMMAND"] = "mariadb-admin"
else:
env["MYSQL_ADMIN_COMMAND"] = "mysqladmin"
env["ES_VER"] = flags.pop("ES_VER", DEFAULT_ES_VER)
env["IAM_VER"] = flags.pop("IAM_VER", DEFAULT_IAM_VER)
if "CVMFS_DIR" not in env or not Path(env["CVMFS_DIR"]).is_dir():
Expand Down
2 changes: 1 addition & 1 deletion tests/CI/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
ports:
- 3306:3306
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
test: ["CMD", "${MYSQL_ADMIN_COMMAND}", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
start_period: 60s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ plugins.security.disabled=true
# Elasticsearch allocates 1GB of memory by default. As resources are limited
# and elasticsearch performance isn't critical in CI, limit this to 256MB
OPENSEARCH_JAVA_OPTS=-Xms256m -Xmx256m
OPENSEARCH_INITIAL_ADMIN_PASSWORD=This_password1#

0 comments on commit 31118ea

Please sign in to comment.