Skip to content

Commit 32908e3

Browse files
committed
Resolve conflicts with galaxyproject#1518
`--no-early-termination` is the current behavior. `--fail-fast` could be an option to implement.
1 parent 0e95f4f commit 32908e3

3 files changed

Lines changed: 3 additions & 19 deletions

File tree

planemo/commands/cmd_run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
@options.run_download_outputs_option()
3131
@options.engine_options()
3232
@options.test_options()
33-
@options.no_early_termination_option()
3433
@command_function
3534
def cli(ctx, runnable_identifier, job_path, **kwds):
3635
"""Planemo command for running tools and jobs.

planemo/galaxy/activity.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ def _execute( # noqa C901
218218
no_wait=kwds.get("no_wait", False),
219219
start_datetime=start_datetime,
220220
log=log_contents_str(config),
221-
early_termination=not kwds.get("no_early_termination", False),
222221
)
223222

224223
else:
@@ -252,7 +251,6 @@ def invocation_to_run_response(
252251
no_wait=False,
253252
start_datetime=None,
254253
log=None,
255-
early_termination=True,
256254
):
257255
start_datetime = start_datetime or datetime.now()
258256
invocation_id = invocation["id"]
@@ -268,7 +266,6 @@ def invocation_to_run_response(
268266
history_id=history_id,
269267
user_gi=user_gi,
270268
polling_backoff=polling_backoff,
271-
early_termination=early_termination,
272269
)
273270
if final_invocation_state not in ("ok", "skipped", "scheduled"):
274271
msg = f"Failed to run workflow [{workflow_id}], at least one job is in [{final_invocation_state}] state."
@@ -781,13 +778,13 @@ def _history_id(gi, **kwds) -> str:
781778

782779

783780
def wait_for_invocation_and_jobs(
784-
ctx, invocation_id: str, history_id: Optional[str], user_gi: GalaxyInstance, polling_backoff: int, early_termination: bool,
781+
ctx, invocation_id: str, history_id: Optional[str], user_gi: GalaxyInstance, polling_backoff: int,
785782
):
786783
polling_tracker = PollingTrackerImpl(polling_backoff)
787784
invocation_api = BioblendInvocationApi(ctx, user_gi)
788785
with WorkflowProgressDisplay(invocation_id) as workflow_progress_display:
789786
final_invocation_state, job_state, error_message = polling_wait_for_invocation_and_jobs(
790-
ctx, invocation_id, invocation_api, polling_tracker, workflow_progress_display, early_termination=early_termination
787+
ctx, invocation_id, invocation_api, polling_tracker, workflow_progress_display,
791788
)
792789
if error_message:
793790
if not history_id:
@@ -815,7 +812,7 @@ def state_func():
815812
return _wait_on_state(state_func, timeout=timeout)
816813

817814

818-
def _wait_on_state(state_func, polling_backoff=0, timeout=None, early_termination=True):
815+
def _wait_on_state(state_func, polling_backoff=0, timeout=None):
819816
def get_state():
820817
response = state_func()
821818
if not isinstance(response, list):
@@ -837,8 +834,6 @@ def get_state():
837834
"cancelled",
838835
"failed",
839836
]
840-
if not early_termination and current_non_terminal_states:
841-
return None
842837
for terminal_state in hierarchical_fail_states:
843838
if terminal_state in current_states:
844839
# If we got here something has failed and we can return (early)

planemo/options.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,16 +2067,6 @@ def tool_init_example_command_option(help=EXAMPLE_COMMAND_HELP):
20672067
)
20682068

20692069

2070-
def no_early_termination_option():
2071-
return planemo_option(
2072-
"--no_early_termination",
2073-
is_flag=True,
2074-
default=False,
2075-
prompt=False,
2076-
help="Wait until all jobs terminate, even if some jobs have failed",
2077-
)
2078-
2079-
20802070
def mulled_conda_option():
20812071
return planemo_option(
20822072
"--mulled_conda_version",

0 commit comments

Comments
 (0)