Skip to content

Commit 4693692

Browse files
feat: Adding support for encryption_key_revocation_action and encryption_key_shutdown_duration for RevisionTemplate and ExecutionTemplate (#3874)
* feat: Adding support for encryption_key_revocation_action and encryption_key_shutdown_duration for RevisionTemplate and ExecutionTemplate docs: Documentation improvements, including clarification that v1 labels/annotations are rejected in v2 API PiperOrigin-RevId: 503293343 Source-Link: googleapis/googleapis@e3d3d63 Source-Link: googleapis/googleapis-gen@f401f99 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJ1bi8uT3dsQm90LnlhbWwiLCJoIjoiZjQwMWY5OWRkMGUyYmZlN2ZiZTZiMTkwZDMzODFiYTY0OGYyMTIyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: sofisl <[email protected]>
1 parent d3ec9cf commit 4693692

20 files changed

+645
-256
lines changed

packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ message Condition {
149149
// A revision's container has no port specified since the revision is of a
150150
// manually scaled service with 0 instance count
151151
HEALTH_CHECK_SKIPPED = 11;
152+
153+
// A revision with min_instance_count > 0 was created and is waiting for
154+
// enough instances to begin a traffic migration.
155+
MIN_INSTANCES_WARMING = 12;
152156
}
153157

154158
// Reasons specific to Execution resource.

packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ option java_package = "com.google.cloud.run.v2";
3434
// Cloud Run Execution Control Plane API.
3535
service Executions {
3636
option (google.api.default_host) = "run.googleapis.com";
37-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
37+
option (google.api.oauth_scopes) =
38+
"https://www.googleapis.com/auth/cloud-platform";
3839

3940
// Gets information about an Execution.
4041
rpc GetExecution(GetExecutionRequest) returns (Execution) {
@@ -53,7 +54,8 @@ service Executions {
5354
}
5455

5556
// Deletes an Execution.
56-
rpc DeleteExecution(DeleteExecutionRequest) returns (google.longrunning.Operation) {
57+
rpc DeleteExecution(DeleteExecutionRequest)
58+
returns (google.longrunning.Operation) {
5759
option (google.api.http) = {
5860
delete: "/v2/{name=projects/*/locations/*/jobs/*/executions/*}"
5961
};
@@ -73,9 +75,7 @@ message GetExecutionRequest {
7375
// where {project} can be project id or number.
7476
string name = 1 [
7577
(google.api.field_behavior) = REQUIRED,
76-
(google.api.resource_reference) = {
77-
type: "run.googleapis.com/Execution"
78-
}
78+
(google.api.resource_reference) = { type: "run.googleapis.com/Execution" }
7979
];
8080
}
8181

@@ -121,9 +121,7 @@ message DeleteExecutionRequest {
121121
// where {project} can be project id or number.
122122
string name = 1 [
123123
(google.api.field_behavior) = REQUIRED,
124-
(google.api.resource_reference) = {
125-
type: "run.googleapis.com/Execution"
126-
}
124+
(google.api.resource_reference) = { type: "run.googleapis.com/Execution" }
127125
];
128126

129127
// Indicates that the request should be validated without actually
@@ -148,8 +146,9 @@ message Execution {
148146
// Output only. The unique name of this Execution.
149147
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
150148

151-
// Output only. Server assigned unique identifier for the Execution. The value is a UUID4
152-
// string and guaranteed to remain unchanged until the resource is deleted.
149+
// Output only. Server assigned unique identifier for the Execution. The value
150+
// is a UUID4 string and guaranteed to remain unchanged until the resource is
151+
// deleted.
153152
string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
154153

155154
// Output only. A number that monotonically increases every time the user
@@ -162,39 +161,42 @@ message Execution {
162161
// environment, state, etc. For more information, visit
163162
// https://cloud.google.com/resource-manager/docs/creating-managing-labels or
164163
// https://cloud.google.com/run/docs/configuring/labels
165-
// Cloud Run will populate some labels with 'run.googleapis.com' or
166-
// 'serving.knative.dev' namespaces. Those labels are read-only, and user
167-
// changes will not be preserved.
168164
map<string, string> labels = 4;
169165

170166
// KRM-style annotations for the resource.
171167
map<string, string> annotations = 5;
172168

173-
// Output only. Represents time when the execution was acknowledged by the execution
174-
// controller. It is not guaranteed to be set in happens-before order across
175-
// separate operations.
176-
google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
169+
// Output only. Represents time when the execution was acknowledged by the
170+
// execution controller. It is not guaranteed to be set in happens-before
171+
// order across separate operations.
172+
google.protobuf.Timestamp create_time = 6
173+
[(google.api.field_behavior) = OUTPUT_ONLY];
177174

178175
// Output only. Represents time when the execution started to run.
179176
// It is not guaranteed to be set in happens-before order across separate
180177
// operations.
181-
google.protobuf.Timestamp start_time = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
178+
google.protobuf.Timestamp start_time = 22
179+
[(google.api.field_behavior) = OUTPUT_ONLY];
182180

183-
// Output only. Represents time when the execution was completed. It is not guaranteed to
184-
// be set in happens-before order across separate operations.
185-
google.protobuf.Timestamp completion_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
181+
// Output only. Represents time when the execution was completed. It is not
182+
// guaranteed to be set in happens-before order across separate operations.
183+
google.protobuf.Timestamp completion_time = 7
184+
[(google.api.field_behavior) = OUTPUT_ONLY];
186185

187186
// Output only. The last-modified time.
188-
google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
187+
google.protobuf.Timestamp update_time = 8
188+
[(google.api.field_behavior) = OUTPUT_ONLY];
189189

190190
// Output only. For a deleted resource, the deletion time. It is only
191191
// populated as a response to a Delete request.
192-
google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
192+
google.protobuf.Timestamp delete_time = 9
193+
[(google.api.field_behavior) = OUTPUT_ONLY];
193194

194195
// Output only. For a deleted resource, the time after which it will be
195196
// permamently deleted. It is only populated as a response to a Delete
196197
// request.
197-
google.protobuf.Timestamp expire_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
198+
google.protobuf.Timestamp expire_time = 10
199+
[(google.api.field_behavior) = OUTPUT_ONLY];
198200

199201
// Set the launch stage to a preview stage on write to allow use of preview
200202
// features in that stage. On read, describes whether the resource uses
@@ -205,21 +207,19 @@ message Execution {
205207
// Output only. The name of the parent Job.
206208
string job = 12 [
207209
(google.api.field_behavior) = OUTPUT_ONLY,
208-
(google.api.resource_reference) = {
209-
type: "run.googleapis.com/Job"
210-
}
210+
(google.api.resource_reference) = { type: "run.googleapis.com/Job" }
211211
];
212212

213-
// Output only. Specifies the maximum desired number of tasks the execution should
214-
// run at any given time. Must be <= task_count. The actual number of
213+
// Output only. Specifies the maximum desired number of tasks the execution
214+
// should run at any given time. Must be <= task_count. The actual number of
215215
// tasks running in steady state will be less than this number when
216216
// ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when
217217
// the work left to do is less than max parallelism. More info:
218218
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
219219
int32 parallelism = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
220220

221-
// Output only. Specifies the desired number of tasks the execution should run.
222-
// Setting to 1 means that parallelism is limited to 1 and the success of
221+
// Output only. Specifies the desired number of tasks the execution should
222+
// run. Setting to 1 means that parallelism is limited to 1 and the success of
223223
// that task signals the success of the execution.
224224
// More info:
225225
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
@@ -228,17 +228,20 @@ message Execution {
228228
// Output only. The template used to create tasks for this execution.
229229
TaskTemplate template = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
230230

231-
// Output only. Indicates whether the resource's reconciliation is still in progress.
232-
// See comments in `Job.reconciling` for additional information on
231+
// Output only. Indicates whether the resource's reconciliation is still in
232+
// progress. See comments in `Job.reconciling` for additional information on
233233
// reconciliation process in Cloud Run.
234234
bool reconciling = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
235235

236-
// Output only. The Condition of this Execution, containing its readiness status, and
237-
// detailed error information in case it did not reach the desired state.
238-
repeated Condition conditions = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
236+
// Output only. The Condition of this Execution, containing its readiness
237+
// status, and detailed error information in case it did not reach the desired
238+
// state.
239+
repeated Condition conditions = 17
240+
[(google.api.field_behavior) = OUTPUT_ONLY];
239241

240-
// Output only. The generation of this Execution. See comments in `reconciling` for
241-
// additional information on reconciliation process in Cloud Run.
242+
// Output only. The generation of this Execution. See comments in
243+
// `reconciling` for additional information on reconciliation process in Cloud
244+
// Run.
242245
int64 observed_generation = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
243246

244247
// Output only. The number of actively running tasks.
@@ -250,6 +253,16 @@ message Execution {
250253
// Output only. The number of tasks which reached phase Failed.
251254
int32 failed_count = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
252255

256+
// Output only. The number of tasks which reached phase Cancelled.
257+
int32 cancelled_count = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
258+
259+
// Output only. The number of tasks which have retried at least once.
260+
int32 retried_count = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
261+
262+
// Output only. URI where logs for this execution can be found in Cloud
263+
// Console.
264+
string log_uri = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
265+
253266
// Output only. A system-generated fingerprint for this version of the
254267
// resource. May be used to detect modification conflict during updates.
255268
string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY];

packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,19 @@ option java_package = "com.google.cloud.run.v2";
2828
// from a template.
2929
message ExecutionTemplate {
3030
// KRM-style labels for the resource.
31+
//
32+
// <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
33+
// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
34+
// namespaces, and they will be rejected. All system labels in v1 now have a
35+
// corresponding field in v2 ExecutionTemplate.
3136
map<string, string> labels = 1;
3237

3338
// KRM-style annotations for the resource.
39+
//
40+
// <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
41+
// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
42+
// namespaces, and they will be rejected. All system annotations in v1 now
43+
// have a corresponding field in v2 ExecutionTemplate.
3444
map<string, string> annotations = 2;
3545

3646
// Specifies the maximum desired number of tasks the execution should run at
@@ -49,6 +59,7 @@ message ExecutionTemplate {
4959
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
5060
int32 task_count = 4;
5161

52-
// Required. Describes the task(s) that will be created when executing an execution.
62+
// Required. Describes the task(s) that will be created when executing an
63+
// execution.
5364
TaskTemplate template = 5 [(google.api.field_behavior) = REQUIRED];
5465
}

0 commit comments

Comments
 (0)