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

Update docs for implicit/naked tasks #207

Merged
merged 6 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
23 changes: 23 additions & 0 deletions src/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,29 @@ Glossary
* :term:`job`
* :term:`qualifier`

implicit task
naked task
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
naked task

Copy link
Member Author

Choose a reason for hiding this comment

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

What about changing the first line to "Implicit tasks (previously known as naked tasks)..."

Copy link
Member

Choose a reason for hiding this comment

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

Could do, however, the terminology before was a mixture of, dummy (incorrect), naked (strange) and naked-dummy (really strange and somewhat suggestive).

An implicit task is a task in the graph that does not have an explicit
runtime definition. For example, ``bar`` is an implicit task in the
following workflow:

.. code-block:: cylc

[scheduling]
[[graph]]
R1 = foo & bar
[runtime]
[[foo]]

Implicit tasks are not allowed by default, as they are often typos.
However, it is possible to allow them using
:cylc:conf:`flow.cylc[scheduler]allow implicit tasks` during
development of a workflow.

See also:

* :ref:`ImplicitTasks`

run directory
When a :term:`suite <Cylc suite>` is run a directory is created for all
of the files generated whilst the suite is running. This is called the
Expand Down
37 changes: 20 additions & 17 deletions src/user-guide/writing-suites/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ Remote Task Hosting
-------------------

If a task declares a different platform to the one running the workflow,
Cylc will use non-interactive ssh to execute the task using the
Cylc will use non-interactive ssh to execute the task using the
:term:`job runner` and one of the hosts from the :term:`platform` definition
(platforms are defined in ``global.cylc[platforms]``).

Expand Down Expand Up @@ -444,27 +444,30 @@ Remote task log directories, like local ones, are created on the fly, if
necessary, during job submission.


Naked Dummy Tasks And Strict Validation
---------------------------------------
.. _ImplicitTasks:

A *naked dummy task* appears in the suite graph but has no
Implicit Tasks
--------------

An :term:`implicit task` appears in the workflow graph but has no
explicit runtime configuration section. Such tasks automatically
inherit the default "dummy task" configuration from the root
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
inherit the default "dummy task" configuration from the root
inherit the default configuration from the root

namespace. This is very useful because it allows functional suites to
be mocked up quickly for test and demonstration purposes by simply
defining the graph. It is somewhat dangerous, however, because there
is no way to distinguish an intentional naked dummy task from one
generated by typographic error: misspelling a task name in the graph
results in a new naked dummy task replacing the intended task in the
affected trigger expression; and misspelling a task name in a runtime
section heading results in the intended task becoming a dummy task
is no way to distinguish an intentional implicit task from one
caused by typographic error. Misspelling a task name in the graph
results in a new implicit task replacing the intended task in the
affected trigger expression, and misspelling a task name in a runtime
section heading results in the intended task becoming an implicit task
itself (by divorcing it from its intended runtime config section).

To avoid this problem any dummy task used in a real suite should not be
naked - i.e. it should have an explicit entry in under the runtime
section of the suite configuration, even if the section is empty. This
results in exactly the same dummy task behaviour, via implicit
inheritance from root, but it allows use of
``cylc validate --strict``
to catch errors in task names by failing the suite if any naked dummy
tasks are detected.
You can allow implicit tasks during development of a workflow using
:cylc:conf:`flow.cylc[scheduler]allow implicit tasks`. But, to avoid
the problems mentioned above, any task used in a production/operational
workflow should not be implicit, i.e. it should have an explicit entry in under
the runtime section of ``flow.cylc``, even if the section is empty. This
results in exactly the same dummy task behaviour, via inheritance from root,
but adds a layer of protection against mistakes. Thus, it is recommended to
turn off :cylc:conf:`flow.cylc[scheduler]allow implicit tasks` when the
:cylc:conf:`flow.cylc[runtime]` section has been written.