Skip to content

Commit

Permalink
Config: convert stalled to stall
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Sep 14, 2021
1 parent 96d31bb commit 6f8a201
Show file tree
Hide file tree
Showing 147 changed files with 242 additions and 236 deletions.
10 changes: 5 additions & 5 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,15 @@
Conf('inactivity handler', VDR.V_STRING_LIST)
Conf('shutdown handler', VDR.V_STRING_LIST)
Conf('aborted handler', VDR.V_STRING_LIST)
Conf('stalled handler', VDR.V_STRING_LIST)
Conf('stalled timeout handler', VDR.V_STRING_LIST)
Conf('stall handler', VDR.V_STRING_LIST)
Conf('stall timeout handler', VDR.V_STRING_LIST)
Conf('timeout', VDR.V_INTERVAL)
Conf('abort on timeout', VDR.V_BOOLEAN)
Conf('inactivity', VDR.V_INTERVAL)
Conf('abort on inactivity', VDR.V_BOOLEAN)
Conf('stalled timeout', VDR.V_INTERVAL, DurationFloat(3600))
Conf('abort on stalled timeout', VDR.V_BOOLEAN, True)
Conf('abort on stalled', VDR.V_BOOLEAN)
Conf('stall timeout', VDR.V_INTERVAL, DurationFloat(3600))
Conf('abort on stall timeout', VDR.V_BOOLEAN, True)
Conf('abort on stall', VDR.V_BOOLEAN)

