Skip to content

Commit d2d7718

Browse files
committed
Include info about cot ignore_keys, update phrasing
1 parent 4da263a commit d2d7718

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

rfcs/0190-queue-change-task-run-priority.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,21 @@ Queue service will expose new methods:
3030
* `queue.changeTaskPriority(taskId, newPriority)`
3131
* `queue.changeTaskGroupPriority(taskGroupId, newPriority)`
3232

33-
New priority would be stored along the task definition for a given task or all tasks within the task group.
33+
New priority would be be replaced in the task definition for a given task or all tasks within the task group.
3434

3535
The process to change single task will be as follows:
3636

37-
* new task priority will be stored in the database as `task.priority_override` column
38-
* if task was scheduled already, its priority in the `queue_pending_tasks` table will be updated
39-
* if the tasks run fails and new one is created, it will check if `task.priority_override` is set and use it instead of the original priority
37+
* new task priority will be stored in the database as `task.priority` (overriding existing value)
38+
* additionally, if task was scheduled already, its priority will be updated in the `queue_pending_tasks` table
4039

4140
The process to change the whole task group will be as follows:
4241

43-
* all tasks in the task group will be updated to store the new priority in the `task.priority_override` column
44-
* all currently scheduled tasks would be attempted to be updated in the `queue_pending_tasks` table
45-
* all unscheduled tasks and tasks that will be restarted will use the new priority
42+
* all tasks in the task group will be updated to store the new priority in the `task.priority` column
43+
* additionally, all currently scheduled tasks would be attempted to be updated in the `queue_pending_tasks` table
44+
45+
Tasks would only be updated if they are not resolved yet and before their deadlines.
46+
47+
> **Note**: To allow changing the priority of the task without breaking CoT validations, it would be necessary to add `"priority"` to the [`ignore_keys`](https://github.com/mozilla-releng/scriptworker/blob/454c4dd0bae7958140ea8d19adf3670e705ace09/src/scriptworker/cot/verify.py#L910)
4648
4749
### New scopes
4850

@@ -64,11 +66,6 @@ And for task group:
6466
Current order for picking up tasks is based on the task priority and insertion time (FIFO).
6567
This RFC proposes to change the priority only, and leave the insertion time as is.
6668

67-
### Other considerations
68-
69-
To ensure that Chain of Trust validation is not affected, we aim to keep the original task definition
70-
and store the new priority in a separate column.
71-
7269
## Implementation
7370

7471
_pending_

0 commit comments

Comments
 (0)