diff --git a/apis/workflows/v1/automation.proto b/apis/workflows/v1/automation.proto index 380ca75..07f45a7 100644 --- a/apis/workflows/v1/automation.proto +++ b/apis/workflows/v1/automation.proto @@ -89,7 +89,7 @@ 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. @@ -97,7 +97,7 @@ 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. diff --git a/apis/workflows/v1/core.proto b/apis/workflows/v1/core.proto index 165a54b..889fc2e 100644 --- a/apis/workflows/v1/core.proto +++ b/apis/workflows/v1/core.proto @@ -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 diff --git a/apis/workflows/v1/job.proto b/apis/workflows/v1/job.proto index ee285c2..28930c7 100644 --- a/apis/workflows/v1/job.proto +++ b/apis/workflows/v1/job.proto @@ -20,9 +20,9 @@ message SubmitJobRequest { 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; } @@ -82,12 +82,16 @@ message VisualizeJobRequest { // 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; + tilebox.v1.IDInterval id_interval = 2; // Filter jobs by automation id. tilebox.v1.ID automation_id = 3 [features.field_presence = EXPLICIT]; @@ -133,7 +137,7 @@ message CloneJobRequest { 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. diff --git a/apis/workflows/v1/task.proto b/apis/workflows/v1/task.proto index 99a0392..b3a54fb 100644 --- a/apis/workflows/v1/task.proto +++ b/apis/workflows/v1/task.proto @@ -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; } @@ -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. diff --git a/apis/workflows/v1/workflows.proto b/apis/workflows/v1/workflows.proto index 3118607..8932a79 100644 --- a/apis/workflows/v1/workflows.proto +++ b/apis/workflows/v1/workflows.proto @@ -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. @@ -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.