Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3695.abort if any task fails #3785

Merged
merged 6 commits into from
Aug 25, 2020
Merged

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Aug 24, 2020

CLOSES: #3695

Largely straightforward. There is a design decision to move the config item back to it's Cylc 7 location [cylc][abort if any task fails] and to allow the use of a custom script. As far as I know parsec doesn't have a mechanism for dealing with an item deprecated in favour of a command line option.

There are a number of tests which rely on this config item which may or may not be ok (the deprecation warning may break them). I am addressing these tests, but the logic of the PR is ready for review.

CHANGES.md Outdated Show resolved Hide resolved
cylc/flow/cfgspec/suite.py Outdated Show resolved Hide resolved
deprecation logic for self.options.abort_if_any_task_fails

removed references to abort if any task set from changes.md

removed abort if any task fails from language spec
@wxtim wxtim force-pushed the 3695.abort_if_any_task_fails branch from 5c80244 to dd9e09e Compare August 24, 2020 14:16
cylc/flow/cfgspec/suite.py Outdated Show resolved Hide resolved
cylc/flow/cfgspec/suite.py Show resolved Hide resolved
cylc/flow/scheduler_cli.py Outdated Show resolved Hide resolved
tests/flakyfunctional/execution-time-limit/04-poll.t Outdated Show resolved Hide resolved
Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

+1 on @oliver-sanders comments. No other comments after reading code & tests 👍

Tested with this workflow from the docs:

[scheduling]
    [[dependencies]]
        graph = "hello"
[runtime]
    [[hello]]
        script = """
sleep 10
if [[ $CYLC_TASK_TRY_NUMBER < 3 ]]; then
    echo "Hello ... aborting!"
    exit 1
else
    echo "Hello World!"
fi"""

Running with cylc run suite:

2020-08-25T15:16:34+12:00 INFO - [hello.1] status=submitted: (received)started at 2020-08-25T15:16:33+12:00  for job(01) flow(o)
2020-08-25T15:16:34+12:00 INFO - [hello.1] -health check settings: execution timeout=None
2020-08-25T15:16:43+12:00 INFO - [client-command] put_messages kinow@ranma:cylc-message
2020-08-25T15:16:44+12:00 CRITICAL - [hello.1] status=running: (received)failed/EXIT at 2020-08-25T15:16:43+12:00  for job(01) flow(o)
2020-08-25T15:16:44+12:00 CRITICAL - [hello.1] -job(01) failed
2020-08-25T15:16:45+12:00 WARNING - suite stalled

And running with cylc run --abort-if-any-task-fails suite:

2020-08-25T15:16:12+12:00 INFO - [hello.1] -health check settings: execution timeout=None
2020-08-25T15:16:21+12:00 INFO - [client-command] put_messages kinow@ranma:cylc-message
2020-08-25T15:16:22+12:00 CRITICAL - [hello.1] status=running: (received)failed/EXIT at 2020-08-25T15:16:21+12:00  for job(01) flow(F)
2020-08-25T15:16:22+12:00 CRITICAL - [hello.1] -job(01) failed
2020-08-25T15:16:22+12:00 ERROR - Suite shutting down - AUTOMATIC(ON-TASK-FAILURE)
2020-08-25T15:16:22+12:00 INFO - DONE

Deprecation warning present if I add the option to my flow.cylc.

2020-08-25T15:20:10+12:00 WARNING - deprecated items were automatically upgraded in 'suite definition':
2020-08-25T15:20:10+12:00 WARNING -  * (8.0.0) [cylc][abort if any task fails] - DELETED (OBSOLETE)
2020-08-25T15:20:11+12:00 INFO - Cold Start 1

cylc/flow/scheduler_cli.py Outdated Show resolved Hide resolved
cylc/flow/scheduler_cli.py Outdated Show resolved Hide resolved
cylc/flow/scheduler_cli.py Show resolved Hide resolved
tests/functional/authentication/02-suite2-stop-suite1.t Outdated Show resolved Hide resolved
@wxtim wxtim force-pushed the 3695.abort_if_any_task_fails branch from 87d64aa to cefa11b Compare August 25, 2020 10:06
@wxtim wxtim force-pushed the 3695.abort_if_any_task_fails branch from cefa11b to e929fb8 Compare August 25, 2020 10:07
@wxtim
Copy link
Member Author

wxtim commented Aug 25, 2020

Can I poke @oliver-sanders for a re-review

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

Looks ok.

Just thought of something that needs doing, will need to automatically add --abort-if-any-task-fails to the restart command when we form it in suite_auto_restart.

cmd = ['cylc', 'restart', quote(self.suite)]

@oliver-sanders
Copy link
Member

Edited description to close issue, waiting for tests to pass.

@oliver-sanders oliver-sanders added this to the cylc-8.0a3 milestone Aug 25, 2020
@hjoliver
Copy link
Member

Tests passed.

@hjoliver hjoliver merged commit 060d725 into cylc:master Aug 25, 2020
@wxtim wxtim deleted the 3695.abort_if_any_task_fails branch September 3, 2020 08:44
@hjoliver hjoliver modified the milestones: cylc-8.0a3, cylc-8.0b0 Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

conf: replace [scheduler][events]abort if any task fails with a cli option
4 participants