diff --git a/apis/workflows/v1/automation.proto b/apis/workflows/v1/automation.proto index 07f45a7..d2530e8 100644 --- a/apis/workflows/v1/automation.proto +++ b/apis/workflows/v1/automation.proto @@ -63,7 +63,7 @@ message AutomationPrototype { max_bytes: 1024 }]; // The task submission to trigger - TaskSubmission prototype = 3; + SingleTaskSubmission prototype = 3; // The storage event triggers that will trigger the task repeated StorageEventTrigger storage_event_triggers = 4 [(buf.validate.field).repeated.max_items = 32]; diff --git a/apis/workflows/v1/core.proto b/apis/workflows/v1/core.proto index 574ca59..84dc688 100644 --- a/apis/workflows/v1/core.proto +++ b/apis/workflows/v1/core.proto @@ -180,8 +180,8 @@ message Tasks { repeated Task tasks = 1; } -// TaskSubmission is a message of a task that is just about to be submitted, either by submitting a job or as a subtask. -message TaskSubmission { +// SingleTaskSubmission is a message of a task that is just about to be submitted, currently in use by automations. +message SingleTaskSubmission { // The cluster that this task should be run on string cluster_slug = 1; // The task identifier @@ -209,7 +209,10 @@ message TaskSubmissions { // Concrete instantiations of tasks, grouped by their dependencies and dependants. Each group is uniquely defined by // the set of groups that it depends on (dependencies_on_other_groups) and the set of groups that depend on it, // (which is implicitly given by the inverse of the dependencies on other groups). - repeated TaskSubmissionGroup task_groups = 1; + repeated TaskSubmissionGroup task_groups = 1 [(buf.validate.field).repeated = { + min_items: 1 + max_items: 64 + }]; // Unique values of cluster slugs, referenced by index in the task instantiations. repeated string cluster_slug_lookup = 2; // Unique values of task identifiers, referenced by index in the task instantiations. diff --git a/apis/workflows/v1/job.proto b/apis/workflows/v1/job.proto index eda15bc..408ae0c 100644 --- a/apis/workflows/v1/job.proto +++ b/apis/workflows/v1/job.proto @@ -15,10 +15,12 @@ option features.field_presence = IMPLICIT; // SubmitJobRequest submits and schedules a job for execution. The job can have multiple root tasks. message SubmitJobRequest { // The root tasks for the job. - repeated TaskSubmission tasks = 1 [(buf.validate.field).repeated = { + repeated SingleTaskSubmission legacy_tasks = 1 [(buf.validate.field).repeated = { min_items: 1 max_items: 64 }]; + // The root tasks for the job. + TaskSubmissions tasks = 5; // The name of the job. string job_name = 2 [(buf.validate.field).string.min_len = 1]; // Tracing information for the job. This is used to propagate tracing information to the workers that execute the job. @@ -134,7 +136,7 @@ message GetJobPrototypeRequest { // A clone prototype of a job. message GetJobPrototypeResponse { // The root tasks of the job. - repeated TaskSubmission root_tasks = 1; + repeated SingleTaskSubmission root_tasks = 1; // The name of the job. string job_name = 2; } @@ -144,7 +146,7 @@ message CloneJobRequest { // The ID of the job to clone. tilebox.v1.ID job_id = 1 [(buf.validate.field).required = true]; // The updated root tasks of the job. - repeated TaskSubmission root_tasks_overrides = 2 [(buf.validate.field).repeated = { + repeated SingleTaskSubmission root_tasks_overrides = 2 [(buf.validate.field).repeated = { min_items: 1 max_items: 64 }]; diff --git a/apis/workflows/v1/task.proto b/apis/workflows/v1/task.proto index 2ecd1b6..53b3a85 100644 --- a/apis/workflows/v1/task.proto +++ b/apis/workflows/v1/task.proto @@ -36,7 +36,7 @@ message ComputedTask { // If not set, the display message specified upon task submission will be kept. string display = 2; // A list of sub-tasks that the just computed task spawned. - repeated TaskSubmission legacy_sub_tasks = 3 [ + repeated SingleTaskSubmission legacy_sub_tasks = 3 [ deprecated = true, (buf.validate.field).repeated.max_items = 64 ];