with Conf('mail', desc='''
Options for email handling.
Expand Down
21 changes: 11 additions & 10 deletions cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,20 +290,20 @@
Conf('inactivity handler', VDR.V_STRING_LIST, None)
Conf('shutdown handler', VDR.V_STRING_LIST, None)
Conf('aborted handler', VDR.V_STRING_LIST, None)
Conf('stalled handler', VDR.V_STRING_LIST, None)
Conf('stall handler', VDR.V_STRING_LIST, None)
Conf('timeout', VDR.V_INTERVAL)
Conf('stalled timeout', VDR.V_INTERVAL)
Conf('stalled timeout handler', VDR.V_STRING_LIST, None)
Conf('stall timeout', VDR.V_INTERVAL)
Conf('stall timeout handler', VDR.V_STRING_LIST, None)
Conf('inactivity', VDR.V_INTERVAL)
Conf('abort if startup handler fails', VDR.V_BOOLEAN)
Conf('abort if shutdown handler fails', VDR.V_BOOLEAN)
Conf('abort if timeout handler fails', VDR.V_BOOLEAN)
Conf('abort if inactivity handler fails', VDR.V_BOOLEAN)
Conf('abort if stalled handler fails', VDR.V_BOOLEAN)
Conf('abort if stalled timeout handler fails', VDR.V_BOOLEAN)
Conf('abort on stalled', VDR.V_BOOLEAN)
Conf('abort if stall handler fails', VDR.V_BOOLEAN)
Conf('abort if stall timeout handler fails', VDR.V_BOOLEAN)
Conf('abort on stall', VDR.V_BOOLEAN)
Conf('abort on timeout', VDR.V_BOOLEAN)
Conf('abort on stalled timeout', VDR.V_BOOLEAN)
Conf('abort on stall timeout', VDR.V_BOOLEAN)
Conf('abort on inactivity', VDR.V_BOOLEAN)
Conf('mail events', VDR.V_STRING_LIST, None)
Conf('expected task failures', VDR.V_STRING_LIST, desc='''
Expand Down Expand Up @@ -1452,9 +1452,10 @@ def upg(cfg, descr):
# Workflow timeout is now measured from start of run.
# The old timeout was measured from start of stall.
for old, new in [
('timeout', 'stalled timeout'),
('abort on timeout', 'abort on stalled timeout'),
('timeout handler', 'stalled timeout handler')
('timeout', 'stall timeout'),
('abort on timeout', 'abort on stall timeout'),
('timeout handler', 'stall timeout handler'),
('abort on stalled', 'abort on stall'),
]:
u.deprecate(
'8.0.0',
Expand Down
20 changes: 10 additions & 10 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,13 +996,13 @@ def set_workflow_timer(self):
self.workflow_timer_active = True

def set_stalled_timer(self):
"""Set stalled timeout timer."""
"""Set stall timeout timer."""
timeout = self._get_events_conf(self.EVENT_STALLED_TIMEOUT)
if timeout is None:
return
self.stalled_timer_timeout = time() + timeout
LOG.info(
"%s stalled timer starts NOW: %s",
"%s stall timer starts NOW: %s",
get_seconds_as_interval_string(timeout),
get_current_time_string())
self.stalled_timer_active = True
Expand Down Expand Up @@ -1574,14 +1574,14 @@ async def update_data_structure(self):
if self.stalled_timer_active:
self.stalled_timer_active = False
LOG.info(
"%s stalled timer stopped NOW: %s",
"%s stall timer stopped: %s",
get_seconds_as_interval_string(
self._get_events_conf(self.EVENT_STALLED_TIMEOUT)),
get_current_time_string())
return has_updated

def check_workflow_timers(self):
"""Check if workflow or stalled timers have timed out."""
"""Check if workflow or stall timers have timed out."""
if (
self.workflow_timer_active
and self._get_events_conf(self.EVENT_TIMEOUT)
Expand All @@ -1597,7 +1597,7 @@ def check_workflow_timers(self):
LOG.warning(message)
self.run_event_handlers(self.EVENT_TIMEOUT, message)
if self._get_events_conf('abort on timeout'):
raise SchedulerError('Abort on workflow timeout is set')
raise SchedulerError('"abort on timeout" is set')
if (
self.stalled_timer_active
and self._get_events_conf(self.EVENT_STALLED_TIMEOUT)
Expand All @@ -1612,8 +1612,8 @@ def check_workflow_timers(self):
)
LOG.warning(message)
self.run_event_handlers(self.EVENT_STALLED_TIMEOUT, message)
if self._get_events_conf('abort on stalled timeout'):
raise SchedulerError('Abort on stalled timeout is set')
if self._get_events_conf('abort on stall timeout'):
raise SchedulerError('"abort on stall timeout" is set')

def check_workflow_inactive(self):
"""Check if workflow is inactive or not."""
Expand All @@ -1627,7 +1627,7 @@ def check_workflow_inactive(self):
LOG.warning(message)
self.run_event_handlers(self.EVENT_INACTIVITY_TIMEOUT, message)
if self._get_events_conf('abort on inactivity'):
raise SchedulerError('Abort on workflow inactivity is set')
raise SchedulerError('"abort on inactivity" is set')

def check_workflow_stalled(self):
"""Check if workflow is stalled or not."""
Expand All @@ -1638,8 +1638,8 @@ def check_workflow_stalled(self):
self.is_stalled = self.pool.is_stalled()
if self.is_stalled:
self.run_event_handlers(self.EVENT_STALLED, 'workflow stalled')
if self._get_events_conf('abort on stalled'):
raise SchedulerError('Abort on workflow stalled is set')
if self._get_events_conf('abort on stall'):
raise SchedulerError('"abort on stall" is set')
# Start workflow timeout timer
if self._get_events_conf(self.EVENT_STALLED_TIMEOUT):
self.set_stalled_timer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[scheduler]
UTC mode = True
[[events]]
abort on stalled = True
abort on stall = True
abort on inactivity = True
inactivity = PT3M
[scheduling]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[scheduler]
[[events]]
abort on stalled = True
abort on stall = True
expected task failures = foo.1
[scheduling]
[[graph]]
Expand Down
2 changes: 1 addition & 1 deletion tests/flakyfunctional/events/01-task/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[scheduler]
allow implicit tasks = True
[[events]]
abort on stalled = True
abort on stall = True
abort on inactivity = True
inactivity = PT3M
expected task failures = bar.1, baz.1
Expand Down
4 changes: 2 additions & 2 deletions tests/flakyfunctional/events/05-timeout-ref-dummy/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Time out with an unhandled failure.
[scheduler]
[[events]]
abort on stalled timeout = True
stalled timeout = PT1S
abort on stall timeout = True
stall timeout = PT1S
[scheduling]
[[graph]]
R1 = "foo"
Expand Down
2 changes: 1 addition & 1 deletion tests/flakyfunctional/events/40-stall-despite-clock-trig.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"
TEST_NAME="${TEST_NAME_BASE}-run"
workflow_run_fail "${TEST_NAME}" cylc play --debug --no-detach "${WORKFLOW_NAME}"

grep_ok "workflow stalled" "${TEST_NAME}.stderr"
grep_ok "Workflow stalled" "${TEST_NAME}.stderr"

purge
exit
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
UTC mode = True
cycle point format = %Y%m%d
[[events]]
abort on stalled = True
abort on stall = True
abort on inactivity = True
inactivity = PT5M
[scheduling]
Expand Down
4 changes: 2 additions & 2 deletions tests/flakyfunctional/events/44-timeout/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[scheduler]
[[events]]
abort on stalled timeout = True
stalled timeout = PT20S
abort on stall timeout = True
stall timeout = PT20S
[scheduling]
[[graph]]
R1 = "foo => stopper"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[scheduler]
[[events]]
abort on inactivity = True
abort on stalled = True
abort on stall = True
inactivity = PT2M
expected task failures = foo.1

Expand Down
2 changes: 1 addition & 1 deletion tests/flakyfunctional/hold-release/15-hold-after/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[scheduler]
UTC mode = True
[[events]]
abort on stalled = True
abort on stall = True

[scheduling]
initial cycle point = 20140101T00
Expand Down
4 changes: 2 additions & 2 deletions tests/flakyfunctional/job-submission/19-chatty/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[scheduler]
[[events]]
abort on stalled timeout = True
stalled timeout = PT20S
abort on stall timeout = True
stall timeout = PT20S

[scheduling]
[[graph]]
Expand Down
4 changes: 2 additions & 2 deletions tests/flakyfunctional/restart/14-multicycle/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
[scheduler]
UTC mode = True
[[events]]
abort on stalled timeout = True
stalled timeout = PT3M
abort on stall timeout = True
stall timeout = PT3M
[scheduling]
initial cycle point = 20130923T00
final cycle point = 20130926T00
Expand Down
2 changes: 1 addition & 1 deletion tests/flakyfunctional/restart/21-task-elapsed/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
UTC mode=True
cycle point format = %Y
[[events]]
abort on stalled = True
abort on stall = True
abort on inactivity = True
inactivity = PT3M
[scheduling]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ BASE_GLOBAL_CONFIG="
interval = PT5S
[[events]]
abort on inactivity = True
abort on stalled timeout = True
abort on stall timeout = True
inactivity = PT2M
stalled timeout = PT2M
stall timeout = PT2M
"
#-------------------------------------------------------------------------------
# test that workflows will not attempt to auto stop-restart if there is no
Expand Down
4 changes: 2 additions & 2 deletions tests/flakyfunctional/restart/40-auto-restart-force-stop.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ BASE_GLOBAL_CONFIG="
interval = PT5S
[[events]]
abort on inactivity = True
abort on stalled timeout = True
abort on stall timeout = True
inactivity = PT2M
stalled timeout = PT2M
stall timeout = PT2M
"
#-------------------------------------------------------------------------------
# test the force shutdown option (auto stop, no restart) in condemned hosts
Expand Down
2 changes: 1 addition & 1 deletion tests/flakyfunctional/restart/46-stop-clock-time.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ init_workflow "${TEST_NAME_BASE}" <<'__FLOW_CONFIG__'
i = 1..10
[scheduler]
[[events]]
abort on stalled = True
abort on stall = True
abort on inactivity = True
inactivity = P2M
[scheduling]
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/authentication/basic/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
another_metadata = 1
[scheduler]
[[events]]
stalled timeout = PT1M
abort on stalled timeout = True
stall timeout = PT1M
abort on stall timeout = True
[scheduling]
cycling mode = integer
initial cycle point = 1
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/broadcast/05-bad-point/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# And see github #1415 - it did cause the scheduler to abort.
[scheduler]
[[events]]
abort on stalled timeout = True
stalled timeout=PT1M
abort on stall timeout = True
stall timeout=PT1M
[scheduling]
initial cycle point = 20150808
final cycle point = 20150808
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/broadcast/06-bad-namespace/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
description=Test broadcast to an undefined namespace fails.
[scheduler]
[[events]]
abort on stalled timeout = True
stalled timeout=PT1M
abort on stall timeout = True
stall timeout=PT1M
[scheduling]
initial cycle point = 20150808
final cycle point = 20150808
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/broadcast/08-space/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[scheduler]
UTC mode = True
[[events]]
abort on stalled timeout = True
stalled timeout=PT1M
abort on stall timeout = True
stall timeout=PT1M
[scheduling]
initial cycle point = 20200202
final cycle point = 20200202
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cli/00-cycle-points/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[scheduler]
UTC mode = true
[[events]]
abort on stalled timeout = true
stalled timeout = PT20S
abort on stall timeout = true
stall timeout = PT20S
[scheduling]
initial cycle point = 2015-01
final cycle point = 2015-01
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cli/02-now.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set_test_number 10
init_workflow "${TEST_NAME_BASE}" <<'__FLOW_CONFIG__'
[scheduler]
[[events]]
abort on stalled = true
abort on stall = true
abort on inactivity = true
inactivity = PT1M
[scheduling]
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/clock-expire/00-basic/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Skip a daily post-processing workflow if the 'copy' task has expired."""
cycle point format = %Y-%m-%dT%H
allow implicit tasks = True
[[events]]
abort on stalled timeout = True
stalled timeout = PT1M
abort on stall timeout = True
stall timeout = PT1M
[scheduling]
initial cycle point = now
final cycle point = +P3D
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cyclers/48-icp-cutoff.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ init_workflow "${TEST_NAME_BASE}" <<'__WORKFLOW__'
[scheduler]
cycle point time zone = Z
[[events]]
abort on stalled = True
abort on stall = True
[scheduling]
initial cycle point = 20171101T0000Z
[[graph]]
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cylc-cat-log/00-local/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[scheduler]
[[events]]
abort on stalled = True
abort on stall = True
abort on inactivity = True
inactivity = PT3M
[scheduling]
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-cat-log/01-remote/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!Jinja2
[scheduler]
[[events]]
abort on stalled timeout = True
stalled timeout = PT1M
abort on stall timeout = True
stall timeout = PT1M
[scheduling]
[[graph]]
R1 = a-task
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-cat-log/04-local-tail/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[scheduler]
[[events]]
abort on stalled timeout = True
stalled timeout = PT2M
abort on stall timeout = True
stall timeout = PT2M
[scheduling]
[[graph]]
R1 = foo
Expand Down
Loading

0 comments on commit 6f8a201

Please sign in to comment.