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

Hotfix for container stop in tests #591

Merged
merged 1 commit into from
Jan 10, 2025
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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Set to "TRUE" if the containers need to be up and running after
# a test target failed (e.g. in CI where containers are inspected
# for logs after failed steps)
CONTAINERS_UP_ON_ERROR="FALSE"
KEEP_CONTAINERS_UP="FALSE"

# Lumigator API configuration
# LUMI_API_CORS_ALLOWED_ORIGINS:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONTAINERS_RUNNING := $(shell docker ps -q --filter "name=lumigator-")

-include .env

KEEP_CONTAINERS_UP ?= "TRUE"
KEEP_CONTAINERS_UP ?= "FALSE"

#used in docker-compose to choose the right Ray image
ARCH := $(shell uname -m)
Expand All @@ -20,7 +20,7 @@ endif
define run_with_containers
@echo "No Lumigator containers are running. Starting containers..."
make start-lumigator-build
@if [ $(KEEP_CONTAINERS_UP) = "TRUE" ]; then trap "cd $(PROJECT_ROOT); make stop-lumigator" EXIT; fi; \
@if [ $(KEEP_CONTAINERS_UP) = "FALSE" ]; then echo "The script will remove containers after tests"; trap "cd $(PROJECT_ROOT); make stop-lumigator" EXIT; fi; \
make $(1)
endef

Expand Down
Loading