Skip to content

Commit

Permalink
feat: [workflowexecutions] add UNAVAILABLE and QUEUED to state enum (#…
Browse files Browse the repository at this point in the history
…9771)

- [ ] Regenerate this pull request now.

feat: add LOG_NONE to call_log_level
feat: add status, labels, duration and state_error fields to Execution
feat: add filter and order_by fields to ListExecutionsRequest

PiperOrigin-RevId: 557594531

Source-Link: https://togithub.com/googleapis/googleapis/commit/6ba6f91298976f366f1b3eb2bfa4c5abe73f372c

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/6c079c0825df88bccc6bc11135ca9ef719d717e6
Copy-Tag: eyJwIjoiamF2YS13b3JrZmxvdy1leGVjdXRpb25zLy5Pd2xCb3QueWFtbCIsImgiOiI2YzA3OWMwODI1ZGY4OGJjY2M2YmMxMTEzNWNhOWVmNzE5ZDcxN2U2In0=
  • Loading branch information
gcf-owl-bot[bot] committed Aug 30, 2023
1 parent 1453bc7 commit f12a188
Show file tree
Hide file tree
Showing 18 changed files with 6,686 additions and 1,264 deletions.
4 changes: 2 additions & 2 deletions java-workflow-executions/README.md
Expand Up @@ -20,7 +20,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.19.0</version>
<version>26.22.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,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-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-workflow-executions.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workflow-executions/2.21.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workflow-executions/2.23.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
Expand Up @@ -256,6 +256,8 @@ public final ListExecutionsPagedResponse listExecutions(String parent) {
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setView(ExecutionView.forNumber(0))
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* for (Execution element : executionsClient.listExecutions(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -291,6 +293,8 @@ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest re
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setView(ExecutionView.forNumber(0))
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* ApiFuture<Execution> future =
* executionsClient.listExecutionsPagedCallable().futureCall(request);
Expand Down Expand Up @@ -327,6 +331,8 @@ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest re
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setView(ExecutionView.forNumber(0))
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
* ListExecutionsResponse response = executionsClient.listExecutionsCallable().call(request);
Expand Down
Expand Up @@ -79,6 +79,8 @@ public class HttpJsonExecutionsStub extends ExecutionsStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<ListExecutionsRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "filter", request.getFilter());
serializer.putQueryParam(fields, "orderBy", request.getOrderBy());
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
serializer.putQueryParam(fields, "view", request.getViewValue());
Expand Down
Expand Up @@ -521,6 +521,69 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.workflows.executions.v1.Execution$StateError",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.workflows.executions.v1.Execution$StateError$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.workflows.executions.v1.Execution$StateError$Type",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.workflows.executions.v1.Execution$Status",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.workflows.executions.v1.Execution$Status$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.workflows.executions.v1.Execution$Status$Step",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.workflows.executions.v1.Execution$Status$Step$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.workflows.executions.v1.ExecutionView",
"queryAllDeclaredConstructors": true,
Expand Down
Expand Up @@ -29,9 +29,11 @@
import com.google.api.gax.rpc.testing.FakeStatusCode;
import com.google.cloud.workflows.executions.v1.stub.HttpJsonExecutionsStub;
import com.google.common.collect.Lists;
import com.google.protobuf.Duration;
import com.google.protobuf.Timestamp;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import javax.annotation.Generated;
import org.junit.After;
Expand Down Expand Up @@ -183,10 +185,14 @@ public void createExecutionTest() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -236,10 +242,14 @@ public void createExecutionTest2() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -289,10 +299,14 @@ public void getExecutionTest() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -340,10 +354,14 @@ public void getExecutionTest2() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -393,10 +411,14 @@ public void cancelExecutionTest() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -444,10 +466,14 @@ public void cancelExecutionTest2() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down
Expand Up @@ -27,10 +27,12 @@
import com.google.api.gax.rpc.InvalidArgumentException;
import com.google.common.collect.Lists;
import com.google.protobuf.AbstractMessage;
import com.google.protobuf.Duration;
import com.google.protobuf.Timestamp;
import io.grpc.StatusRuntimeException;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import javax.annotation.Generated;
Expand Down Expand Up @@ -175,10 +177,14 @@ public void createExecutionTest() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockExecutions.addResponse(expectedResponse);

Expand Down Expand Up @@ -223,10 +229,14 @@ public void createExecutionTest2() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockExecutions.addResponse(expectedResponse);

Expand Down Expand Up @@ -271,10 +281,14 @@ public void getExecutionTest() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockExecutions.addResponse(expectedResponse);

Expand Down Expand Up @@ -316,10 +330,14 @@ public void getExecutionTest2() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockExecutions.addResponse(expectedResponse);

Expand Down Expand Up @@ -361,10 +379,14 @@ public void cancelExecutionTest() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockExecutions.addResponse(expectedResponse);

Expand Down Expand Up @@ -406,10 +428,14 @@ public void cancelExecutionTest2() throws Exception {
ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString())
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setArgument("argument-1589682499")
.setResult("result-934426595")
.setError(Execution.Error.newBuilder().build())
.setWorkflowRevisionId("workflowRevisionId-1575712907")
.setStatus(Execution.Status.newBuilder().build())
.putAllLabels(new HashMap<String, String>())
.setStateError(Execution.StateError.newBuilder().build())
.build();
mockExecutions.addResponse(expectedResponse);

Expand Down

0 comments on commit f12a188

Please sign in to comment.