Skip to content

fix(scripts): handle docker cleanup when no containers are running#977

Open
derekwaynecarr wants to merge 1 commit intoNVIDIA:mainfrom
derekwaynecarr:fix/docker-cleanup-no-containers
Open

fix(scripts): handle docker cleanup when no containers are running#977
derekwaynecarr wants to merge 1 commit intoNVIDIA:mainfrom
derekwaynecarr:fix/docker-cleanup-no-containers

Conversation

@derekwaynecarr
Copy link
Copy Markdown
Contributor

Summary

The docker-cleanup.sh script failed when no containers were running because grep -v returned exit code 1 on empty input, causing the script to abort due to set -euo pipefail.

Add || true to the volume detection pipeline so the script succeeds when there are no running containers (in_use_volumes will be empty, which is the correct behavior).

Related Issue

Changes

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • [x ] Follows Conventional Commits
  • [x ] Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

The docker-cleanup.sh script failed when no containers were running because
grep -v returned exit code 1 on empty input, causing the script to abort
due to set -euo pipefail.

Add || true to the volume detection pipeline so the script succeeds when
there are no running containers (in_use_volumes will be empty, which is
the correct behavior).

Signed-off-by: Derek Carr <decarr@redhat.com>
@derekwaynecarr derekwaynecarr requested a review from a team as a code owner April 25, 2026 15:51
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 25, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant