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

Fix lack of errors/warnings for deprecated [runtime][<task>][remote]retrieve job logs * settings #4948

Merged
merged 6 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ default job runner directives for platforms.
[#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 @@ -1303,48 +1303,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 @@ -1306,9 +1306,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 @@ -2083,8 +2085,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