Skip to content

fix(scripts): eliminate xargs subshell dependency in docker-cleanup.sh#1207

Merged
mrunalp merged 1 commit intoNVIDIA:mainfrom
derekwaynecarr:fix-scripts-docker-cleanup
May 7, 2026
Merged

fix(scripts): eliminate xargs subshell dependency in docker-cleanup.sh#1207
mrunalp merged 1 commit intoNVIDIA:mainfrom
derekwaynecarr:fix-scripts-docker-cleanup

Conversation

@derekwaynecarr
Copy link
Copy Markdown
Collaborator

Summary

Replace xargs usage with native docker/podman multi-argument inspect calls. The previous implementation failed because xargs spawns subshells that don't inherit the ce() function from container-engine.sh.

Instead of piping container IDs through xargs, collect them into an array and pass them directly to ce inspect, which accepts multiple IDs. This eliminates the subshell issue entirely and simplifies the code.

Fixes the docker:cleanup mise task that was failing with:
xargs: ce: No such file or directory

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)

Replace xargs usage with native docker/podman multi-argument inspect calls.
The previous implementation failed because xargs spawns subshells that
don't inherit the ce() function from container-engine.sh.

Instead of piping container IDs through xargs, collect them into an array
and pass them directly to `ce inspect`, which accepts multiple IDs. This
eliminates the subshell issue entirely and simplifies the code.

Fixes the docker:cleanup mise task that was failing with:
  xargs: ce: No such file or directory

Signed-off-by: Derek Carr <decarr@redhat.com>
@derekwaynecarr derekwaynecarr requested review from a team, maxamillion and mrunalp as code owners May 6, 2026 17:27
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 6, 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.

@mrunalp mrunalp merged commit d45c1a7 into NVIDIA:main May 7, 2026
5 checks passed
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.

3 participants