Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
8 changes: 7 additions & 1 deletion firecloud/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,8 @@ def create_submission(wnamespace, workspace, cnamespace, config,
entity=None, etype=None, expression=None,
use_callcache=True, delete_intermediate_output_files=False,
use_reference_disks=False, memory_retry_multiplier=0,
workflow_failure_mode="", user_comment=""):
per_workflow_cost_cap=None, workflow_failure_mode="",
user_comment=""):
"""Submit job in FireCloud workspace.

Args:
Expand All @@ -1218,6 +1219,8 @@ def create_submission(wnamespace, workspace, cnamespace, config,
Cromwell docs
(https://cromwell.readthedocs.io/en/develop/cromwell_features/RetryWithMoreMemory)
for more information
per_workflow_cost_cap (float): A cost threshold in USD to apply to individual
workflows. When the estimated cost is exceeded, the workflow is terminated.
workflow_failure_mode (str): What happens after a task fails. Choose from
ContinueWhilePossible and NoNewCalls. Defaults to NoNewCalls if not
specified. See Cromwell docs
Expand Down Expand Up @@ -1254,6 +1257,9 @@ def create_submission(wnamespace, workspace, cnamespace, config,

if memory_retry_multiplier:
body['memoryRetryMultiplier'] = memory_retry_multiplier

if per_workflow_cost_cap:
body['perWorkflowCostCap'] = per_workflow_cost_cap

if workflow_failure_mode:
body['workflowFailureMode'] = workflow_failure_mode
Expand Down
8 changes: 6 additions & 2 deletions firecloud/fiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ def config_start(args):
args.config, args.entity, args.entity_type,
args.expression, cache,
args.delete_intermediates, args.ref_disks,
args.mem_retry_multiplier, args.failure_mode,
args.user_comment)
args.mem_retry_multiplier, args.per_workflow_cost_cap,
args.failure_mode, args.user_comment)
fapi._check_response_code(r, 201)
id = r.json()['submissionId']

Expand Down Expand Up @@ -2805,6 +2805,10 @@ def main(argv=None):
'this amount. See Cromwell docs ' +
'(https://cromwell.readthedocs.io/en/develop/cromwell_features/RetryWithMoreMemory)' +
' for more information.')
subp.add_argument('-p', '--per_workflow_cost_cap', type=float,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
subp.add_argument('-p', '--per_workflow_cost_cap', type=float,
subp.add_argument('-P', '--per_workflow_cost_cap', type=float,

-p is reserved for project name

Copy link
Author

Choose a reason for hiding this comment

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

done

help='A cost threshold in USD to apply to individual ' +
'workflows. When the estimated cost is exceeded, the ' +
'workflow is terminated.')
subp.add_argument('-f', '--failure_mode',
choices=['NoNewCalls', 'ContinueWhilePossible'],
help='What happens after a task fails. Defaults to ' +
Expand Down