Skip to content

remove Cylc 7 compatibility mode - #7325

Merged
MetRonnie merged 9 commits into
cylc:masterfrom
oliver-sanders:compat
Aug 5, 2026
Merged

remove Cylc 7 compatibility mode#7325
MetRonnie merged 9 commits into
cylc:masterfrom
oliver-sanders:compat

Conversation

@oliver-sanders

@oliver-sanders oliver-sanders commented Jun 3, 2026

Copy link
Copy Markdown
Member

A set of changes to remove Cylc 7 compatibility mode, issues:

Sibling PRs:

Summary:

  • remove cylc 7 compatibility mode:
    • Closes drop compatibility mode #6849
    • Remove Cylc 7 compatibility mode.
    • Remove support for validating, (re)installing or (re)starting suite.rc workflows.
    • Keep support for CLI commands against workflows running under older versions of Cylc 8.
    • Remove legacy functional tests.
    • Add integration tests (to ensure suite.rc workflows cannot be started).
  • setup: unpin Jinja2:
  • suite.rc: schedule removal of remaining support
    • Cylc 8 is still suite.rc "aware" for now, it's needed for GUI/Tui/CLI.
    • Following the logic laid out in review BACK COMPAT code #7274, this support would be removed in Cylc 8.10.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes - off topic changes:
    • jinja2: back support removed interfaces (requested)
    • config: remove redundant parser argument (requested in review)
    • scan: add test for get_workflow_title (shortfall spotted in review to ensure back-compat not broken)
    • parser arguments standardised (unrelated, but a pain for testing)
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at remove documentation for Cylc 7 compatibility mode cylc-doc#939.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@oliver-sanders oliver-sanders added this to the 8.7.0 milestone Jun 3, 2026
@oliver-sanders oliver-sanders self-assigned this Jun 3, 2026
@oliver-sanders oliver-sanders changed the title Compat remove Cylc 7 compatibility mode Jun 3, 2026
oliver-sanders added a commit to oliver-sanders/cylc-doc that referenced this pull request Jun 3, 2026
@oliver-sanders
oliver-sanders marked this pull request as ready for review June 11, 2026 12:28
Comment on lines +140 to +144
asyncio.run(run(options, workflow_id))


