Skip to content

Commit c235f3a

Browse files
feat(v1): [batch] Add support for scheduling_policy (#9542)
- [ ] Regenerate this pull request now. docs(v1): Minor clarifications for TaskGroup and min_cpu_platform PiperOrigin-RevId: 540265821 Source-Link: https://togithub.com/googleapis/googleapis/commit/71856b9fcb496e11bdbbe52d3d8030c7334519e1 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/f194a119b94d3b1b96043e74ea6fef7eb42eb798 Copy-Tag: eyJwIjoiamF2YS1iYXRjaC8uT3dsQm90LnlhbWwiLCJoIjoiZjE5NGExMTliOTRkM2IxYjk2MDQzZTc0ZWE2ZmVmN2ViNDJlYjc5OCJ9 BEGIN_NESTED_COMMIT feat: [batch] implement minCpuPlatform --- feat: Enable scheduling_policy in v1 --- feat: update TaskGroup doc PiperOrigin-RevId: 540043151 Source-Link: https://togithub.com/googleapis/googleapis/commit/50a39ef600abf842ce8a749894f674b301253091 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/5bdc561934be9a4ad3244358288bae8ea65b8bd1 Copy-Tag: eyJwIjoiamF2YS1iYXRjaC8uT3dsQm90LnlhbWwiLCJoIjoiNWJkYzU2MTkzNGJlOWE0YWQzMjQ0MzU4Mjg4YmFlOGVhNjViOGJkMSJ9 END_NESTED_COMMIT
1 parent af36e0a commit c235f3a

File tree

11 files changed

+476
-245
lines changed

11 files changed

+476
-245
lines changed

java-batch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2323
<dependency>
2424
<groupId>com.google.cloud</groupId>
2525
<artifactId>libraries-bom</artifactId>
26-
<version>26.16.0</version>
26+
<version>26.17.0</version>
2727
<type>pom</type>
2828
<scope>import</scope>
2929
</dependency>

java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5239,7 +5239,6 @@ public interface InstancePolicyOrBuilder
52395239
* The minimum CPU platform.
52405240
* See
52415241
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
5242-
* Not yet implemented.
52435242
* </pre>
52445243
*
52455244
* <code>string min_cpu_platform = 3;</code>
@@ -5254,7 +5253,6 @@ public interface InstancePolicyOrBuilder
52545253
* The minimum CPU platform.
52555254
* See
52565255
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
5257-
* Not yet implemented.
52585256
* </pre>
52595257
*
52605258
* <code>string min_cpu_platform = 3;</code>
@@ -5552,7 +5550,6 @@ public com.google.protobuf.ByteString getMachineTypeBytes() {
55525550
* The minimum CPU platform.
55535551
* See
55545552
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
5555-
* Not yet implemented.
55565553
* </pre>
55575554
*
55585555
* <code>string min_cpu_platform = 3;</code>
@@ -5578,7 +5575,6 @@ public java.lang.String getMinCpuPlatform() {
55785575
* The minimum CPU platform.
55795576
* See
55805577
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
5581-
* Not yet implemented.
55825578
* </pre>
55835579
*
55845580
* <code>string min_cpu_platform = 3;</code>
@@ -6531,7 +6527,6 @@ public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) {
65316527
* The minimum CPU platform.
65326528
* See
65336529
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
6534-
* Not yet implemented.
65356530
* </pre>
65366531
*
65376532
* <code>string min_cpu_platform = 3;</code>
@@ -6556,7 +6551,6 @@ public java.lang.String getMinCpuPlatform() {
65566551
* The minimum CPU platform.
65576552
* See
65586553
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
6559-
* Not yet implemented.
65606554
* </pre>
65616555
*
65626556
* <code>string min_cpu_platform = 3;</code>
@@ -6581,7 +6575,6 @@ public com.google.protobuf.ByteString getMinCpuPlatformBytes() {
65816575
* The minimum CPU platform.
65826576
* See
65836577
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
6584-
* Not yet implemented.
65856578
* </pre>
65866579
*
65876580
* <code>string min_cpu_platform = 3;</code>
@@ -6605,7 +6598,6 @@ public Builder setMinCpuPlatform(java.lang.String value) {
66056598
* The minimum CPU platform.
66066599
* See
66076600
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
6608-
* Not yet implemented.
66096601
* </pre>
66106602
*
66116603
* <code>string min_cpu_platform = 3;</code>
@@ -6625,7 +6617,6 @@ public Builder clearMinCpuPlatform() {
66256617
* The minimum CPU platform.
66266618
* See
66276619
* https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
6628-
* Not yet implemented.
66296620
* </pre>
66306621
*
66316622
* <code>string min_cpu_platform = 3;</code>

java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/JobProto.java

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -230,23 +230,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
230230
+ "istance\030\002 \001(\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001("
231231
+ "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"`\n\021ProvisioningMode"
232232
+ "l\022\"\n\036PROVISIONING_MODEL_UNSPECIFIED\020\000\022\014\n"
233-
+ "\010STANDARD\020\001\022\010\n\004SPOT\020\002\022\017\n\013PREEMPTIBLE\020\003\"\203"
234-
+ "\003\n\tTaskGroup\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0228\n\ttask"
233+
+ "\010STANDARD\020\001\022\010\n\004SPOT\020\002\022\017\n\013PREEMPTIBLE\020\003\"\257"
234+
+ "\004\n\tTaskGroup\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0228\n\ttask"
235235
+ "_spec\030\003 \001(\0132\037.google.cloud.batch.v1.Task"
236236
+ "SpecB\004\342A\001\002\022\022\n\ntask_count\030\004 \001(\003\022\023\n\013parall"
237-
+ "elism\030\005 \001(\003\022=\n\021task_environments\030\t \003(\0132\""
238-
+ ".google.cloud.batch.v1.Environment\022\033\n\023ta"
239-
+ "sk_count_per_node\030\n \001(\003\022\032\n\022require_hosts"
240-
+ "_file\030\013 \001(\010\022\026\n\016permissive_ssh\030\014 \001(\010:o\352Al"
241-
+ "\n\036batch.googleapis.com/TaskGroup\022Jprojec"
242-
+ "ts/{project}/locations/{location}/jobs/{"
243-
+ "job}/taskGroups/{task_group}\"/\n\016ServiceA"
244-
+ "ccount\022\r\n\005email\030\001 \001(\t\022\016\n\006scopes\030\002 \003(\tB\251\001"
245-
+ "\n\031com.google.cloud.batch.v1B\010JobProtoP\001Z"
246-
+ "/cloud.google.com/go/batch/apiv1/batchpb"
247-
+ ";batchpb\242\002\003GCB\252\002\025Google.Cloud.Batch.V1\312\002"
248-
+ "\025Google\\Cloud\\Batch\\V1\352\002\030Google::Cloud::"
249-
+ "Batch::V1b\006proto3"
237+
+ "elism\030\005 \001(\003\022L\n\021scheduling_policy\030\006 \001(\01621"
238+
+ ".google.cloud.batch.v1.TaskGroup.Schedul"
239+
+ "ingPolicy\022=\n\021task_environments\030\t \003(\0132\".g"
240+
+ "oogle.cloud.batch.v1.Environment\022\033\n\023task"
241+
+ "_count_per_node\030\n \001(\003\022\032\n\022require_hosts_f"
242+
+ "ile\030\013 \001(\010\022\026\n\016permissive_ssh\030\014 \001(\010\"\\\n\020Sch"
243+
+ "edulingPolicy\022!\n\035SCHEDULING_POLICY_UNSPE"
244+
+ "CIFIED\020\000\022\027\n\023AS_SOON_AS_POSSIBLE\020\001\022\014\n\010IN_"
245+
+ "ORDER\020\002:o\352Al\n\036batch.googleapis.com/TaskG"
246+
+ "roup\022Jprojects/{project}/locations/{loca"
247+
+ "tion}/jobs/{job}/taskGroups/{task_group}"
248+
+ "\"/\n\016ServiceAccount\022\r\n\005email\030\001 \001(\t\022\016\n\006sco"
249+
+ "pes\030\002 \003(\tB\251\001\n\031com.google.cloud.batch.v1B"
250+
+ "\010JobProtoP\001Z/cloud.google.com/go/batch/a"
251+
+ "piv1/batchpb;batchpb\242\002\003GCB\252\002\025Google.Clou"
252+
+ "d.Batch.V1\312\002\025Google\\Cloud\\Batch\\V1\352\002\030Goo"
253+
+ "gle::Cloud::Batch::V1b\006proto3"
250254
};
251255
descriptor =
252256
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -452,6 +456,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
452456
"TaskSpec",
453457
"TaskCount",
454458
"Parallelism",
459+
"SchedulingPolicy",
455460
"TaskEnvironments",
456461
"TaskCountPerNode",
457462
"RequireHostsFile",

0 commit comments

Comments
 (0)