Skip to content

Commit 8942de0

Browse files
chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport (#30)
- [ ] Regenerate this pull request now. chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: https://togithub.com/googleapis/googleapis/commit/758f0d1217d9c7fe398aa5efb1057ce4b6409e55 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/78bd8f05e1276363eb14eae70e91fe4bc20703ab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 BEGIN_NESTED_COMMIT feat: Adds gRPC probe support to Cloud Run v2 API client libraries PiperOrigin-RevId: 486175948 Source-Link: https://togithub.com/googleapis/googleapis/commit/153e9592bb199fd55d800b0e7482eeb128ed8b25 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/bb74acdc8d3012dea0b94858363198542226fc01 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmI3NGFjZGM4ZDMwMTJkZWEwYjk0ODU4MzYzMTk4NTQyMjI2ZmMwMSJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: Adds Cloud Run Jobs v2 API client libraries A Cloud Run Job runs its tasks and exits when finished. For more information about Cloud Run Jobs, visit https://cloud.google.com/run/docs/create-jobs PiperOrigin-RevId: 485653075 Source-Link: https://togithub.com/googleapis/googleapis/commit/a9a137b7420e8569c14c7a1c9cb31c2ee49fd14c Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/7d398ce68ad0101db60130d526950df0efcaddce Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2QzOThjZTY4YWQwMTAxZGI2MDEzMGQ1MjY5NTBkZjBlZmNhZGRjZSJ9 END_NESTED_COMMITBEGIN_NESTED_COMMITfeat: Adds Startup and Liveness probes to Cloud Run v2 API client libraries For more information about this feature, visit https://cloud.google.com/run/docs/configuring/healthchecks PiperOrigin-RevId: 481203788 Source-Link: https://togithub.com/googleapis/googleapis/commit/778762cee04435d22f5bf313da0ab59bc5083195 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/1479c7a63fc7d5b5d98c48e9ba1d0b6a94e95513 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTQ3OWM3YTYzZmM3ZDViNWQ5OGM0OGU5YmExZDBiNmE5NGU5NTUxMyJ9 END_NESTED_COMMIT
1 parent 9233d6f commit 8942de0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+41301
-10147
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ message Condition {
162162
// A task reached its retry limit and the last attempt failed due to the
163163
// user container exiting with a non-zero exit code.
164164
NON_ZERO_EXIT_CODE = 2;
165+
166+
// The execution was cancelled by users.
167+
CANCELLED = 3;
165168
}
166169

167170
// type is used to communicate the status of the reconciliation process.
@@ -185,7 +188,7 @@ message Condition {
185188

186189
// The reason for this condition. Depending on the condition type,
187190
// it will populate one of these fields.
188-
// Successful conditions may not have a reason.
191+
// Successful conditions cannot have a reason.
189192
oneof reasons {
190193
// A common (service-level) reason for this condition.
191194
CommonReason reason = 6;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.run.v2;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/launch_stage.proto";
23+
import "google/api/resource.proto";
24+
import "google/cloud/run/v2/condition.proto";
25+
import "google/cloud/run/v2/task_template.proto";
26+
import "google/longrunning/operations.proto";
27+
import "google/protobuf/timestamp.proto";
28+
29+
option go_package = "google.golang.org/genproto/googleapis/cloud/run/v2;run";
30+
option java_multiple_files = true;
31+
option java_outer_classname = "ExecutionProto";
32+
option java_package = "com.google.cloud.run.v2";
33+
34+
// Cloud Run Execution Control Plane API.
35+
service Executions {
36+
option (google.api.default_host) = "run.googleapis.com";
37+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
38+
39+
// Gets information about an Execution.
40+
rpc GetExecution(GetExecutionRequest) returns (Execution) {
41+
option (google.api.http) = {
42+
get: "/v2/{name=projects/*/locations/*/jobs/*/executions/*}"
43+
};
44+
option (google.api.method_signature) = "name";
45+
}
46+
47+
// Lists Executions from a Job.
48+
rpc ListExecutions(ListExecutionsRequest) returns (ListExecutionsResponse) {
49+
option (google.api.http) = {
50+
get: "/v2/{parent=projects/*/locations/*/jobs/*}/executions"
51+
};
52+
option (google.api.method_signature) = "parent";
53+
}
54+
55+
// Deletes an Execution.
56+
rpc DeleteExecution(DeleteExecutionRequest) returns (google.longrunning.Operation) {
57+
option (google.api.http) = {
58+
delete: "/v2/{name=projects/*/locations/*/jobs/*/executions/*}"
59+
};
60+
option (google.api.method_signature) = "name";
61+
option (google.longrunning.operation_info) = {
62+
response_type: "Execution"
63+
metadata_type: "Execution"
64+
};
65+
}
66+
}
67+
68+
// Request message for obtaining a Execution by its full name.
69+
message GetExecutionRequest {
70+
// Required. The full name of the Execution.
71+
// Format:
72+
// projects/{project}/locations/{location}/jobs/{job}/executions/{execution},
73+
// where {project} can be project id or number.
74+
string name = 1 [
75+
(google.api.field_behavior) = REQUIRED,
76+
(google.api.resource_reference) = {
77+
type: "run.googleapis.com/Execution"
78+
}
79+
];
80+
}
81+
82+
// Request message for retrieving a list of Executions.
83+
message ListExecutionsRequest {
84+
// Required. The Execution from which the Executions should be listed.
85+
// To list all Executions across Jobs, use "-" instead of Job name.
86+
// Format: projects/{project}/locations/{location}/jobs/{job}, where {project}
87+
// can be project id or number.
88+
string parent = 1 [
89+
(google.api.field_behavior) = REQUIRED,
90+
(google.api.resource_reference) = {
91+
child_type: "run.googleapis.com/Execution"
92+
}
93+
];
94+
95+
// Maximum number of Executions to return in this call.
96+
int32 page_size = 2;
97+
98+
// A page token received from a previous call to ListExecutions.
99+
// All other parameters must match.
100+
string page_token = 3;
101+
102+
// If true, returns deleted (but unexpired) resources along with active ones.
103+
bool show_deleted = 4;
104+
}
105+
106+
// Response message containing a list of Executions.
107+
message ListExecutionsResponse {
108+
// The resulting list of Executions.
109+
repeated Execution executions = 1;
110+
111+
// A token indicating there are more items than page_size. Use it in the next
112+
// ListExecutions request to continue.
113+
string next_page_token = 2;
114+
}
115+
116+
// Request message for deleting an Execution.
117+
message DeleteExecutionRequest {
118+
// Required. The name of the Execution to delete.
119+
// Format:
120+
// projects/{project}/locations/{location}/jobs/{job}/executions/{execution},
121+
// where {project} can be project id or number.
122+
string name = 1 [
123+
(google.api.field_behavior) = REQUIRED,
124+
(google.api.resource_reference) = {
125+
type: "run.googleapis.com/Execution"
126+
}
127+
];
128+
129+
// Indicates that the request should be validated without actually
130+
// deleting any resources.
131+
bool validate_only = 2;
132+
133+
// A system-generated fingerprint for this version of the resource.
134+
// This may be used to detect modification conflict during updates.
135+
string etag = 3;
136+
}
137+
138+
// Execution represents the configuration of a single execution. A execution an
139+
// immutable resource that references a container image which is run to
140+
// completion.
141+
message Execution {
142+
option (google.api.resource) = {
143+
type: "run.googleapis.com/Execution"
144+
pattern: "projects/{project}/locations/{location}/jobs/{job}/executions/{execution}"
145+
style: DECLARATIVE_FRIENDLY
146+
};
147+
148+
// Output only. The unique name of this Execution.
149+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
150+
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.
153+
string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
154+
155+
// Output only. A number that monotonically increases every time the user
156+
// modifies the desired state.
157+
int64 generation = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
158+
159+
// KRM-style labels for the resource.
160+
// User-provided labels are shared with Google's billing system, so they can
161+
// be used to filter, or break down billing charges by team, component,
162+
// environment, state, etc. For more information, visit
163+
// https://cloud.google.com/resource-manager/docs/creating-managing-labels or
164+
// 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.
168+
map<string, string> labels = 4;
169+
170+
// KRM-style annotations for the resource.
171+
map<string, string> annotations = 5;
172+
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];
177+
178+
// Output only. Represents time when the execution started to run.
179+
// It is not guaranteed to be set in happens-before order across separate
180+
// operations.
181+
google.protobuf.Timestamp start_time = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
182+
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];
186+
187+
// Output only. The last-modified time.
188+
google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
189+
190+
// Output only. For a deleted resource, the deletion time. It is only
191+
// populated as a response to a Delete request.
192+
google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
193+
194+
// Output only. For a deleted resource, the time after which it will be
195+
// permamently deleted. It is only populated as a response to a Delete
196+
// request.
197+
google.protobuf.Timestamp expire_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
198+
199+
// Set the launch stage to a preview stage on write to allow use of preview
200+
// features in that stage. On read, describes whether the resource uses
201+
// preview features. Launch Stages are defined at [Google Cloud Platform
202+
// Launch Stages](https://cloud.google.com/terms/launch-stages).
203+
google.api.LaunchStage launch_stage = 11;
204+
205+
// Output only. The name of the parent Job.
206+
string job = 12 [
207+
(google.api.field_behavior) = OUTPUT_ONLY,
208+
(google.api.resource_reference) = {
209+
type: "run.googleapis.com/Job"
210+
}
211+
];
212+
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
215+
// tasks running in steady state will be less than this number when
216+
// ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when
217+
// the work left to do is less than max parallelism. More info:
218+
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
219+
int32 parallelism = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
220+
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
223+
// that task signals the success of the execution.
224+
// More info:
225+
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
226+
int32 task_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
227+
228+
// Output only. The template used to create tasks for this execution.
229+
TaskTemplate template = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
230+
231+
// Output only. Indicates whether the resource's reconciliation is still in progress.
232+
// See comments in `Job.reconciling` for additional information on
233+
// reconciliation process in Cloud Run.
234+
bool reconciling = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
235+
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];
239+
240+
// Output only. The generation of this Execution. See comments in `reconciling` for
241+
// additional information on reconciliation process in Cloud Run.
242+
int64 observed_generation = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
243+
244+
// Output only. The number of actively running tasks.
245+
int32 running_count = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
246+
247+
// Output only. The number of tasks which reached phase Succeeded.
248+
int32 succeeded_count = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
249+
250+
// Output only. The number of tasks which reached phase Failed.
251+
int32 failed_count = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
252+
253+
// Output only. A system-generated fingerprint for this version of the
254+
// resource. May be used to detect modification conflict during updates.
255+
string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY];
256+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.run.v2;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/cloud/run/v2/task_template.proto";
21+
22+
option go_package = "google.golang.org/genproto/googleapis/cloud/run/v2;run";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "ExecutionTemplateProto";
25+
option java_package = "com.google.cloud.run.v2";
26+
27+
// ExecutionTemplate describes the data an execution should have when created
28+
// from a template.
29+
message ExecutionTemplate {
30+
// KRM-style labels for the resource.
31+
map<string, string> labels = 1;
32+
33+
// KRM-style annotations for the resource.
34+
map<string, string> annotations = 2;
35+
36+
// Specifies the maximum desired number of tasks the execution should run at
37+
// given time. Must be <= task_count.
38+
// When the job is run, if this field is 0 or unset, the maximum possible
39+
// value will be used for that execution.
40+
// The actual number of tasks running in steady state will be less than this
41+
// number when there are fewer tasks waiting to be completed remaining,
42+
// i.e. when the work left to do is less than max parallelism.
43+
int32 parallelism = 3;
44+
45+
// Specifies the desired number of tasks the execution should run.
46+
// Setting to 1 means that parallelism is limited to 1 and the success of
47+
// that task signals the success of the execution.
48+
// More info:
49+
// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
50+
int32 task_count = 4;
51+
52+
// Required. Describes the task(s) that will be created when executing an execution.
53+
TaskTemplate template = 5 [(google.api.field_behavior) = REQUIRED];
54+
}

0 commit comments

Comments
 (0)