gecko-dev/taskcluster/docs/loading.rst
Dustin J. Mitchell 0ee5e3c281 Bug 1383880: parse try config during the decision task; r=ahal
This sets the try_mode property, and parses the try message (if given), early
in the decision task and puts the results into the parameters.

The proximate need is to set optimze_target_tasks for some try modes and not
others. This also replaces the existing logic for parsing messages for certain
kinds, and makes the distinction between the different try modes a little
clearer.

MozReview-Commit-ID: AXJEGLh6pEV

--HG--
extra : rebase_source : 25e9966696d78d899783d9f38533d5ae66f9ccb9
extra : source : b53ff084c2d7968a1d9864d1343f2d9381fb652b
2017-08-21 23:14:14 +00:00

35 lines
1.4 KiB
ReStructuredText

Loading Tasks
=============
The full task graph generation involves creating tasks for each kind. Kinds
are ordered to satisfy ``kind-dependencies``, and then the ``loader`` specified
in ``kind.yml`` is used to load the tasks for that kind. It should point to
a Python function like::
def loader(cls, kind, path, config, parameters, loaded_tasks):
pass
The ``kind`` is the name of the kind; the configuration for that kind
named this class.
The ``path`` is the path to the configuration directory for the kind. This
can be used to load extra data, templates, etc.
The ``parameters`` give details on which to base the task generation. See
:ref:`parameters` for details.
At the time this method is called, all kinds on which this kind depends
(that is, specified in the ``kind-dependencies`` key in ``config``)
have already loaded their tasks, and those tasks are available in
the list ``loaded_tasks``.
The return value is a list of inputs to the transforms listed in the kind's
``transforms`` property. The specific format for the input depends on the first
transform - whatever it expects. The final transform should be
``taskgraph.transform.task:transforms``, which produces the output format the
task-graph generation infrastructure expects.
The ``transforms`` key in ``kind.yml`` is further documented in
:doc:`transforms`. For more information on how all of this works, consult the
docstrings and comments in the source code itself.