Skip to content

Commit

Permalink
Deprecate ambiguous task_size fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bduffany committed Nov 14, 2024
1 parent de4208a commit 9a57931
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions proto/scheduler.proto
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,24 @@ message TaskSize {

// Next ID: 9
message SchedulingMetadata {
// Task size used for scheduling purposes, when the scheduler is deciding
// which executors (if any) may execute a task, and also when an executor is
// deciding which task to dequeue. Executors may see a different value of this
// field than what the scheduler sees, depending on measured_task_size or
// predicted_task_size. See documentation of those fields for more info.
TaskSize task_size = 1;
// DEPRECATED. This field has two different meanings:
// 1. The execution server sets this to the task size "estimate" which only
// incorporates the default task size and user-requested size, and not any
// historical information or model predictions. This estimate is now split
// into two separate fields: default_task_size and requested_size.
// 2. Just before scheduling, the scheduler sets this to the "final" task size
// that should be used by the executor, which incorporates the measured
// size or model-predicated size as applicable. This is replaced by
// EnqueueTaskReservationRequest.task_size.
TaskSize task_size = 1 [deprecated = true];

// A default task size based on some hard-coded parameters. For example,
// non-test actions may be given some default task size, test actions
// declaring TEST_SIZE=large in their environment variables may be given a
// predefined number of resources, etc. Certain other rules may apply; e.g. VM
// isolation may require additional resources. If no better estimate is
// available, this is the size that is used.
TaskSize default_task_size = 13;

// Task size measured from a previous task execution of a similar task, if
// such data is available.
Expand Down Expand Up @@ -206,7 +218,13 @@ message ReEnqueueTaskResponse {

message EnqueueTaskReservationRequest {
string task_id = 1;
TaskSize task_size = 2;

// The size of the task that determines how many resources the executor should
// allocate for this task.
//
// DEPRECATED: use scheduling_metadata.scheduled_size instead.
TaskSize task_size = 2 [deprecated = true];

SchedulingMetadata scheduling_metadata = 3;

// If set, enqueue the task reservation on the given executor instance if it
Expand Down

0 comments on commit 9a57931

Please sign in to comment.