| |
@@ -10,6 +10,7 @@
|
| |
* allowing builds from expired repos
|
| |
* managing the package list for a tag
|
| |
* managing which channel a task goes to
|
| |
+ * altering task priority
|
| |
|
| |
In the future, we expect to add more policy hooks for controlling more aspects
|
| |
of the system.
|
| |
@@ -145,7 +146,7 @@
|
| |
Most of the policies are simply allow/deny policies. They have two possible
|
| |
actions: ``allow`` or ``deny``.
|
| |
|
| |
- The channel policy is used to determine the channel for a task. It supports
|
| |
+ The **channel** policy is used to determine the channel for a task. It supports
|
| |
the following actions:
|
| |
|
| |
``use <channel>``
|
| |
@@ -161,6 +162,37 @@
|
| |
* only valid for child tasks
|
| |
* recommend using the ``is_child_task`` test to be sure
|
| |
|
| |
+ The **priority** policy is used to alter task's priority. In most cases you
|
| |
+ should manage priorities by different channels and builders assigned to them.
|
| |
+ There is nevertheless few corner-cases which can benefit from altering task's
|
| |
+ priority.
|
| |
+
|
| |
+ Note, that you can easily get to deadlock situation if this is not handled with
|
| |
+ caution (lower priority tasks will get assigned only if there is no higher
|
| |
+ priority task for given channel).
|
| |
+
|
| |
+ .. note::
|
| |
+ For example OSBS use this mechanism to propagate higher priority tasks to
|
| |
+ its plugin. Deadlock problem is here mitigated by limiting policy to
|
| |
+ ``buildContainer`` tasks only. These tasks are consumed only by dedicated
|
| |
+ builders/channel, so they will not take priority over other types of tasks
|
| |
+ (e.g. ``newRepo`` or ``tagBuild`` tasks which could be blocked otherwise.
|
| |
+
|
| |
+ Technically it is very similar to **channel** policy. Only actions are
|
| |
+ different:
|
| |
+
|
| |
+ ``stay``
|
| |
+ * don't touch the default priority of the task
|
| |
+
|
| |
+ ``set <int>``
|
| |
+ * set priority to this value
|
| |
+
|
| |
+ ``adjust +<int>``
|
| |
+ * increment default priority
|
| |
+
|
| |
+ ``adjust -<int>``
|
| |
+ * decrement default priority
|
| |
+
|
| |
Available tests
|
| |
===============
|
| |
``true``
|
| |
Fixes: https://pagure.io/koji/issue/2710