Skip to content

Commit a9c59ca

Browse files
Add new task submissions message also to SubmitJob (#26)
1 parent ce3bc4d commit a9c59ca

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

apis/workflows/v1/automation.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ message AutomationPrototype {
6363
max_bytes: 1024
6464
}];
6565
// The task submission to trigger
66-
TaskSubmission prototype = 3;
66+
SingleTaskSubmission prototype = 3;
6767

6868
// The storage event triggers that will trigger the task
6969
repeated StorageEventTrigger storage_event_triggers = 4 [(buf.validate.field).repeated.max_items = 32];

apis/workflows/v1/core.proto

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ message Tasks {
180180
repeated Task tasks = 1;
181181
}
182182

183-
// TaskSubmission is a message of a task that is just about to be submitted, either by submitting a job or as a subtask.
184-
message TaskSubmission {
183+
// SingleTaskSubmission is a message of a task that is just about to be submitted, currently in use by automations.
184+
message SingleTaskSubmission {
185185
// The cluster that this task should be run on
186186
string cluster_slug = 1;
187187
// The task identifier
@@ -209,7 +209,10 @@ message TaskSubmissions {
209209
// Concrete instantiations of tasks, grouped by their dependencies and dependants. Each group is uniquely defined by
210210
// the set of groups that it depends on (dependencies_on_other_groups) and the set of groups that depend on it,
211211
// (which is implicitly given by the inverse of the dependencies on other groups).
212-
repeated TaskSubmissionGroup task_groups = 1;
212+
repeated TaskSubmissionGroup task_groups = 1 [(buf.validate.field).repeated = {
213+
min_items: 1
214+
max_items: 64
215+
}];
213216
// Unique values of cluster slugs, referenced by index in the task instantiations.
214217
repeated string cluster_slug_lookup = 2;
215218
// Unique values of task identifiers, referenced by index in the task instantiations.

apis/workflows/v1/job.proto

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ option features.field_presence = IMPLICIT;
1515
// SubmitJobRequest submits and schedules a job for execution. The job can have multiple root tasks.
1616
message SubmitJobRequest {
1717
// The root tasks for the job.
18-
repeated TaskSubmission tasks = 1 [(buf.validate.field).repeated = {
18+
repeated SingleTaskSubmission legacy_tasks = 1 [(buf.validate.field).repeated = {
1919
min_items: 1
2020
max_items: 64
2121
}];
22+
// The root tasks for the job.
23+
TaskSubmissions tasks = 5;
2224
// The name of the job.
2325
string job_name = 2 [(buf.validate.field).string.min_len = 1];
2426
// 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 {
134136
// A clone prototype of a job.
135137
message GetJobPrototypeResponse {
136138
// The root tasks of the job.
137-
repeated TaskSubmission root_tasks = 1;
139+
repeated SingleTaskSubmission root_tasks = 1;
138140
// The name of the job.
139141
string job_name = 2;
140142
}
@@ -144,7 +146,7 @@ message CloneJobRequest {
144146
// The ID of the job to clone.
145147
tilebox.v1.ID job_id = 1 [(buf.validate.field).required = true];
146148
// The updated root tasks of the job.
147-
repeated TaskSubmission root_tasks_overrides = 2 [(buf.validate.field).repeated = {
149+
repeated SingleTaskSubmission root_tasks_overrides = 2 [(buf.validate.field).repeated = {
148150
min_items: 1
149151
max_items: 64
150152
}];

apis/workflows/v1/task.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ message ComputedTask {
3636
// If not set, the display message specified upon task submission will be kept.
3737
string display = 2;
3838
// A list of sub-tasks that the just computed task spawned.
39-
repeated TaskSubmission legacy_sub_tasks = 3 [
39+
repeated SingleTaskSubmission legacy_sub_tasks = 3 [
4040
deprecated = true,
4141
(buf.validate.field).repeated.max_items = 64
4242
];

0 commit comments

Comments
 (0)