Skip to content

Commit a03de67

Browse files
Merge pull request #382 from oliver-sanders/migration-guide-2
728: migration guide
2 parents 4968de0 + c3e8379 commit a03de67

File tree

10 files changed

+452
-128
lines changed

10 files changed

+452
-128
lines changed

src/7-to-8/cheat-sheet.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _728.cheat_sheet:
2+
13
Cheat Sheet
24
===========
35

src/7-to-8/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Cylc 8 differs from Cylc 7 in many ways: architecture, scheduling
1414
algorithm, security, UIs, working practices, and more.
1515

1616
.. toctree::
17-
:maxdepth: 2
17+
:maxdepth: 1
1818

1919
summary
20-
caveats
2120
cheat-sheet
2221
major-changes/index
22+
caveats

src/7-to-8/major-changes/cli.rst

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
Command Line Interface
2+
======================
3+
4+
.. admonition:: Does This Change Affect Me?
5+
:class: tip
6+
7+
This will affect you if you use the Cylc command line interface.
8+
9+
10+
Overview
11+
--------
12+
13+
* Some commands have been renamed e.g. ``cylc run`` -> ``cylc play``.
14+
* Some tools have been added or removed.
15+
* The task ID format has changed.
16+
17+
For a quick side by side comparison see the :ref:`728.cheat_sheet`.
18+
19+
20+
Full List Of Command Changes
21+
----------------------------
22+
23+
The command line has been simplified from Cylc 7 with some commands being
24+
renamed or removed.
25+
26+
.. _license: https://github.com/cylc/cylc-flow/blob/master/COPYING
27+
28+
.. rubric:: Commands which have been removed or changed:
29+
30+
``cylc checkpoint``
31+
- Database checkpoints are no longer needed.
32+
- All task state changes are written to the database when they occur.
33+
- Remaining use cases can be handled by :term:`reflows <reflow>`
34+
which allow a new execution of the graph to be started from an
35+
arbitrary point in the graph.
36+
``cylc conditions``
37+
- See the `license`_ file for conditions of usage
38+
- The Cylc license remains unchanged from Cylc 7.
39+
``cylc documentation``
40+
- We no longer include a command for locating this documentation.
41+
``cylc edit``
42+
- Use a text editor to edit the workflow configuration file.
43+
``cylc insert``
44+
- Task insertion is now automatic, use ``cylc trigger``.
45+
``cylc jobscript``
46+
- It is no longer possible generate a jobscript from outside of a workflow.
47+
``cylc monitor``
48+
- There is now a new more powerful terminal user interface (TUI).
49+
- Try ``cylc tui``.
50+
``cylc nudge``
51+
- No longer required.
52+
``cylc print``
53+
- Equivalent to ``cylc scan --states=all``.
54+
``cylc register``
55+
- Registration is no longer required, all workflows in the ``~/cylc-run``
56+
directory are "registered" automatically.
57+
- To install a workflow from a working copy use ``cylc install``.
58+
``cylc reset``
59+
- It is no longer possible to manually change a task's state.
60+
- You can, however, override the outputs the task generated which has a
61+
similar effect with ``cylc set-outputs``.
62+
``cylc restart``
63+
- ``cylc run``, ``cylc pause`` and ``cylc release`` have been combined into
64+
``cylc play``.
65+
``cylc review``
66+
- The read-only ``cylc review`` web GUI has been removed.
67+
- The latest Cylc 7 version of ``cylc review`` is Cylc 8 compatible
68+
so can still be used to monitor both Cylc 7 and Cylc 8 workflows
69+
side by side.
70+
``cylc run``
71+
- ``cylc run``, ``cylc pause`` and ``cylc release`` have been combined into
72+
``cylc play``.
73+
``cylc search``
74+
- Use ``grep`` or a text editor to search the workflow configuration or
75+
source directory.
76+
``cylc spawn``
77+
- Spawning is now performed automatically, use ``cylc trigger`` to run a task.
78+
``cylc submit``
79+
- It is no longer possible to submit a job from outside of a workflow.
80+
``cylc warranty``
81+
- The Cylc license remains unchanged from Cylc 7.
82+
83+
.. rubric:: Graphical User Interfaces (GUIs):
84+
85+
The GTK based GUI based GUIs have been removed, please use the new web based
86+
GUI. Consequently the following commands have also been removed:
87+
88+
- ``cylc gpanel``
89+
- ``cylc gscan``
90+
- ``cylc gcylc``
91+
92+
The ``cylc gui`` command remains, it launches a standalone version of the
93+
web GUI (providing the `Cylc UI Server`_ is installed).
94+
95+
96+
Cylc 8 Standardised IDs
97+
-----------------------
98+
99+
In Cylc 7 there were two ways to specify a task:
100+
101+
.. code-block:: none
102+
103+
task.cycle
104+
cycle/task
105+
106+
At Cylc 8 we have removed the former and extended the latter to provide a
107+
unique identifier for all workflows, cycles, tasks and jobs using a
108+
standardised format:
109+
110+
.. code-block:: none
111+
112+
~user/workflow//cycle/task/job
113+
114+
Consequently task IDs have changed:
115+
116+
.. code-block:: none
117+
118+
# old
119+
cycle.task
120+
121+
# new
122+
cycle/task
123+
124+
An example using ``cylc trigger``:
125+
126+
.. code-block:: bash
127+
128+
# old
129+
cylc trigger workflow task.cycle
130+
131+
# new
132+
cylc trigger workflow//cycle/task
133+
134+
Cylc 8 still supports the old format, however, the new format unlocks extra
135+
functionality e.g:
136+
137+
.. code-block:: bash
138+
139+
# stop all running workflows
140+
cylc stop '*'
141+
142+
# pause all running workflows
143+
cylc pause '*'
144+
145+
# (re-)trigger all failed tasks in all running workflows
146+
cylc trigger '*//*:failed'
147+
148+
# hold all tasks in the cycle "2000" in workflows with IDs
149+
# beginning with "model"
150+
cylc hold 'model*//2000'
151+
152+
# delete the run directories for all workflows with IDs
153+
# beginning with "model_a/"
154+
cylc clean 'model_a/*'
155+
156+
For more information run ``cylc help id``.
157+
158+
.. _ID post on Discourse: https://cylc.discourse.group/t/cylc-8-id-changes/425
159+
160+
For a quick overview of the motivation see the `ID post on Discourse`_.

