Skip to content

Commit 651ce1f

Browse files
chore: migrate to owl bot (#461)
1 parent 7aa2f6c commit 651ce1f

16 files changed

+1318
-246
lines changed
Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Google LLC
1+
# Copyright 2021 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -11,23 +11,13 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
docker:
15+
image: gcr.io/repo-automation-bots/owlbot-nodejs:latest
1416

15-
import synthtool as s
16-
import synthtool.gcp as gcp
17-
import synthtool.languages.node as node
17+
deep-remove-regex:
18+
- /owl-bot-staging
1819

19-
gapic = gcp.GAPICBazel()
20-
versions = ['v1', 'v1beta2']
21-
for version in versions:
22-
library = gapic.node_library('dataproc', version)
23-
s.copy(
24-
library,
25-
excludes=['package.json', 'src/index.ts', ]
26-
)
20+
deep-copy-regex:
21+
- source: /google/cloud/dataproc/(.*)/.*-nodejs/(.*)
22+
dest: /owl-bot-staging/$1/$2
2723

28-
common_templates = gcp.CommonTemplates()
29-
templates = common_templates.node_library(
30-
source_location='build/src', versions=versions, default_version='v1')
31-
s.copy(templates)
32-
33-
node.postprocess_gapic_library()
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2-
"name": "dataproc",
3-
"name_pretty": "Google Cloud Dataproc",
4-
"product_documentation": "https://cloud.google.com/dataproc",
52
"client_documentation": "https://googleapis.dev/nodejs/dataproc/latest",
6-
"issue_tracker": "https://issuetracker.google.com/savedsearches/559745",
3+
"api_id": "dataproc.googleapis.com",
4+
"distribution_name": "@google-cloud/dataproc",
75
"release_level": "ga",
6+
"default_version": "v1",
87
"language": "nodejs",
8+
"name_pretty": "Google Cloud Dataproc",
99
"repo": "googleapis/nodejs-dataproc",
10-
"distribution_name": "@google-cloud/dataproc",
11-
"api_id": "dataproc.googleapis.com",
12-
"requires_billing": true
10+
"product_documentation": "https://cloud.google.com/dataproc",
11+
"requires_billing": true,
12+
"name": "dataproc",
13+
"issue_tracker": "https://issuetracker.google.com/savedsearches/559745"
1314
}

packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1beta2/autoscaling_policies.proto

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ option (google.api.resource_definition) = {
3636
// Cloud Dataproc API.
3737
service AutoscalingPolicyService {
3838
option (google.api.default_host) = "dataproc.googleapis.com";
39-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
39+
option (google.api.oauth_scopes) =
40+
"https://www.googleapis.com/auth/cloud-platform";
4041

4142
// Creates new autoscaling policy.
42-
rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) returns (AutoscalingPolicy) {
43+
rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest)
44+
returns (AutoscalingPolicy) {
4345
option (google.api.http) = {
4446
post: "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies"
4547
body: "policy"
@@ -55,7 +57,8 @@ service AutoscalingPolicyService {
5557
//
5658
// Disabled check for update_mask, because all updates will be full
5759
// replacements.
58-
rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest) returns (AutoscalingPolicy) {
60+
rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest)
61+
returns (AutoscalingPolicy) {
5962
option (google.api.http) = {
6063
put: "/v1beta2/{policy.name=projects/*/locations/*/autoscalingPolicies/*}"
6164
body: "policy"
@@ -68,7 +71,8 @@ service AutoscalingPolicyService {
6871
}
6972

7073
// Retrieves autoscaling policy.
71-
rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) returns (AutoscalingPolicy) {
74+
rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest)
75+
returns (AutoscalingPolicy) {
7276
option (google.api.http) = {
7377
get: "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}"
7478
additional_bindings {
@@ -79,7 +83,8 @@ service AutoscalingPolicyService {
7983
}
8084

8185
// Lists autoscaling policies in the project.
82-
rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) returns (ListAutoscalingPoliciesResponse) {
86+
rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest)
87+
returns (ListAutoscalingPoliciesResponse) {
8388
option (google.api.http) = {
8489
get: "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies"
8590
additional_bindings {
@@ -91,7 +96,8 @@ service AutoscalingPolicyService {
9196

9297
// Deletes an autoscaling policy. It is an error to delete an autoscaling
9398
// policy that is in use by one or more clusters.
94-
rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest) returns (google.protobuf.Empty) {
99+
rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest)
100+
returns (google.protobuf.Empty) {
95101
option (google.api.http) = {
96102
delete: "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}"
97103
additional_bindings {
@@ -136,22 +142,26 @@ message AutoscalingPolicy {
136142
}
137143

138144
// Required. Describes how the autoscaler will operate for primary workers.
139-
InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(google.api.field_behavior) = REQUIRED];
145+
InstanceGroupAutoscalingPolicyConfig worker_config = 4
146+
[(google.api.field_behavior) = REQUIRED];
140147

141148
// Optional. Describes how the autoscaler will operate for secondary workers.
142-
InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(google.api.field_behavior) = OPTIONAL];
149+
InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5
150+
[(google.api.field_behavior) = OPTIONAL];
143151
}
144152

145153
// Basic algorithm for autoscaling.
146154
message BasicAutoscalingAlgorithm {
147155
// Required. YARN autoscaling configuration.
148-
BasicYarnAutoscalingConfig yarn_config = 1 [(google.api.field_behavior) = REQUIRED];
156+
BasicYarnAutoscalingConfig yarn_config = 1
157+
[(google.api.field_behavior) = REQUIRED];
149158

150159
// Optional. Duration between scaling events. A scaling period starts after
151160
// the update operation from the previous event has completed.
152161
//
153162
// Bounds: [2m, 1d]. Default: 2m.
154-
google.protobuf.Duration cooldown_period = 2 [(google.api.field_behavior) = OPTIONAL];
163+
google.protobuf.Duration cooldown_period = 2
164+
[(google.api.field_behavior) = OPTIONAL];
155165
}
156166

157167
// Basic autoscaling configurations for YARN.
@@ -162,22 +172,29 @@ message BasicYarnAutoscalingConfig {
162172
// downscaling operations.
163173
//
164174
// Bounds: [0s, 1d].
165-
google.protobuf.Duration graceful_decommission_timeout = 5 [(google.api.field_behavior) = REQUIRED];
166-
167-
// Required. Fraction of average pending memory in the last cooldown period
168-
// for which to add workers. A scale-up factor of 1.0 will result in scaling
169-
// up so that there is no pending memory remaining after the update (more
170-
// aggressive scaling). A scale-up factor closer to 0 will result in a smaller
171-
// magnitude of scaling up (less aggressive scaling).
175+
google.protobuf.Duration graceful_decommission_timeout = 5
176+
[(google.api.field_behavior) = REQUIRED];
177+
178+
// Required. Fraction of average YARN pending memory in the last cooldown
179+
// period for which to add workers. A scale-up factor of 1.0 will result in
180+
// scaling up so that there is no pending memory remaining after the update
181+
// (more aggressive scaling). A scale-up factor closer to 0 will result in a
182+
// smaller magnitude of scaling up (less aggressive scaling). See [How
183+
// autoscaling
184+
// works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
185+
// for more information.
172186
//
173187
// Bounds: [0.0, 1.0].
174188
double scale_up_factor = 1 [(google.api.field_behavior) = REQUIRED];
175189

176-
// Required. Fraction of average pending memory in the last cooldown period
177-
// for which to remove workers. A scale-down factor of 1 will result in
190+
// Required. Fraction of average YARN pending memory in the last cooldown
191+
// period for which to remove workers. A scale-down factor of 1 will result in
178192
// scaling down so that there is no available memory remaining after the
179193
// update (more aggressive scaling). A scale-down factor of 0 disables
180194
// removing workers, which can be beneficial for autoscaling a single job.
195+
// See [How autoscaling
196+
// works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
197+
// for more information.
181198
//
182199
// Bounds: [0.0, 1.0].
183200
double scale_down_factor = 2 [(google.api.field_behavior) = REQUIRED];
@@ -189,7 +206,8 @@ message BasicYarnAutoscalingConfig {
189206
// on any recommended change.
190207
//
191208
// Bounds: [0.0, 1.0]. Default: 0.0.
192-
double scale_up_min_worker_fraction = 3 [(google.api.field_behavior) = OPTIONAL];
209+
double scale_up_min_worker_fraction = 3
210+
[(google.api.field_behavior) = OPTIONAL];
193211

194212
// Optional. Minimum scale-down threshold as a fraction of total cluster size
195213
// before scaling occurs. For example, in a 20-worker cluster, a threshold of
@@ -198,7 +216,8 @@ message BasicYarnAutoscalingConfig {
198216
// on any recommended change.
199217
//
200218
// Bounds: [0.0, 1.0]. Default: 0.0.
201-
double scale_down_min_worker_fraction = 4 [(google.api.field_behavior) = OPTIONAL];
219+
double scale_down_min_worker_fraction = 4
220+
[(google.api.field_behavior) = OPTIONAL];
202221
}
203222

204223
// Configuration for the size bounds of an instance group, including its
@@ -341,7 +360,8 @@ message ListAutoscalingPoliciesRequest {
341360
// A response to a request to list autoscaling policies in a project.
342361
message ListAutoscalingPoliciesResponse {
343362
// Output only. Autoscaling policies list.
344-
repeated AutoscalingPolicy policies = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
363+
repeated AutoscalingPolicy policies = 1
364+
[(google.api.field_behavior) = OUTPUT_ONLY];
345365

346366
// Output only. This token is included in the response if there are more
347367
// results to fetch.

0 commit comments

Comments
 (0)