Skip to content

Commit bb81e42

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 4617ad9 commit bb81e42

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."
@@ -784,13 +781,13 @@ def _history_id(gi, **kwds) -> str:
784781

785782

786783
def wait_for_invocation_and_jobs(
787-
ctx, invocation_id: str, history_id: Optional[str], user_gi: GalaxyInstance, polling_backoff: int, early_termination: bool,
784+
ctx, invocation_id: str, history_id: Optional[str], user_gi: GalaxyInstance, polling_backoff: int,
788785
):
789786
polling_tracker = PollingTrackerImpl(polling_backoff)
790787
invocation_api = BioblendInvocationApi(ctx, user_gi)
791788
with WorkflowProgressDisplay(invocation_id) as workflow_progress_display:
792789
final_invocation_state, job_state, error_message = polling_wait_for_invocation_and_jobs(
793-
ctx, invocation_id, invocation_api, polling_tracker, workflow_progress_display, early_termination=early_termination
790+
ctx, invocation_id, invocation_api, polling_tracker, workflow_progress_display,
794791
)
795792
if error_message:
796793
if not history_id:
@@ -818,7 +815,7 @@ def state_func():
818815
return _wait_on_state(state_func, timeout=timeout)
819816

820817

821-
def _wait_on_state(state_func, polling_backoff=0, timeout=None, early_termination=True):
818+
def _wait_on_state(state_func, polling_backoff=0, timeout=None):
822819
def get_state():
823820
response = state_func()
824821
if not isinstance(response, list):
@@ -840,8 +837,6 @@ def get_state():
840837
"cancelled",
841838
"failed",
842839
]
843-
if not early_termination and current_non_terminal_states:
844-
return None
845840
for terminal_state in hierarchical_fail_states:
846841
if terminal_state in current_states:
847842
# 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
@@ -2174,16 +2174,6 @@ def tool_init_example_command_option(help=EXAMPLE_COMMAND_HELP):
21742174
)
21752175

21762176

2177-
def no_early_termination_option():
2178-
return planemo_option(
2179-
"--no_early_termination",
2180-
is_flag=True,
2181-
default=False,
2182-
prompt=False,
2183-
help="Wait until all jobs terminate, even if some jobs have failed",
2184-
)
2185-
2186-
21872177
def mulled_conda_option():
21882178
return planemo_option(
21892179
"--mulled_conda_version",

0 commit comments

Comments
 (0)