New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(broker): specify variables to include in workflow result #3253
Conversation
fb2d097
to
eca82cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @deepthidevaki can we discuss some things ?
@saig0 had the idea of removing the response record - for the gateway we do not it (since we do not write it to the stream) what do you think?
@@ -12,23 +12,23 @@ | |||
import io.zeebe.protocol.record.RejectionType; | |||
import io.zeebe.protocol.record.intent.Intent; | |||
|
|||
public class CommandProcessorImpl<T extends UnifiedRecordValue> | |||
implements TypedRecordProcessor<T>, CommandControl<T> { | |||
public class CommandProcessorImpl<T extends UnifiedRecordValue, R extends UnifiedRecordValue> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need two types here?
@@ -15,20 +15,20 @@ | |||
* High-level record processor abstraction that implements the common behavior of most | |||
* command-handling processors. | |||
*/ | |||
public interface CommandProcessor<T extends UnifiedRecordValue> { | |||
public interface CommandProcessor<T extends UnifiedRecordValue, R extends UnifiedRecordValue> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really necessary? Could we just return the same type ?
If not can we name the types then somehow so for example T is the command type and R is the result type?
@@ -119,6 +119,9 @@ message CreateWorkflowInstanceWithResultRequest { | |||
// before the requestTimeout. | |||
// if requestTimeout = 0, uses the generic requestTimeout configured in the gateway. | |||
int64 requestTimeout = 2; | |||
// list of names of variables to be included in `CreateWorkflowInstanceWithResultResponse.variables` | |||
// if empty, all visible variables will be returned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the root scope right?
import io.zeebe.protocol.record.RejectionType; | ||
import io.zeebe.protocol.record.intent.Intent; | ||
|
||
public class CreateWorkflowInstanceWithResultProcessor | ||
implements CommandProcessor<WorkflowInstanceCreationRecord> { | ||
implements CommandProcessor< | ||
WorkflowInstanceCreationWithResultRecord, WorkflowInstanceCreationRecord> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just return WorkflowInstanceCreationWithResultRecord?
private final ColumnFamily<DbLong, AwaitWorkflowInstanceResultMetadata> | ||
private final AwaitWorkflowInstanceResultMetadata awaitResultMetadata; | ||
private final UnpackedObjectValue awaitResultMetadataValue; | ||
private final ColumnFamily<DbLong, UnpackedObjectValue> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you not use the awaitResultMetadataValue type?
32356ab
to
ca00628
Compare
ca00628
to
e866f01
Compare
e866f01
to
fe41537
Compare
* Set a list of variables names which should be fetched in the response. | ||
* | ||
* @param fetchVariables set of names of variables to be included in the response | ||
* @return the builder for this command. Call {@link #send()} to complete the command and send * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @return the builder for this command. Call {@link #send()} to complete the command and send * | |
* @return the builder for this command. Call {@link #send()} to complete the command and send |
* Set a list of variables names which should be fetched in the response. | ||
* | ||
* @param fetchVariables set of names of variables to be included in the response | ||
* @return the builder for this command. Call {@link #send()} to complete the command and send * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @return the builder for this command. Call {@link #send()} to complete the command and send * | |
* @return the builder for this command. Call {@link #send()} to complete the command and send |
bors r+ |
3253: feat(broker): specify variables to include in workflow result r=deepthidevaki a=deepthidevaki ## Description * Added another field in grpc message 'CreateWorkflowInstanceWithResultRequest' * Response will now include only the requested variables ## Related issues closes #3226 # 3280: chore(transport): add info to help debug flaky test r=npepinpe a=npepinpe ## Description - removes message (i.e. unicast) capabilities from ClientTransport, as it was not stable In general, as our goal is to get rid of the transport, I don't foresee us adding new features using these capabilities, and as our tests are flaky, we might as well just remove the whole thing. ## Related issues Closes #3273 # 3290: docs(README): add README for documentation module r=saig0 a=saig0 ## Description * add README for documentation module * remove documentation section from CONTRIBUTION guide # 3294: chore(deps): bump slf4j-api from 1.7.28 to 1.7.29 r=npepinpe a=dependabot-preview[bot] Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.28 to 1.7.29. <details> <summary>Commits</summary> - See full diff in [compare view](https://github.com/qos-ch/slf4j/commits) </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=org.slf4j:slf4j-api&package-manager=maven&previous-version=1.7.28&new-version=1.7.29)](https://dependabot.com/compatibility-score.html?dependency-name=org.slf4j:slf4j-api&package-manager=maven&previous-version=1.7.28&new-version=1.7.29) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com> Co-authored-by: Nicolas Pépin-Perreault <nicolas.pepin-perreault@camunda.com> Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Timed out (retrying...) |
3253: feat(broker): specify variables to include in workflow result r=deepthidevaki a=deepthidevaki ## Description * Added another field in grpc message 'CreateWorkflowInstanceWithResultRequest' * Response will now include only the requested variables ## Related issues closes #3226 # 3280: chore(transport): add info to help debug flaky test r=npepinpe a=npepinpe ## Description - removes message (i.e. unicast) capabilities from ClientTransport, as it was not stable In general, as our goal is to get rid of the transport, I don't foresee us adding new features using these capabilities, and as our tests are flaky, we might as well just remove the whole thing. ## Related issues Closes #3273 # Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com> Co-authored-by: Nicolas Pépin-Perreault <nicolas.pepin-perreault@camunda.com>
Timed out (retrying...) |
3253: feat(broker): specify variables to include in workflow result r=deepthidevaki a=deepthidevaki ## Description * Added another field in grpc message 'CreateWorkflowInstanceWithResultRequest' * Response will now include only the requested variables ## Related issues closes #3226 # Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
Build failed |
bors r+ |
3253: feat(broker): specify variables to include in workflow result r=deepthidevaki a=deepthidevaki ## Description * Added another field in grpc message 'CreateWorkflowInstanceWithResultRequest' * Response will now include only the requested variables ## Related issues closes #3226 # Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
Build succeeded |
3292: Limit variables which are returned after workflow instance completion in go client r=menski a=menski ## Description Allows the user to specify a list of variable names to limit the variables returned from the workflow instances result using the `FetchVariables` method. ## Related issues closes #3284 depends on #3253 # Co-authored-by: Sebastian Menski <sebastian.menski@camunda.com>
3292: Limit variables which are returned after workflow instance completion in go client r=menski a=menski ## Description Allows the user to specify a list of variable names to limit the variables returned from the workflow instances result using the `FetchVariables` method. ## Related issues closes #3284 depends on #3253 # Co-authored-by: Sebastian Menski <sebastian.menski@camunda.com>
3293: Add zbctl flag to wait for workflow instance result r=menski a=menski ## Description With the flag withResult the create instance command will wait for the workflow to complete. ``` zbctl create instance processId --withResult ``` Optional a list of variable names can be specified to limit the fetched variables. ``` zbctl create instance processId --withResult=x,"a b c",y ``` ## Related issues closes #3285 depends on #3253 depends on #3292 # Co-authored-by: Sebastian Menski <sebastian.menski@camunda.com>
Description
Related issues
closes #3226
Pull Request Checklist
mvn clean install -DskipTests
locally before committing