Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apis/workflows/v1/automation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ message StorageEventTrigger {
// The storage location to watch for events
StorageLocation storage_location = 2;
// A glob pattern to match objects/files in the storage location
string glob_pattern = 3 [(buf.validate.field).string.min_bytes = 1];
string glob_pattern = 3 [(buf.validate.field).string.min_len = 1];
}

// CronTrigger is a trigger that will trigger a task submission on a schedule.
message CronTrigger {
// Unique identifier for the trigger
tilebox.v1.ID id = 1;
// A cron schedule for the trigger, e.g. "0 0 * * *" (every day at midnight)
string schedule = 2 [(buf.validate.field).string.min_bytes = 1];
string schedule = 2 [(buf.validate.field).string.min_len = 1];
}

// Automation is an actual submitted task that was triggered by a automation prototype.
Expand Down
2 changes: 1 addition & 1 deletion apis/workflows/v1/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ message TaskSubmission {
// The serialized task instance
bytes input = 3 [(buf.validate.field).bytes.max_len = 1024];
// A human-readable description of the task
string display = 4 [(buf.validate.field).string.min_bytes = 1];
string display = 4 [(buf.validate.field).string.min_len = 1];
// A list of indices, corresponding to tasks in the list of sub_tasks that this SubTask is part of.
repeated int64 dependencies = 5 [(buf.validate.field).repeated.items.int64 = {
gte: 0
Expand Down
22 changes: 13 additions & 9 deletions apis/workflows/v1/job.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
max_items: 64
}];
// The name of the job.
string job_name = 2 [(buf.validate.field).string.min_bytes = 1];
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.
string trace_parent = 3 [(buf.validate.field).string.min_bytes = 1];
string trace_parent = 3 [(buf.validate.field).string.min_len = 1];
// Optional. The ID of the automation that submits this job.
tilebox.v1.ID automation_id = 4;
}
Expand Down Expand Up @@ -82,12 +82,16 @@

// QueryFilters contains the filters to apply to a query.
message QueryFilters {
// Either a time interval or ID interval must be set, but not both.
oneof temporal_extent {
option (buf.validate.oneof).required = true;
tilebox.v1.TimeInterval time_interval = 1;
tilebox.v1.IDInterval id_interval = 2;
}
option (buf.validate.message).oneof = {
fields: [
"time_interval",
"id_interval"
]
required: true
};

tilebox.v1.TimeInterval time_interval = 1;

Check failure on line 93 in apis/workflows/v1/job.proto

View workflow job for this annotation

GitHub Actions / Buf

Field "1" with name "time_interval" on message "QueryFilters" moved from inside to outside a oneof.
tilebox.v1.IDInterval id_interval = 2;

Check failure on line 94 in apis/workflows/v1/job.proto

View workflow job for this annotation

GitHub Actions / Buf

Field "2" with name "id_interval" on message "QueryFilters" moved from inside to outside a oneof.

// Filter jobs by automation id.
tilebox.v1.ID automation_id = 3 [features.field_presence = EXPLICIT];
Expand Down Expand Up @@ -133,7 +137,7 @@
max_items: 64
}];
// The name of the job.
string job_name = 3 [(buf.validate.field).string.min_bytes = 1];
string job_name = 3 [(buf.validate.field).string.min_len = 1];
}

// A service for interacting with jobs.
Expand Down
4 changes: 2 additions & 2 deletions apis/workflows/v1/task.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ message NextTaskRequest {
// tasks that can be run by that task runner.
message NextTaskToRun {
// The cluster that this task runner is running on.
string cluster_slug = 1 [(buf.validate.field).string.min_bytes = 1];
string cluster_slug = 1 [(buf.validate.field).string.min_len = 1];
// The task identifiers that this task runner can run.
repeated TaskIdentifier identifiers = 2;
}
Expand Down Expand Up @@ -61,7 +61,7 @@ message TaskStateResponse {
// TaskLease is a message specifying the new lease expiration time of a task.
message TaskLeaseRequest {
tilebox.v1.ID task_id = 1 [(buf.validate.field).required = true];
google.protobuf.Duration requested_lease = 2 [features.field_presence = EXPLICIT];
google.protobuf.Duration requested_lease = 2;
}

// A service for task runners to communicate with the workflows service.
Expand Down
4 changes: 2 additions & 2 deletions apis/workflows/v1/workflows.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ option features.field_presence = IMPLICIT;
// CreateClusterRequest creates a new cluster.
message CreateClusterRequest {
// The name of the cluster.
string name = 1 [(buf.validate.field).string.min_bytes = 1];
string name = 1 [(buf.validate.field).string.min_len = 1];
}

// GetClusterRequest requests details for a cluster.
Expand All @@ -24,7 +24,7 @@ message GetClusterRequest {
// DeleteClusterRequest deletes an existing cluster.
message DeleteClusterRequest {
// The slug of the cluster to delete.
string cluster_slug = 1 [(buf.validate.field).string.min_bytes = 1];
string cluster_slug = 1 [(buf.validate.field).string.min_len = 1];
}

// DeleteClusterResponse is the response to DeleteClusterRequest.
Expand Down
Loading