async def run(
parser: COP, options: 'Values', workflow_id: str
options: 'Values', workflow_id: str

@oliver-sanders oliver-sanders Jun 11, 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.

Off-topic change: A couple of scripts were passing through the unused parser argument which was creating hassle for tests. These have been removed so all commands have the same basic interface.

oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this pull request Jun 11, 2026
* Support for running workflows defined by `suite.rc` files was removed
  in Cylc 8.7 (cylc#7325)
* However, Cylc 8 remains `suite.rc` "aware" in order to allow the GUI,
  Tui and CLI to list and operate on workflows running under older
  versions.
* A version has been set for the removal of this support in line with
  cylc#7274.
@oliver-sanders
oliver-sanders requested a review from hjoliver June 18, 2026 13:40
Comment thread cylc/flow/cfgspec/workflow.py Outdated

@hjoliver hjoliver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, nice tidy up.

@oliver-sanders
oliver-sanders requested a review from MetRonnie June 25, 2026 09:14
ChrisPaulBennett pushed a commit to cylc/cylc-doc that referenced this pull request Jun 26, 2026
* remove documentation for Cylc 7 compatibility mode

* See cylc/cylc-flow#7325

* user guide: add section on cylc versions and compatibility

* dictionary
Comment thread changes.d/6849.break.md Outdated
Comment thread changes.d/6850.break.md Outdated
Comment thread setup.cfg Outdated
Comment thread cylc/flow/flags.py
Comment thread cylc/flow/task_pool.py Outdated
Comment thread cylc/flow/workflow_files.py Outdated
Comment thread cylc/flow/config.py Outdated
Comment thread cylc/flow/workflow_files.py
Comment thread tests/functional/optional-outputs/08-finish-fail-c7-c8.t
Comment thread tests/functional/cylc-install/02-failures.t
Comment thread tests/functional/cylc-play/07-timezones-compat.t Outdated
Comment thread tests/functional/xtriggers/04-suite_state.t
Comment thread tests/integration/scripts/test_validate.py Outdated
Comment thread tests/integration/test_task_pool.py
Comment thread tests/unit/test_config.py Outdated
@MetRonnie MetRonnie mentioned this pull request Jul 6, 2026
8 tasks
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this pull request Jul 9, 2026
* Support for running workflows defined by `suite.rc` files was removed
  in Cylc 8.7 (cylc#7325)
* However, Cylc 8 remains `suite.rc` "aware" in order to allow the GUI,
  Tui and CLI to list and operate on workflows running under older
  versions.
* A version has been set for the removal of this support in line with
  cylc#7274.
@oliver-sanders

Copy link
Copy Markdown
Member Author

Rebased, deconflicted and addressed feedback.

oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this pull request Jul 10, 2026
* Support for running workflows defined by `suite.rc` files was removed
  in Cylc 8.7 (cylc#7325)
* However, Cylc 8 remains `suite.rc` "aware" in order to allow the GUI,
  Tui and CLI to list and operate on workflows running under older
  versions.
* A version has been set for the removal of this support in line with
  cylc#7274.
@oliver-sanders

oliver-sanders commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Have now added: 9be3f5d

  • Back support Jinja2 interfaces deprecated at 3.0 and removed at 3.1.
  • Jinja2 renamed a bunch of functions and deprecated their old names.
  • Our users didn't spot this as Python warnings are not visible to them.
  • As of Jinja2: catch and log warnings #7365 (8.6.6) Python warnings
    originating from Jinja2 will be turned into Cylc warnings.
  • To provide a migration window, the old function names will be supported
    in Cylc 8.7.x and removed in 8.8.0.

oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this pull request Jul 10, 2026
* Support for running workflows defined by `suite.rc` files was removed
  in Cylc 8.7 (cylc#7325)
* However, Cylc 8 remains `suite.rc` "aware" in order to allow the GUI,
  Tui and CLI to list and operate on workflows running under older
  versions.
* A version has been set for the removal of this support in line with
  cylc#7274.
@oliver-sanders
oliver-sanders requested a review from MetRonnie July 10, 2026 14:46

@hjoliver hjoliver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reapproving post @MetRonnie 's much more thorough review! (the changes look good)

Comment thread tests/integration/scripts/test_install.py Outdated
Comment thread cylc/flow/task_pool.py Outdated
Comment thread cylc/flow/workflow_files.py Outdated
Comment thread tests/functional/xtriggers/04-suite_state.t Outdated
Comment thread cylc/flow/cfgspec/globalcfg.py Outdated
Comment thread cylc/flow/parsec/jinja2support.py Outdated
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this pull request Jul 17, 2026
* Support for running workflows defined by `suite.rc` files was removed
  in Cylc 8.7 (cylc#7325)
* However, Cylc 8 remains `suite.rc` "aware" in order to allow the GUI,
  Tui and CLI to list and operate on workflows running under older
  versions.
* A version has been set for the removal of this support in line with
  cylc#7274.
@oliver-sanders

Copy link
Copy Markdown
Member Author

@MetRonnie, please the recent force-push which address feedback above:

  • Remove the obsolete TaskPool.get_tasks_by_point interface.
  • Misc minor stuff.
  • Add a test for get_workflow_title which also ensures this interface continues to work with suite.rc files.
  • Refactors whole workflow config file detection stuff, the previous approach was hard to follow, but the motive was restoring support for flow.cylc -> suite.rc sylinks which we apparently supported before (support I accidentally removed earlier).

@hjoliver, you may want to look over the last four commits:

  • jinja2: back support removed interfaces:
  • refactor workflow detection logic:
    • Clean up the code which detects suite.rc / flow.cylc files and determines what is and isn't a valid workflow config.
  • scan: add test for get_workflow_title:
    • (Unimportant, a Cylc 7 gcylc thing).
  • task_pool: remove obsolete get-tasks_by_point interface:
    • Small unrelated efficiency improvement spotted during review.

@oliver-sanders
oliver-sanders requested a review from MetRonnie July 17, 2026 10:19

@MetRonnie MetRonnie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(Got a test failure)

Comment thread cylc/flow/parsec/jinja2support.py Outdated
Comment thread cylc/flow/workflow_files.py Outdated
Comment on lines +382 to +385
# flow.cylc present
(tmp_path / WorkflowFiles.SUITE_RC).unlink()
with pytest.raises(WorkflowConfigError):
await validate(ValidateOptions(), str(tmp_path))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should not raise an error, as flow.cylc only should be ok? (Currently the error is because the file is empty so not a valid config)

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.

The previous two examples raise WorkflowFilesError, this one raises WorkflowConfigError which demonstrates the flow.cylc file is being accepted.

A little confusing admirably, I've added a match pattern and a comment to clarify.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it would have been preferable to just have a minimal valid config, but whatever

Comment thread tests/unit/test_workflow_files.py Outdated
* Closes cylc#6849
* Remove Cylc 7 compatibility mode.
* Remove support for validating, (re)installing or (re)starting
  `suite.rc` workflows.
* Keep support for CLI commands against workflows running under older
  versions of Cylc 8.
* Remove legacy functional tests.
* Add integration tests (to ensure `suite.rc` workflows cannot be
  started).
* Remove redundant Parsec `silent` option.
* Closes cylc#6850
* Remove the upper pin on Jinja2 allowing the use of newer versions.
* The flags module contains global variables, generally considered an
  anti-pattern.
* We're down to the last flag, add a note to discourage the addition of
  any new ones!
* Support for running workflows defined by `suite.rc` files was removed
  in Cylc 8.7 (cylc#7325)
* However, Cylc 8 remains `suite.rc` "aware" in order to allow the GUI,
  Tui and CLI to list and operate on workflows running under older
  versions.
* A version has been set for the removal of this support in line with
  cylc#7274.
* Back support Jinja2 interfaces deprecated at 3.0 and removed at 3.1.
* Jinja2 renamed a bunch of functions and deprecated their old names.
* Our users didn't spot this as Python warnings are not visible to them.
* As of cylc#7365 (8.6.6) Python warnings
  originating from Jinja2 will be turned into Cylc warnings.
* To provide a migration window, the old function names will be supported
  in Cylc 8.7.x and removed in 8.8.0.
* Reinstate support for `flow.cylc -> suite.rc` symlinks (which we've
  supported to date with no warnings).
* Test will ensure `suit.rc` files remain supported post removal of Cylc
  7 compatibility mode until purposefully withdrawn in a later version.
@oliver-sanders

Copy link
Copy Markdown
Member Author

(ISC004 lint failure to be fixed on 8.6.x)

@oliver-sanders

Copy link
Copy Markdown
Member Author

Latest changes.

  • Outstanding feedback addressed.
  • Warning mechanism introduced to ensure those leaning on back-supported interfaces get warned appropriately.
  • Functional tests fixed (log message format change).

@hjoliver

Copy link
Copy Markdown
Member

@hjoliver, you may want to look over the last four commits: ...

LGTM

@hjoliver

Copy link
Copy Markdown
Member

N.B. I had also noticed get_tasks_by_point in other work: #7325 (comment)

@MetRonnie MetRonnie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've locally run the lint tests that were skipped due to the unrelated flake8 issue

@MetRonnie

Copy link
Copy Markdown
Member

LGTM

Taking that as your approval...

@MetRonnie
MetRonnie merged commit 6057e80 into cylc:master Aug 5, 2026
28 of 29 checks passed
@oliver-sanders
oliver-sanders deleted the compat branch August 5, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jinja2: bump version drop compatibility mode

3 participants