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
27 changes: 22 additions & 5 deletions integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,28 @@ def prepare_environment(

typer.secho("Running docker-compose to create containers", fg=c.GREEN)
with _gen_docker_compose(modules) as docker_compose_fn:
subprocess.run(
["docker", "compose", "-f", docker_compose_fn, "up", "-d"],
check=True,
env=docker_compose_env,
)
try:
subprocess.run(
["docker", "compose", "-f", docker_compose_fn, "up", "-d"],
check=True,
env=docker_compose_env,
)
except subprocess.CalledProcessError:
typer.secho(
"docker compose up failed, dumping container logs for diagnosis",
fg=c.RED,
)
subprocess.run(
["docker", "compose", "-f", docker_compose_fn, "ps", "-a"],
check=False,
env=docker_compose_env,
)
subprocess.run(
["docker", "compose", "-f", docker_compose_fn, "logs", "--no-color"],
check=False,
env=docker_compose_env,
)
raise

typer.secho("Creating users in server and client containers", fg=c.GREEN)
for container_name in ["server", "client"]:
Expand Down
4 changes: 3 additions & 1 deletion tests/CI/envs/opensearchproject/opensearch:2.1.0.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ cluster.routing.allocation.disk.watermark.high=300mb
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" # minimum and maximum Java heap size
# -XX:-UseContainerSupport works around a JDK cgroup v2 NPE in OpenSearch 2.1.0
# (ProcessProbe <clinit> crashes on newer GitHub runners with cgroup v2)
OPENSEARCH_JAVA_OPTS="-Xms256m -Xmx256m -XX:-UseContainerSupport"
5 changes: 3 additions & 2 deletions tests/Jenkins/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,9 @@ installDIRAC() {

if [[ -n "${INSTALLATION_BRANCH}" ]]; then
# Use this for (e.g.) running backward-compatibility tests
echo "pip-installing DIRAC from git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}#egg=DIRAC[client]"
pip install "git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}#egg=DIRAC[client]"
dirac_spec="DIRAC[client] @ git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}"
echo "pip-installing DIRAC from $dirac_spec"
pip install "$dirac_spec"
else
for module_path in "${ALTERNATIVE_MODULES[@]}"; do
pip install ${PIP_INSTALL_EXTRA_ARGS:-} "${module_path}"
Expand Down
Loading