Skip to content
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
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ cylc tui integer-cycling
[Migration Guide](https://cylc.github.io/cylc-doc/stable/html/7-to-8/index.html)
| [Migration Support](https://cylc.discourse.group/c/cylc/7-to-8/13)

Cylc 8 can run most Cylc 7 workflows in compatibility mode with little to no
changes, go through the
[migration guide](https://cylc.github.io/cylc-doc/stable/html/7-to-8/index.html)
for more details.

Quick summary of major changes:

* Python 2 -> 3.
Expand All @@ -68,7 +63,7 @@ Quick summary of major changes:
* `cylc restart <id>` -> `cylc play <id>`
* `rose suite-run` -> `cylc install; cylc play <id>`
* The core package containing Cylc scheduler program has been renamed cylc-flow.
* Cylc review has been removed, the Cylc 7 version remains Cylc 8 compatible.
* Cylc Review has been moved to [cylc-uiserver](https://github.com/cylc/cylc-uiserver).


### Citations & Publications
Expand Down
13 changes: 1 addition & 12 deletions cylc/flow/broadcast_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,19 +226,8 @@ def load_db_broadcast_states(self, row_idx, row):
"key": key,
"value": value})

# BACK COMPAT: post_load_db_coerce
# The DB at 8.0.x stores Interval values as neither ISO8601 duration
# string or DurationFloat. This has been fixed at 8.1.0.
# url:
# https://github.com/cylc/cylc-flow/pull/5138
# from:
# 8.0.x
# to:
# 8.1.x
# remove at:
# 8.7
Comment on lines -229 to -239

@MetRonnie MetRonnie Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment now only applies to a specific method of the BroadcastConfigValidator - there is already a comment over there:

# BACK COMPAT: BroadcastConfigValidator.coerce_interval
# The DB at 8.0.x stores Interval values as neither ISO8601 duration
# string or DurationFloat. This has been fixed at 8.1.0, and
# the following method acts as a bridge between fixed and broken.
# url: https://github.com/cylc/cylc-flow/pull/5138
# from: 8.0
# to: 8.1
# remove after: https://github.com/cylc/cylc-flow/issues/7339
@classmethod
def coerce_interval(cls, value, keys):

def post_load_db_coerce(self):
"""Coerce DB loaded values to config objects, i.e. DurationFloat."""
"""Coerce DB loaded values to config objects."""
for namespaces in self.broadcasts.values():
for settings in namespaces.values():
BroadcastConfigValidator().validate(
Expand Down
85 changes: 41 additions & 44 deletions cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
TASK_CONFIG_RUN_MODES,
RunMode,
)
from cylc.flow.task_events_mgr import EventData
from cylc.flow.task_events_mgr import EventData as TED
from cylc.flow.workflow_events import EventData as WED


# Regex to check whether a string is a command
Expand Down Expand Up @@ -247,13 +248,6 @@ def get_script_common_text(this: str, example: Optional[str] = None):
``False`` after finishing the :cylc:conf:`flow.cylc[runtime]`
section.

.. admonition:: Cylc 7 compatibility mode

In :ref:`Cylc_7_compat_mode`, implicit tasks are still
allowed unless you explicitly set this to ``False``, or
unless a ``rose-suite.conf`` file is present (to maintain
backward compatibility with Rose 2019).

.. versionadded:: 8.0.0
''')

Expand Down Expand Up @@ -376,11 +370,6 @@ def get_script_common_text(this: str, example: Optional[str] = None):

If not set, it will default to UTC (``Z``).

.. admonition:: Cylc 7 compatibility mode

In :ref:`Cylc_7_compat_mode`, it will default to the
local/system time zone, rather than UTC.

The time zone will persist over reloads/restarts following any
local time zone changes (e.g. if the
workflow is run during winter time, then stopped, then restarted
Expand Down Expand Up @@ -1917,8 +1906,8 @@ def get_script_common_text(this: str, example: Optional[str] = None):

.. deprecated:: 8.3.0

Please use the :ref:`workflow_state xtrigger
<Built-in Workflow State Triggers>` instead.
Please use the :ref:`workflow_state xtrigger
<Built-in Workflow State Triggers>` instead.
'''):
Conf('interval', VDR.V_INTERVAL, desc='''
Polling interval.
Expand Down Expand Up @@ -2106,11 +2095,6 @@ def upg(
) -> upgrader:
"""Upgrade old workflow configuration.

NOTE: We are silencing deprecation (and only deprecation) warnings
when in Cylc 7 compat mode to help support Cylc 7/8 compatible workflows
(which would loose Cylc 7 compatibility if users were to follow the
warnings and upgrade the syntax).

Args:
broadcast:
If truthy, tailors warning messages for the context of broadcasts.
Expand Down Expand Up @@ -2403,6 +2387,10 @@ def upgrade_graph_section(cfg: Dict[str, Any], descr: str) -> None:
LOG.warning(msg + note)


# BACK COMPAT
# from: 7
# to: 8.0
# remove at: 8.9
def upgrade_param_env_templates(cfg, descr):
"""Prepend contents of `[runtime][X][parameter environment templates]` to
`[runtime][X][environment]`."""
Expand All @@ -2419,7 +2407,8 @@ def upgrade_param_env_templates(cfg, descr):
first_warn = False
LOG.warning(
f' * (8.0.0) {dep % task_name} contents prepended to '
f'{new % task_name}'
f'{new % task_name} - support for parameter environment '
'templates will be removed at Cylc 8.9'
)
for key, val in reversed(
task_items['parameter environment templates'].items()):
Expand Down Expand Up @@ -2451,47 +2440,55 @@ def warn_about_depr_platform(cfg):
# Fail if backticks subshell e.g. platform = `foo`:
is_platform_definition_subshell(task_cfg['platform'])
else:
# BACK COMPAT: get_platform_deprecated_settings
# remove at: 8.9
depr = get_platform_deprecated_settings(task_cfg, task_name)
if depr:
msg = "\n".join(depr)
LOG.warning(
"deprecated settings found "
f"(please replace with [runtime][{task_name}]platform):"
f"(replace with [runtime][{task_name}]platform "
"before Cylc 8.9):"
f"\n{msg}"
)


# BACK COMPAT: deprecated event handler templates
# from: 7
# to: 8.0
# remove at: 8.9
def warn_about_depr_event_handler_tmpl(cfg):
"""Warn if deprecated template strings appear in event handlers."""
if 'runtime' not in cfg:
return
deprecation_msg = (
'The event handler template variable "%({0})s" is deprecated - '
'use "%({1})s" instead.')
'The {0} event handler template variable "%({1})s" is deprecated and '
'will be removed in Cylc 8.9 - use "%({2})s" instead.'
)
# NOTE: Do NOT use .get() on OrderedDictWithDefaults -
# https://github.com/cylc/cylc-flow/pull/4975
if 'scheduler' in cfg and 'events' in (schd_cfg := cfg['scheduler']):
for handler in schd_cfg['events'].values():
for old, new in (
(WED.Suite.value, WED.Workflow.value),
(WED.Suite_UUID.value, WED.UUID.value),
(WED.SuiteURL.value, WED.WorkflowURL.value),
):
if f'%({old})' in handler:
LOG.warning(deprecation_msg.format('workflow', old, new))
for task in cfg['runtime']:
if 'events' not in cfg['runtime'][task]:
continue
for handler in cfg['runtime'][task]['events'].values():
if f'%({EventData.JobID_old.value})' in handler:
LOG.warning(
deprecation_msg.format(EventData.JobID_old.value,
EventData.JobID.value)
)
if f'%({EventData.JobRunnerName_old.value})' in handler:
LOG.warning(
deprecation_msg.format(EventData.JobRunnerName_old.value,
EventData.JobRunnerName.value)
)
if f'%({EventData.Suite.value})' in handler:
LOG.warning(
deprecation_msg.format(EventData.Suite.value,
EventData.Workflow.value)
)
if f'%({EventData.SuiteUUID.value})' in handler:
LOG.warning(
deprecation_msg.format(EventData.SuiteUUID.value,
EventData.UUID.value)
)
for old, new in (
(TED.Suite.value, TED.Workflow.value),
(TED.SuiteUUID.value, TED.UUID.value),
(TED.JobRunnerName_old.value, TED.JobRunnerName.value),
(TED.JobID_old.value, TED.JobID.value),
(TED.UserAtHost.value, TED.PlatformName.value),
):
if f'%({old})' in handler:
LOG.warning(deprecation_msg.format('task', old, new))


class RawWorkflowConfig(ParsecConfig):
Expand Down
6 changes: 3 additions & 3 deletions cylc/flow/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ async def set_prereqs_and_outputs(
Note, the "outputs" and "prerequisites" arguments might not be
populated in the mutation arguments so must provide defaults here.
"""
flow = back_compat_flow_all(flow) # BACK COMPAT (see func def)
flow = back_compat_flow_all(flow)
validate.consistency(outputs, prerequisites)
outputs = validate.outputs(outputs)
prerequisites = validate.prereqs(prerequisites)
Expand Down Expand Up @@ -507,7 +507,7 @@ async def remove_tasks(
flow: flows to remove the tasks from.
no_spawn: Do not spawn successors before removal.
"""
flow = back_compat_flow_all(flow) # BACK COMPAT (see func def)
flow = back_compat_flow_all(flow)
ids = validate.is_tasks(tasks)
validate.flow_opts(flow, flow_wait=False, allow_new_or_none=False)
yield
Expand Down Expand Up @@ -674,7 +674,7 @@ async def force_trigger_tasks(
cylc-admin/docs/proposal-group-trigger.md

"""
flow = back_compat_flow_all(flow) # BACK COMPAT (see func def)
flow = back_compat_flow_all(flow)
ids = validate.is_tasks(tasks)
validate.flow_opts(flow, flow_wait)
yield
Expand Down
39 changes: 19 additions & 20 deletions cylc/flow/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2719,14 +2719,10 @@ def process_metadata_urls(self):
try:
# Replace workflow and task name in workflow and task URLs.
# BACK COMPAT: suite_name
# url:
# https://github.com/cylc/cylc-flow/pull/4724
# from:
# Cylc7
# to:
# Cylc8
# remove at:
# Cylc8.x
# url: https://github.com/cylc/cylc-flow/pull/4724
# from: 7
# to: 8.0
# remove at: 8.9
self.cfg['meta']['URL'] = url % {
# cylc 7
'suite_name': self.workflow,
Expand All @@ -2739,7 +2735,8 @@ def process_metadata_urls(self):
) from None
else:
LOG.warning(
'Detected deprecated template variables in [meta]URL.'
'Detected deprecated template variables in [meta]URL. '
'Support will be removed in Cylc 8.9.'
'\nSee the configuration documentation for details.'
)

Expand All @@ -2754,14 +2751,10 @@ def process_metadata_urls(self):
}
except (KeyError, ValueError):
# BACK COMPAT: suite_name, task_name
# url:
# https://github.com/cylc/cylc-flow/pull/4724
# from:
# Cylc7
# to:
# Cylc8
# remove at:
# Cylc8.x
# url: https://github.com/cylc/cylc-flow/pull/4724
# from: 7
# to: 8.0
# remove at: 8.9
try:
cfg['meta']['URL'] = cfg['meta']['URL'] % {
# cylc 7
Expand All @@ -2778,7 +2771,8 @@ def process_metadata_urls(self):
else:
LOG.warning(
'Detected deprecated template variables in'
f' [runtime][{name}][meta]URL.'
f' [runtime][{name}][meta]URL. Support will be '
'removed in Cylc 8.9.'
'\nSee the configuration documentation for details.'
)
cfg['meta']['URL'] = RE_WORKFLOW_ID_VAR.sub(
Expand Down Expand Up @@ -2842,15 +2836,19 @@ def upgrade_clock_triggers(self):
for seq in taskdef.sequences:
taskdef.add_xtrig_label(label, seq)

# BACK COMPAT
# from: 7
# to: 8.0
# remove at: 8.9
def _upg_wflow_event_names(self) -> None:
"""Upgrade any Cylc 7 workflow handler/mail events names."""
for setting in ('handler events', 'mail events'):
event_names: Optional[List[str]] = self.cfg['scheduler']['events'][
event_names: list[str] | None = self.cfg['scheduler']['events'][
setting
]
if not event_names:
continue
upgraded: Dict[str, str] = {}
upgraded: dict[str, str] = {}
for i, event in enumerate(event_names):
if event in WorkflowEventHandler.EVENTS_DEPRECATED:
event_names[i] = upgraded[event] = (
Expand All @@ -2861,4 +2859,5 @@ def _upg_wflow_event_names(self) -> None:
f"{upgrader.depr_msg}\n"
f" * (8.0.0) [scheduler][events][{setting}] "
+ ', '.join(f'{k} -> {v}' for k, v in upgraded.items())
+ " - support for the old item will be removed at Cylc 8.9"
)
8 changes: 4 additions & 4 deletions cylc/flow/etc/job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ cylc__job__main() {
CYLC_WORKFLOW_OWNER="$(sed -n 's/^CYLC_WORKFLOW_OWNER=//p' "${contact}")"
export CYLC_WORKFLOW_HOST CYLC_WORKFLOW_OWNER
# BACK COMPAT: DEPRECATED environment variables
# remove at:
# Cylc8.x
# (note we can't warn about their usage other than cylc lint)
# remove at: 9.0?
export CYLC_SUITE_HOST="${CYLC_WORKFLOW_HOST}"
export CYLC_SUITE_OWNER="${CYLC_WORKFLOW_OWNER}"
fi

# BACK COMPAT: DEPRECATED environment variables
# remove at:
# Cylc8.x
# (note we can't warn about their usage other than cylc lint)
# remove at: 9.0?
export CYLC_SUITE_SHARE_DIR="${CYLC_WORKFLOW_SHARE_DIR}"
export CYLC_SUITE_SHARE_PATH="${CYLC_WORKFLOW_SHARE_DIR}"
export CYLC_SUITE_NAME="${CYLC_WORKFLOW_ID}"
Expand Down
2 changes: 0 additions & 2 deletions cylc/flow/graph_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ class GraphParser:
i.e.: if NOT end-of-chain OR left is None.

"""
CYLC7_COMPAT = "CYLC 7 BACK-COMPAT"

OP_AND = '&'
OP_OR = '|'
OP_AND_ERR = '&&'
Expand Down
Loading
Loading