Skip to content

Commit

Permalink
feat: [run] Adds support for Startup CPU Boost (GA) (#9397)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

feat: Adds support for Session affinity in Service (GA)
feat: New 'port' field for HttpGetAction probe type
feat: New fields/enum values
docs: General documentation fixes.

Startup CPU Boost
 * The new field is found in https://cloud.google.com/run/docs/reference/rest/v2/Container#resourcerequirements.
 * For more information, see https://cloud.google.com/run/docs/configuring/cpu#startup-boost

Session Affinity
 * The new field is found in https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#revisiontemplate.
 * For more informaton, see https://cloud.google.com/run/docs/configuring/session-affinity

HttpGetAction probe port
 * The new field is found in https://cloud.google.com/run/docs/reference/rest/v2/Container#httpgetaction

Fields/enum values
* New output-only field satisfiesPzs in Service, Revision, Execution, and Job, currently unused. The field is reserved for future use. It is surfaced to maintain v1<->v2 portability.
* New ExecutionReason.CANCELLING enum value. This is used in output-only field.

Documentation fixes
* Clarified permissions required for Upsert behavior (UpdateServiceRequest.allowMissing)
* Clarified behavior for LaunchStage in all resource types.
* Misc documentation improvements; removed most external references.

PiperOrigin-RevId: 528248744

Source-Link: https://togithub.com/googleapis/googleapis/commit/a9fb0d2fa85049b316bf7d59248e7a61c6fecb66

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/8ffce4c11b97928ae8b1727657ab203dad6597e4
Copy-Tag: eyJwIjoiamF2YS1ydW4vLk93bEJvdC55YW1sIiwiaCI6IjhmZmNlNGMxMWI5NzkyOGFlOGIxNzI3NjU3YWIyMDNkYWQ2NTk3ZTQifQ==
  • Loading branch information
gcf-owl-bot[bot] authored May 9, 2023
1 parent eeea875 commit a980e4d
Show file tree
Hide file tree
Showing 64 changed files with 3,184 additions and 1,667 deletions.
4 changes: 2 additions & 2 deletions java-run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.11.0</version>
<version>26.13.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-run.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.14.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.16.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public void getExecutionTest() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -179,6 +180,7 @@ public void getExecutionTest2() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -350,6 +352,7 @@ public void deleteExecutionTest() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -424,6 +427,7 @@ public void deleteExecutionTest2() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public void getExecutionTest() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
mockExecutions.addResponse(expectedResponse);
Expand Down Expand Up @@ -181,6 +182,7 @@ public void getExecutionTest2() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
mockExecutions.addResponse(expectedResponse);
Expand Down Expand Up @@ -332,6 +334,7 @@ public void deleteExecutionTest() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -403,6 +406,7 @@ public void deleteExecutionTest2() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public void createJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -192,6 +193,7 @@ public void createJobTest2() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -267,6 +269,7 @@ public void getJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -333,6 +336,7 @@ public void getJobTest2() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -499,6 +503,7 @@ public void updateJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -533,6 +538,7 @@ public void updateJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();

Expand Down Expand Up @@ -586,6 +592,7 @@ public void updateJobExceptionTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
client.updateJobAsync(job).get();
Expand Down Expand Up @@ -620,6 +627,7 @@ public void deleteJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -691,6 +699,7 @@ public void deleteJobTest2() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -765,6 +774,7 @@ public void runJobTest() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -839,6 +849,7 @@ public void runJobTest2() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public void createJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -198,6 +199,7 @@ public void createJobTest2() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -272,6 +274,7 @@ public void getJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
mockJobs.addResponse(expectedResponse);
Expand Down Expand Up @@ -332,6 +335,7 @@ public void getJobTest2() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
mockJobs.addResponse(expectedResponse);
Expand Down Expand Up @@ -480,6 +484,7 @@ public void updateJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -548,6 +553,7 @@ public void deleteJobTest() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -616,6 +622,7 @@ public void deleteJobTest2() throws Exception {
.setExecutionCount(1646136616)
.setLatestCreatedExecution(ExecutionReference.newBuilder().build())
.setReconciling(true)
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -687,6 +694,7 @@ public void runJobTest() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -758,6 +766,7 @@ public void runJobTest2() throws Exception {
.setCancelledCount(1921113249)
.setRetriedCount(-1654679545)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ public void getRevisionTest() throws Exception {
.addAllConditions(new ArrayList<Condition>())
.setObservedGeneration(900833007)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setSessionAffinity(true)
.setEtag("etag3123477")
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -184,6 +186,8 @@ public void getRevisionTest2() throws Exception {
.addAllConditions(new ArrayList<Condition>())
.setObservedGeneration(900833007)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setSessionAffinity(true)
.setEtag("etag3123477")
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -357,6 +361,8 @@ public void deleteRevisionTest() throws Exception {
.addAllConditions(new ArrayList<Condition>())
.setObservedGeneration(900833007)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setSessionAffinity(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -433,6 +439,8 @@ public void deleteRevisionTest2() throws Exception {
.addAllConditions(new ArrayList<Condition>())
.setObservedGeneration(900833007)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setSessionAffinity(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ public void getRevisionTest() throws Exception {
.addAllConditions(new ArrayList<Condition>())
.setObservedGeneration(900833007)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setSessionAffinity(true)
.setEtag("etag3123477")
.build();
mockRevisions.addResponse(expectedResponse);
Expand Down Expand Up @@ -186,6 +188,8 @@ public void getRevisionTest2() throws Exception {
.addAllConditions(new ArrayList<Condition>())
.setObservedGeneration(900833007)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setSessionAffinity(true)
.setEtag("etag3123477")
.build();
mockRevisions.addResponse(expectedResponse);
Expand Down Expand Up @@ -339,6 +343,8 @@ public void deleteRevisionTest() throws Exception {
.addAllConditions(new ArrayList<Condition>())
.setObservedGeneration(900833007)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setSessionAffinity(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down Expand Up @@ -412,6 +418,8 @@ public void deleteRevisionTest2() throws Exception {
.addAllConditions(new ArrayList<Condition>())
.setObservedGeneration(900833007)
.setLogUri("logUri-1097354360")
.setSatisfiesPzs(true)
.setSessionAffinity(true)
.setEtag("etag3123477")
.build();
Operation resultOperation =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public void createServiceTest() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -205,6 +206,7 @@ public void createServiceTest2() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -287,6 +289,7 @@ public void getServiceTest() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -360,6 +363,7 @@ public void getServiceTest2() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -533,6 +537,7 @@ public void updateServiceTest() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -574,6 +579,7 @@ public void updateServiceTest() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -634,6 +640,7 @@ public void updateServiceExceptionTest() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -675,6 +682,7 @@ public void deleteServiceTest() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -753,6 +761,7 @@ public void deleteServiceTest2() throws Exception {
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
.setUri("uri116076")
.setSatisfiesPzs(true)
.setReconciling(true)
.setEtag("etag3123477")
.build();
Expand Down
Loading

0 comments on commit a980e4d

Please sign in to comment.