src/7-to-8/major-changes/before-you-start.rst renamed to src/7-to-8/major-changes/compatibility-mode.rst

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,56 @@
1-
.. _AutoConfigUpgrades:
1+
.. _cylc_7_compat_mode:
22

3-
Cylc Configuration Upgrader
4-
===========================
3+
Cylc 7 Compatibility Mode
4+
=========================
55

6-
.. admonition:: Does This Affect Me?
6+
.. admonition:: Does This Change Affect Me?
77
:class: tip
88

9-
This may affect you if you are working with workflows written before Cylc 8,
10-
and you see warnings or an ``IllegalItemError`` when validating.
9+
This will affect you if you want to run run Cylc 7 workflows (using the
10+
``suite.rc`` filename) using Cylc 8.0
1111

1212
Overview
1313
--------
1414

15-
Cylc has a built in configuration upgrader. **Cylc 8** can upgrade Cylc 7
16-
workflows on the fly if they use up-to-date Cylc 7 syntax, but *not
17-
if validation with Cylc 7 gives deprecation warnings*.
15+
The old ``suite.rc`` filename triggers a backward compatibility mode in which:
1816

19-
Solution
20-
--------
17+
- :term:`implicit tasks <implicit task>` are allowed by default
18+
19+
- (unless a ``rose-suite.conf`` file is found in the :term:`run directory`
20+
for consistency with ``rose suite-run`` behaviour)
21+
- (by default, Cylc 8 does not allow implicit tasks)
22+
23+
- :term:`cycle point time zone` defaults to the local time zone
24+
25+
- (by default, Cylc 8 defaults to UTC)
26+
27+
- waiting tasks are pre-spawned to mimic the Cylc 7 scheduling algorithm and
28+
stall behaviour, and these require
29+
:term:`suicide triggers <suicide trigger>`
30+
for alternate :term:`graph branching`
31+
32+
- (Cylc 8 spawns tasks on demand and suicide triggers are not needed for
33+
branching)
34+
35+
- task ``succeeded`` outputs are *required* so the scheduler will retain
36+
failed tasks as incomplete
37+
38+
- (in Cylc 8, all outputs are *required* unless marked as optional by new
39+
``?`` syntax)
40+
41+
42+
Required Changes
43+
----------------
44+
45+
Providing your Cylc 7 workflow does not use syntax that was deprecated at Cylc 7
46+
you should be able to run it without any modifications.
47+
48+
To see if your workflow uses deprecated syntax run ``cylc validate`` using
49+
Cylc 7.
50+
51+
If tasks in your workflow call Cylc commands directly it might be necessary to
52+
modify them to be compatible with command line interface changes.
2153

22-
To avoid problems with old settings you should validate your workflow using
23-
Cylc 7. Look for deprecation warnings and edit the workflow configuration to
24-
eliminate these warnings.
2554

2655
Example
2756
-------
@@ -44,21 +73,21 @@ Running ``cylc validate`` on this configuration at **Cylc 7** we see that the
4473
workflow is valid, but we are warned that ``pre-command scripting``
4574
was replaced by ``pre-script`` at 6.4.0:
4675

