Repository navigation
Fix Cromwell submit-docker: remove the brace group that truncated the command - #193
Merged
Merged
Conversation
Cromwell wraps submit-docker in a draft-2 WDL `command { ... }` block,
which ends at the first closing brace that is not closing one of its own
references. The `|| { ...; exit 1; }` group after the pull lock therefore
ended the command early and left the sbatch call to be parsed as WDL:
Error parsing generated wdl
WdlParser$SyntaxError: Unrecognized token: sbatch
Report the pull failure with if/fi instead, and document the constraint
next to the existing note about braced variable references.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XvF1yXCjHTqxTHuLLtYmPi
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused change preserves failure behavior and removes all bare closing braces from submit-docker.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes Cromwell Docker submissions by avoiding a brace group that prematurely terminates generated WDL.
Changes:
- Replaces brace-group error handling with
if/fi. - Documents the WDL brace constraint.
| File | Description |
|---|---|
ansible/roles/compiled/templates/cromwell_slurm.conf |
Corrects image-pull failure handling and documents WDL parsing constraints. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
MikeCTZA
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes docker-attribute tasks failing under the Cromwell 92 install (#189) with:
Cromwell does not run
submit-dockeras a plain shell script. It wraps the string in agenerated draft-2 WDL task as
command { ... }, and that lexer ends the command block at thefirst closing brace that is not closing one of its own
${...}references. The|| { echo ...; exit 1; }group after the image-pull lock therefore ended the command early,and the
sbatch \call further down was parsed as task-level WDL.Changes, both in
ansible/roles/compiled/templates/cromwell_slurm.conf:if [ $? -ne 0 ]; then ... fiinstead of the brace group. Samebehaviour: message to stderr, exit 1.
submit-dockerto state the constraint (no bare closing braceanywhere in the string, shell comments included) and name the error it causes.
The plain
submitblock was not affected.Checklist
cd ansible && uv run yamllint . && uv run ansible-lint(ansible-lint reaches
Profile 'production' ... passed).Notes for the maintainer
source (
ConfigWdlNamespace.makeWdlSourceand the draft-2 lexer's command rules), and ascript applying that lexer rule flags the old line and finds nothing in the fixed template;
bash -npasses on both submit strings. The linters do not cover.conftemplates.slurm.confneeds re-rendering on the cluster:ansible-playbook site.yaml -t cromwell,cromwell92, then submit a task with adockerruntime attribute to confirm.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XvF1yXCjHTqxTHuLLtYmPi