Skip to content

Commit

Permalink
Merge pull request #4948 from MetRonnie/remote-section
Browse files Browse the repository at this point in the history
Fix lack of errors/warnings for deprecated `[runtime][<task>][remote]retrieve job logs *` settings
  • Loading branch information
hjoliver authored Jul 21, 2022
2 parents db08c0b + 417bdcb commit 40868d2
Show file tree
Hide file tree
Showing 14 changed files with 250 additions and 160 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ to be stuck in UI due to discontinued graph of optional outputs.
[#4975](https://github.com/cylc/cylc-flow/pull/4975) - Fix selection of
platforms from `[job]` and `[remote]` configs.

[#4948](https://github.com/cylc/cylc-flow/pull/4948) - Fix lack of
errors/warnings for deprecated `[runtime][<task>][remote]retrieve job logs *`
settings.

[#4970](https://github.com/cylc/cylc-flow/pull/4970) - Fix handling of suicide
triggers in back-compat mode.

Expand Down
54 changes: 23 additions & 31 deletions cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,14 @@
# Regex to check whether a string is a command
REC_COMMAND = re.compile(r'(`|\$\()\s*(.*)\s*([`)])$')

# Cylc8 Deprecation note.
REPLACED_BY_PLATFORMS = '''
.. warning::
.. deprecated:: 8.0.0
.. deprecated:: 8.0.0
This will be removed in a future version of Cylc 8.
Use :cylc:conf:`flow.cylc[runtime][<namespace>]platform` instead.
This is used to select a matching platform.
It will be removed in a future version of Cylc 8.
Please set a suitable platform in
:cylc:conf:`flow.cylc[runtime][<namespace>]platform` instead.
:ref:`See the migration guide <MajorChangesPlatforms>`.
'''


Expand Down Expand Up @@ -214,11 +213,12 @@ def get_script_common_text(this: str, example: Optional[str] = None):
''')

Conf('install', VDR.V_STRING_LIST, desc='''
Configure directories and files to be installed on remote hosts.
Configure custom directories and files to be installed on remote
hosts.
.. note::
The following directories are installed by default:
The following directories already get installed by default:
* ``app/``
* ``bin/``
Expand Down Expand Up @@ -1294,48 +1294,40 @@ def get_script_common_text(this: str, example: Optional[str] = None):
excluded by omission from an ``include`` list.
''')

with Conf('job', desc=dedent('''
.. deprecated:: 8.0.0
with Conf('job', desc=REPLACED_BY_PLATFORMS + dedent('''
This section configures the means by which cylc submits task
job scripts to run.
''') + REPLACED_BY_PLATFORMS):
''')):
Conf('batch system', VDR.V_STRING, desc='''
Batch/Queuing system to submit task jobs to.
.. deprecated:: 8.0.0
Kept for back compatibility but replaced by
:cylc:conf:`global.cylc[platforms][<platform name>]
job runner`.
Batch/queuing system (aka job runner) to submit task
jobs to.
''')
Conf('batch submit command template', VDR.V_STRING, desc='''
Override the default job submission command for the chosen
batch system.
.. seealso::
.. deprecated:: 8.0.0
Kept for back compatibility but replaced by
:cylc:conf:`global.cylc[platforms][<platform name>]
job runner command template`.
''')
with Conf('remote', desc=dedent('''
.. deprecated:: 8.0.0
Override the default job submission command for the chosen
batch system.
''')

''') + REPLACED_BY_PLATFORMS):
with Conf('remote', desc=REPLACED_BY_PLATFORMS):
Conf('host', VDR.V_STRING, desc=REPLACED_BY_PLATFORMS)
# TODO: Convert URL to a stable or latest release doc after 8.0
# https://github.com/cylc/cylc-flow/issues/4663
Conf('owner', VDR.V_STRING, desc="""
This setting is obsolete at Cylc 8.
.. warning::
.. seealso::
This setting is obsolete at Cylc 8.
`Documentation on changes to remote owner
<https://cylc.github.io/cylc-doc/latest/html/
7-to-8/major-changes/remote-owner.html>`_
See :ref:`documentation on changes to remote owner
<728.remote_owner>`
""")
Conf('retrieve job logs', VDR.V_BOOLEAN,
desc=REPLACED_BY_PLATFORMS)
Expand Down
13 changes: 8 additions & 5 deletions cylc/flow/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,9 +1294,11 @@ def configure_sim_modes(self):

# Dummy mode jobs should run on platform localhost
# All Cylc 7 config items which conflict with platform are removed.
for section, key, _ in FORBIDDEN_WITH_PLATFORM:
if (section in rtc and key in rtc[section]):
rtc[section][key] = None
for section, keys in FORBIDDEN_WITH_PLATFORM.items():
if section in rtc:
for key in keys:
if key in rtc[section]:
rtc[section][key] = None

rtc['platform'] = 'localhost'

Expand Down Expand Up @@ -2071,8 +2073,9 @@ def _proc_triggers(self, parser, seq, task_triggers):

if suicides and not cylc.flow.flags.cylc7_back_compat:
LOG.warning(
f"{suicides} suicide triggers detected. These are rarely"
" needed in Cylc 8 - have you upgraded from Cylc 7 syntax?"
f"{suicides} suicide trigger(s) detected. These are rarely "
"needed in Cylc 8 - see https://cylc.github.io/cylc-doc/"
"latest/html/7-to-8/major-changes/suicide-triggers.html"
)

def set_required_outputs(
Expand Down
Loading

0 comments on commit 40868d2

Please sign in to comment.