Skip to content
Open
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
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
- postgres
- sequencer
image: blockscout-testnode
restart: always
restart: unless-stopped
container_name: 'blockscout'
links:
- postgres:database
Expand All @@ -30,7 +30,7 @@ services:

postgres:
image: postgres:13.6
restart: always
restart: unless-stopped
container_name: 'postgres'
environment:
POSTGRES_PASSWORD: ''
Expand Down
6 changes: 3 additions & 3 deletions test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,15 @@ fi

if $force_init; then
echo == Removing old data..
docker compose down
docker compose down --remove-orphans --timeout 10 2>/dev/null || true
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line suppresses all stderr from docker compose down and forces a success exit (|| true). With set -e at the top of the script, this makes real failures (e.g., compose file parse errors, Docker daemon unavailable, wrong context/project) silent and harder to debug, while the script continues into container/volume deletion steps.

Consider keeping the non-fatal behavior but surfacing the failure (e.g., capture the exit code and print a warning to stderr, and avoid redirecting stderr to /dev/null unless you’re specifically filtering a known-noisy error).

Suggested change
docker compose down --remove-orphans --timeout 10 2>/dev/null || true
compose_down_status=0
docker compose down --remove-orphans --timeout 10 || compose_down_status=$?
if [ "$compose_down_status" -ne 0 ]; then
echo "Warning: 'docker compose down --remove-orphans --timeout 10' failed with exit code $compose_down_status; continuing with manual cleanup." >&2
fi

Copilot uses AI. Check for mistakes.
leftoverContainers=`docker container ls -a --filter label=com.docker.compose.project=nitro-testnode -q | xargs echo`
if [ `echo $leftoverContainers | wc -w` -gt 0 ]; then
docker rm $leftoverContainers
docker rm -f $leftoverContainers
fi
docker volume prune -f --filter label=com.docker.compose.project=nitro-testnode
leftoverVolumes=`docker volume ls --filter label=com.docker.compose.project=nitro-testnode -q | xargs echo`
if [ `echo $leftoverVolumes | wc -w` -gt 0 ]; then
docker volume rm $leftoverVolumes
docker volume rm -f $leftoverVolumes
fi

echo == Generating l1 keys
Expand Down
Loading