Repository navigation
Conversation
5d5d68a to
6f0ae64
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2287 +/- ##
=======================================
Coverage 85.18% 85.18%
=======================================
Files 46 46
Lines 8593 8595 +2
Branches 2011 2012 +1
=======================================
+ Hits 7320 7322 +2
Misses 807 807
Partials 466 466 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for the approval, and the Codecov CI fix (#2297) is now merged into |
…ge#1618) A CommandLineTool with no baseCommand, arguments, or input bindings produces an empty command list. This was passed straight to subprocess.Popen([]), which crashed with a raw "IndexError: list index out of range" deep inside subprocess. Guard the empty case in JobBase._execute and raise a WorkflowException with an actionable message instead. The existing handler turns this into a clean permanentFail rather than an unhandled traceback. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Head branch was pushed to by a user without write access
f004621 to
16c0947
Compare
Problem
Fixes #1618.
A
CommandLineToolwith nobaseCommand,arguments, or input bindings produces an empty command line. cwltool passed that empty list straight tosubprocess.Popen([]), which crashes with a raw, confusing error:…originating deep inside
subprocess(executable = args[0]), rather than a clean validation error for the malformed-but-parseable document.Repro
Fix
Guard the empty-command case in
JobBase._execute(cwltool/job.py) right after the command list is constructed, and raise aWorkflowExceptionwith an actionable message:The condition is
if not commands:, so it only fires when there is genuinely nothing to execute — i.e. no container runtime wrapper (docker run …) and no command. A container job (whereruntimesuppliesdocker run <image>) is unaffected, so relying on an image's defaultCMDstill works. The existingexcept WorkflowExceptionhandler turns this into a cleanpermanentFailinstead of an unhandled traceback.Tests
Added
tests/wf/no-basecommand.cwlfixture andtest_empty_command_line_errorintests/test_examples.py, asserting a non-zero exit, the new message in stderr, and noIndexError.Verified
black,flake8, andisortare clean on the changed files, and that a normal tool (tests/echo.cwl) still runs.This change was produced with the assistance of Claude Code (model: Claude Opus). The diff, root-cause analysis, and test were reviewed by a human before submission.