Skip to content

Commit

Permalink
Merge pull request #3942 from MetRonnie/config-changes-3
Browse files Browse the repository at this point in the history
Remove "disable automatic shutdown"
  • Loading branch information
hjoliver authored Nov 12, 2020
2 parents 31d79e1 + d2a72ca commit bc8c48c
Show file tree
Hide file tree
Showing 16 changed files with 12 additions and 358 deletions.
10 changes: 1 addition & 9 deletions cylc/flow/cfgspec/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,6 @@
(e.g. ``+05:30``), given that the time zone is used as part of
task output filenames.
''')
Conf('disable automatic shutdown', VDR.V_BOOLEAN, desc='''
This has the same effect as the ``--no-auto-shutdown`` flag for
the suite run commands: it prevents the suite server program from
shutting down normally when all tasks have finished (a suite
timeout can still be used to stop the daemon after a period of
inactivity, however). This option can make it easier to re-trigger
tasks manually near the end of a suite run, during suite
development and debugging.
''')

with Conf('main loop'):
with Conf('<plugin name>'):
Expand Down Expand Up @@ -1369,6 +1360,7 @@ def upg(cfg, descr):
u.obsolete('8.0.0', ['cylc', 'abort if any task fails'])
u.obsolete('8.0.0', ['cylc', 'events', 'abort if any task fails'])
u.obsolete('8.0.0', ['cylc', 'events', 'mail retry delays'])
u.obsolete('8.0.0', ['cylc', 'disable automatic shutdown'])
u.deprecate(
'8.0.0',
['cylc', 'task event mail interval'],
Expand Down
1 change: 0 additions & 1 deletion cylc/flow/etc/syntax/cylc.lang
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
<keyword>exclude at start-up</keyword>
<keyword>exclude</keyword>
<keyword>env-script</keyword>
<keyword>disable automatic shutdown</keyword>
<keyword>description</keyword>
<keyword>default node attributes</keyword>
<keyword>default edge attributes</keyword>
Expand Down
1 change: 0 additions & 1 deletion cylc/flow/etc/syntax/cylc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
<RegExpr attribute='Keyword' String=' exclude at start-up '/>
<RegExpr attribute='Keyword' String=' exclude '/>
<RegExpr attribute='Keyword' String=' env-script '/>
<RegExpr attribute='Keyword' String=' disable automatic shutdown '/>
<RegExpr attribute='Keyword' String=' description '/>
<RegExpr attribute='Keyword' String=' default node attributes '/>
<RegExpr attribute='Keyword' String=' default edge attributes '/>
Expand Down
18 changes: 0 additions & 18 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ class Scheduler:
options: Values = None

# suite params
can_auto_stop: bool = True
stop_mode: StopMode = None
stop_task: str = None
stop_clock_time: int = None
Expand Down Expand Up @@ -525,14 +524,6 @@ async def configure(self):
if self.options.profile_mode:
self.previous_profile_point = 0
self.count = 0
if self.options.no_auto_shutdown is not None:
self.can_auto_stop = not self.options.no_auto_shutdown
elif (
self.config.cfg['scheduler']['disable automatic shutdown']
is not None
):
self.can_auto_stop = (
not self.config.cfg['scheduler']['disable automatic shutdown'])

self.profiler.log_memory("scheduler.py: end configure")

Expand Down Expand Up @@ -1179,13 +1170,6 @@ def _load_suite_params(self, row_idx, row):
if self.options.holdcp is None:
self.options.holdcp = value
LOG.info('+ hold point = %s', value)
elif key == self.suite_db_mgr.KEY_NO_AUTO_SHUTDOWN:
value = bool(int(value))
if self.options.no_auto_shutdown is None:
self.options.no_auto_shutdown = value
LOG.info('+ no auto shutdown = %s', value)
else:
LOG.debug('- no auto shutdown = %s (ignored)', value)
elif key == self.suite_db_mgr.KEY_STOP_CLOCK_TIME:
value = int(value)
if time() <= value:
Expand Down Expand Up @@ -1738,8 +1722,6 @@ def stop_clock_done(self):

def check_auto_shutdown(self):
"""Check if we should do an automatic shutdown: main pool empty."""
if not self.can_auto_stop:
return False
self.pool.release_runahead_tasks()
if self.pool.get_tasks():
return False
Expand Down
12 changes: 0 additions & 12 deletions cylc/flow/scheduler_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,6 @@ def get_option_parser(is_restart, add_std_opts=False):
help="Do not daemonize the suite (infers --format=plain)",
action="store_true", dest="no_detach")

parser.add_option(
"-a", "--no-auto-shutdown", help="Do not shut down"
" the suite automatically when all tasks have finished."
" This flag overrides the corresponding suite config item.",
action="store_true", dest="no_auto_shutdown")

parser.add_option(
"--auto-shutdown", help="Shut down"
" the suite automatically when all tasks have finished."
" This flag overrides the corresponding suite config item.",
action="store_false", dest="no_auto_shutdown")

parser.add_option(
"--profile", help="Output profiling (performance) information",
action="store_true", dest="profile_mode")
Expand Down
5 changes: 0 additions & 5 deletions cylc/flow/suite_db_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class SuiteDatabaseManager:
KEY_UTC_MODE = 'UTC_mode'
KEY_HOLD = 'is_held'
KEY_HOLD_CYCLE_POINT = 'holdcp'
KEY_NO_AUTO_SHUTDOWN = 'no_auto_shutdown'
KEY_RUN_MODE = 'run_mode'
KEY_STOP_CLOCK_TIME = 'stop_clock_time'
KEY_STOP_TASK = 'stop_task'
Expand Down Expand Up @@ -316,10 +315,6 @@ def put_suite_params(self, schd):
if value is not None:
self.db_inserts_map[self.TABLE_SUITE_PARAMS].append({
"key": key, "value": value})
if schd.options.no_auto_shutdown is not None:
self.db_inserts_map[self.TABLE_SUITE_PARAMS].append({
"key": self.KEY_NO_AUTO_SHUTDOWN,
"value": int(schd.options.no_auto_shutdown)})
for key in (self.KEY_STOP_CLOCK_TIME, self.KEY_STOP_TASK):
value = getattr(schd, key, None)
if value is not None:
Expand Down
38 changes: 0 additions & 38 deletions tests/flakyfunctional/events/31-dont-stall-succeeded.t

This file was deleted.

13 changes: 0 additions & 13 deletions tests/flakyfunctional/events/31-dont-stall-succeeded/flow.cylc

This file was deleted.

76 changes: 0 additions & 76 deletions tests/flakyfunctional/restart/47-no-auto-stop.t

This file was deleted.

3 changes: 1 addition & 2 deletions tests/functional/deprecations/01-cylc8-basic/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
required run mode =
force run mode =
task event mail interval =
disable automatic shutdown =
[[events]]
mail to =
mail from =
Expand Down Expand Up @@ -39,5 +40,3 @@
mail to =
mail smtp =
mail retry delays =


Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ WARNING - * (8.0.0) [cylc][reference test][suite shutdown event handler] - DELE
WARNING - * (8.0.0) [runtime][foo, cat, dog][job][shell] - DELETED (OBSOLETE)
WARNING - * (8.0.0) [runtime][foo, cat, dog][events][mail retry delays] - DELETED (OBSOLETE)
WARNING - * (8.0.0) [cylc][abort if any task fails] - DELETED (OBSOLETE)
WARNING - * (8.0.0) [cylc][disable automatic shutdown] - DELETED (OBSOLETE)
WARNING - * (8.0.0) [cylc][task event mail interval] -> [cylc][mail][task event batch interval] - value unchanged
WARNING - * (8.0.0) [cylc][events][mail to] -> [cylc][mail][to] - value unchanged
WARNING - * (8.0.0) [cylc][events][mail from] -> [cylc][mail][from] - value unchanged
Expand Down
78 changes: 0 additions & 78 deletions tests/functional/restart/48-enable-auto-stop.t

This file was deleted.

Loading

0 comments on commit bc8c48c

Please sign in to comment.