-
Notifications
You must be signed in to change notification settings - Fork 19
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
Optional output extension #634
Closed
oliver-sanders
wants to merge
2
commits into
cylc:master
from
oliver-sanders:optional-output-extension
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,112 @@ For more detail see the component changelogs: | |
* `metomi-rose-changelog`_ | ||
* `metomi-isodatetime-changelog`_ | ||
|
||
---------- | ||
|
||
Cylc 8.3.0 | ||
---------- | ||
|
||
.. TODO - uncomment before 8.3.0 release | ||
|
||
.. admonition:: Cylc Components | ||
:class: hint | ||
|
||
:cylc-flow: `8.3 <https://github.com/cylc/cylc-flow/blob/8.3.x/CHANGES.md>`__ | ||
:cylc-uiserver: `1.4 <https://github.com/cylc/cylc-uiserver/blob/1.4.x/CHANGES.md>`__ | ||
:cylc-rose: `1.4 <https://github.com/cylc/cylc-rose/blob/1.4.x/CHANGES.md>`__ | ||
|
||
Optional Outputs | ||
^^^^^^^^^^^^^^^^ | ||
|
||
Optional outputs (introduced in Cylc 8.0.0) are a way of validating the outcome | ||
of a task to ensure it "completed" as intended. E.G, by default, if a task | ||
fails, it will considered :term:`incomplete <incomplete task>` and the | ||
workflow will stall. | ||
|
||
Before (Cylc 8.0.0 - 8.1.4) | ||
All optional outputs were completely "optional", | ||
that is to say, they may or may not be generated when a task runs. | ||
|
||
From Cylc 8.3.0 onwards | ||
When optional outputs are defined in a workflow, Cylc | ||
now requires one or more of them to be generated by the task at runtime. | ||
|
||
So for this example: | ||
|
||
.. code-block:: cylc-graph | ||
|
||
a:x => x | ||
a:y => y | ||
x | y => b | ||
|
||
The task must succeed (success is required unless marked otherwise) and at | ||
least one of the outputs ``x`` or ``y`` must be generated. | ||
|
||
In Python syntax that condition looks like this: | ||
|
||
.. code-block:: python | ||
|
||
succeeded and (x or y) | ||
|
||
If this condition is not met, then the task will be considered | ||
:term:`incomplete <incomplete task>` altering you to the problem. | ||
|
||
This change solves an issue where the pathway through the graph could be | ||
interrupted. | ||
E.G. in the above example, the intention is that Cylc will follow either the | ||
``a:x`` branch *or* the ``a:y`` branch, however, with Cylc <=8.1.4 it is | ||
possible that neither the ``x`` or ``y`` outputs would be generated, in which | ||
case the task ``b`` would never be run. | ||
|
||
This behaviour can be overridden using the | ||
:cylc:conf:`[runtime][<namespace>]completion` configuration. | ||
E.G. To restore the old behaviour | ||
|
||
.. code-block:: cylc | ||
|
||
[runtime] | ||
[[a]] | ||
# this sets the condition that Cylc uses to determine whether a | ||
# task has completed | ||
completion = succeeded or failed | ||
|
||
The new ``completion`` configuration opens up the potential for much | ||
more powerful task diagnostics with :term:`custom outputs <custom output>`. | ||
|
||
See :ref:`Graph Branching` for more information about optional outputs | ||
and examples including the new ``completion`` configuration. | ||
|
||
|
||
Task Expiry | ||
^^^^^^^^^^^ | ||
|
||
As a result of the optional outputs change above, task expiry can now be used | ||
in combination with optional outputs e.g: | ||
|
||
.. code-block:: cylc-graph | ||
|
||
# run "x" if "a" succeeds | ||
a? => x | ||
# run "y" if "a" expires | ||
a:expired? => y | ||
|
||
In this example, ``a:fail?`` is not handled in the graph, so if ``a`` fails, | ||
it will be incomplete and the workflow will stall altering you to the problem. | ||
|
||
This change means you need to add a ``?`` mark symbol after ``:expired`` | ||
triggers in the graph. | ||
|
||
The new ``completion`` configuration can also be used in combination with | ||
task expiry e.g: | ||
|
||
.. code-block:: cylc | ||
|
||
[runtime] | ||
[[a]] | ||
# this task is allowed to succeed or expire but not fail | ||
completion = succeeded or expired | ||
|
||
|
||
---------- | ||
|
||
Cylc 8.2.0 | ||
|
@@ -28,9 +134,9 @@ Cylc 8.2.0 | |
.. admonition:: Cylc Components | ||
:class: hint | ||
|
||
:cylc-flow: `8.2 <https://github.com/cylc/cylc-flow/blob/master/CHANGES.md>`__ | ||
:cylc-uiserver: `1.3 <https://github.com/cylc/cylc-uiserver/blob/master/CHANGES.md>`__ | ||
:cylc-rose: `1.3 <https://github.com/cylc/cylc-rose/blob/master/CHANGES.md>`__ | ||
:cylc-flow: `8.2 <https://github.com/cylc/cylc-flow/blob/8.2.x/CHANGES.md>`__ | ||
:cylc-uiserver: `1.3 <https://github.com/cylc/cylc-uiserver/blob/1.3.x/CHANGES.md>`__ | ||
:cylc-rose: `1.3 <https://github.com/cylc/cylc-rose/blob/1.3.x/CHANGES.md>`__ | ||
Comment on lines
+137
to
+139
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should have been set to tagged milestones at release. |
||
|
||
|
||
Configure The Default View | ||
|
@@ -126,11 +232,11 @@ Combined Commands | |
|
||
Two new commands have been added as short-cuts for common working patterns: | ||
|
||
``cylc vip`` | ||
``cylc vip`` | ||
Validate, install and plays a workflow, equivalent to: | ||
|
||
.. code-block:: bash | ||
|
||
cylc validate <path> | ||
cylc install <path> | ||
cylc play <id> | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Term "expected output" never used elsewhere, simpler to remove this unused term and stick to "required".