Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

Commit

Permalink
cylc#3147 address Oliver's feedback 1
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrmshin committed Jun 13, 2019
1 parent aec05a4 commit 69f897a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 122 deletions.
3 changes: 1 addition & 2 deletions cylc/flow/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def __init__(
# Relative, ISO8601 cycling.
self.final_point = get_point_relative(
fcp_str, self.initial_point).standardise()
except ValueError as exc:
except ValueError:
# (not relative)
pass
if self.final_point is None:
Expand Down Expand Up @@ -528,7 +528,6 @@ def __init__(
'%s is not a first parent' % fam)

if getattr(options, 'collapsed', None):
# on suite reload retain an existing state of collapse
# (used by the "cylc graph" viewer)
self.closed_families = getattr(self.options, 'collapsed', None)
elif is_reload:
Expand Down
13 changes: 7 additions & 6 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ def _load_suite_params(self, row_idx, row):
if row_idx == 0:
LOG.info('LOADING suite parameters')
key, value = row
if key == 'icp':
if key in ['icp', 'initial_point']:
if self.options.ignore_icp:
LOG.debug('- initial point = %s (ignored)' % value)
elif self.options.icp is None:
Expand All @@ -989,7 +989,7 @@ def _load_suite_params(self, row_idx, row):
elif self.options.startcp is None:
self.options.startcp = value
LOG.info('+ start point = %s' % value)
elif key == 'fcp':
elif key in ['fcp', 'final_point']:
if self.options.ignore_fcp:
LOG.debug('- override final point = %s (ignored)' % value)
elif self.options.fcp is None:
Expand Down Expand Up @@ -1346,11 +1346,12 @@ def set_auto_restart(self, restart_delay=None,
if self.auto_restart_time is not None:
return True

# No detach suite should not auto restart, but should fail and be dealt
# with by caller.
# Suite host is condemned and suite running in no detach mode.
# Raise an error to cause the suite to abort.
# This should raise an "abort" event and return a non-zero code to the
# caller still attached to the suite process.
if self.options.no_detach:
raise RuntimeError(
'Suite cannot automatically restart in no detach mode')
raise RuntimeError('Suite host condemned in no detach mode')

# Check suite is able to be safely restarted.
if not self.can_auto_restart():
Expand Down
2 changes: 0 additions & 2 deletions cylc/flow/suite_db_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ def put_suite_params(self, schd):
{"key": "run_mode", "value": schd.config.run_mode()},
{"key": "cylc_version", "value": CYLC_VERSION},
{"key": "UTC_mode", "value": get_utc_mode()},
{"key": "initial_point", "value": str(schd.config.initial_point)},
{"key": "final_point", "value": final_point_str},
])
if schd.config.cfg['cylc']['cycle point format']:
self.db_inserts_map[self.TABLE_SUITE_PARAMS].append({
Expand Down
2 changes: 0 additions & 2 deletions tests/cylc-take-checkpoints/00-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ contains_ok 'cylc-ls-checkpoints-1.out' <<'__OUT__'
1|DATE|snappy
# SUITE PARAMS (KEY|VALUE)
final_point|2020
initial_point|2016
run_mode|live
# TASK POOL (CYCLE|NAME|SPAWNED|STATUS|HOLD_SWAP)
Expand Down
2 changes: 0 additions & 2 deletions tests/database/00-simple/select-suite-params.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
UTC_mode|0
cylc_version|<SOME-VERSION>
final_point|1
initial_point|1
run_mode|live
6 changes: 0 additions & 6 deletions tests/restart/19-checkpoint.t
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ contains_ok 'cylc-ls-checkpoints-1.out' <<'__OUT__'
1|DATE|reload-init
# SUITE PARAMS (KEY|VALUE)
final_point|2020
initial_point|2016
is_held|1
run_mode|live
Expand All @@ -67,8 +65,6 @@ contains_ok 'cylc-ls-checkpoints-2.out' <<'__OUT__'
2|DATE|reload-done
# SUITE PARAMS (KEY|VALUE)
final_point|2020
initial_point|2016
is_held|1
run_mode|live
Expand All @@ -87,8 +83,6 @@ contains_ok 'cylc-ls-checkpoints-0.out' <<'__OUT__'
# SUITE PARAMS (KEY|VALUE)
run_mode|live
initial_point|2016
final_point|2020
# BROADCAST STATES (POINT|NAMESPACE|KEY|VALUE)
2017|t1|script|true
Expand Down
102 changes: 0 additions & 102 deletions tests/restart/36-auto-restart-incompatible.t

This file was deleted.

0 comments on commit 69f897a

Please sign in to comment.