47-
.. code-block::
76+
.. code-block:: console
4877
:caption: Cylc 7 warning of a deprecated configuration
4978
50-
> cylc validate .
79+
$ cylc validate .
5180
WARNING - deprecated items were automatically upgraded in 'suite definition':
5281
WARNING - * (6.4.0) [runtime][task][pre-command scripting] -> [runtime][task][pre-script] - value unchanged
5382
Valid for cylc-7.8.7
5483
5584
**Cylc 7** has upgraded this for us, but at **Cylc 8** this workflow will fail
5685
validation.
5786

58-
.. code-block::
87+
.. code-block:: console
5988
:caption: Cylc 8 failing to validate an obsolete configuration
6089
61-
> cylc validate .
90+
$ cylc validate .
6291
WARNING - deprecated graph items were automatically upgraded in "workflow definition":
6392
* (8.0.0) [scheduling][dependencies][X]graph -> [scheduling][graph]X - for X in:
6493
R1

src/7-to-8/major-changes/cylc-install.rst

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ Examples
4444

4545
You can install from inside the development directory:
4646

47-
.. code-block:: bash
47+
.. code-block:: console
4848
49-
> cd ~/cylc-src/my-workflow
50-
> cylc install
49+
$ cd ~/cylc-src/my-workflow
50+
$ cylc install
5151
INSTALLED my-workflow/run1 from /home/me/cylc-src/my-workflow
5252
5353
You can install by workflow name if the workflow is in ``~/cylc-src``.
5454

55-
.. code-block:: bash
55+
.. code-block:: console
5656
57-
> cylc install my-workflow
57+
$ cylc install my-workflow
5858
INSTALLED my-workflow/run2 from /home/me/cylc-src/my-workflow
5959
6060
.. note::
@@ -64,6 +64,10 @@ You can install by workflow name if the workflow is in ``~/cylc-src``.
6464
``cylc install`` also creates a symlink from the most recently installed run
6565
directory to ``~/cylc-run/<my_workflow>/runN``.
6666

67+
.. tip::
68+
69+
Unwanted run directories can be removed with ``cylc clean``.
70+
6771
You can also use ``-C`` (or ``--directory``) to set a source path:
6872

6973
.. code-block:: bash
@@ -76,41 +80,54 @@ Once you have installed a workflow you can use ``cylc play`` to run it - see
7680
You can delete installed workflows using ``cylc clean`` - see
7781
:ref:`Removing-workflows`.
7882

83+
A ``.cylcignore`` file can be used to control which files ``cylc install``
84+
transfers to the installed workflow, see :ref:`File Installation` for details.
85+
86+
87+
Remote Installation
88+
-------------------
89+
90+
When the first task runs on a remote platform, Cylc will copy files from the
91+
:term:`run directory` to the remote platform.
7992

80-
Cylc Rose
81-
---------
93+
By default Cylc will transfer the ``app``, ``bin``, ``etc`` and ``lib``
94+
directories. This list is configurable see :ref:`RemoteInit` for more details.
95+
96+
97+
Rose Integration
98+
----------------
99+
100+
The :ref:`Cylc Rose` plugin provides full support for
101+
:ref:`Rose suite configurations <Rose Suites>`.
82102

83103
.. seealso::
84104

85-
:ref:`Cylc Rose` plugin documentation, which includes examples of how
86-
to install a Cylc workflow with a Rose suite configuration with ``cylc install``.
105+
* :ref:`Cylc Rose` plugin documentation.
106+
* :ref:`installation` instructions.
87107

88-
.. TODO link to rose stem doc once it's done
89108

90-
``cylc install`` is designed to allow the the use of configuration plugins.
91-
If you previously used ``rose suite-run`` you may wish to use the Cylc-Rose
92-
plugin.
109+
The Cylc Rose plugin runs automatically making ``cylc install`` a direct
110+
substitute for ``rose suite-run``.
93111

94112
To find out if you have Cylc-Rose installed:
95113

96-
.. code-block:: bash
114+
.. code-block:: console
97115
98-
> cylc version --long
116+
$ cylc version --long
99117
8.0 (/path/to/cylc-8)
100118
101119
Plugins:
102120
cylc-rose 0.1.1 /path/to/cylc-rose
103121
104-
...
105-
122+
Unlike ``rose suite-run``, the ``cylc install`` command remembers any options
123+
specified on the command line and preserves them for future re-installations.
106124

125+
You may want to add ``~/roses`` to the list of
126+
:cylc:conf:`global.cylc[install]source dirs`.
107127

108-
Rose Stem
109-
---------
128+
Cylc Rose also provides the ``rose stem`` command which installs
129+
:ref:`rose-stem` suites. Once installed you can use ``cylc play`` to run them.
110130

111131
.. seealso::
112132

113-
:ref:`rose-stem`
114-
115-
The Cylc Rose plugin includes a ``rose stem`` command designed to allow the
116-
installation of Rose Stem suites. It is a small wrapper around ``cylc install``.
133+
:ref:`Rose Stem` documentation.

0 commit comments

Comments
 (0)