Skip to content
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

Introduce ProcessingResponse #10196

Merged
merged 9 commits into from
Aug 26, 2022
Merged

Conversation

Zelldon
Copy link
Member

@Zelldon Zelldon commented Aug 25, 2022

Description

blocked by #10191
blocked by #10188

Introduce the ProcessingResponse, which encapsulates the information of the Record which should be send as response on a user command and the request- and streamId which identifies the request.

The ProcessingResponse usage replaces the usage of the CommandResponseWriter, and deletes several now unused code.

Related issues

closes #10001

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Please refer to our review guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2022

Test Results

   852 files  ±  0     852 suites  ±0   1h 47m 28s ⏱️ + 7m 58s
6 365 tests  - 50  6 354 ✔️  - 50  11 💤 ±0  0 ±0 
6 549 runs   - 50  6 538 ✔️  - 50  11 💤 ±0  0 ±0 

Results for commit 0697540. ± Comparison against base commit 8bc7e82.

♻️ This comment has been updated with latest results.

ProcessingResponse contains the value which should be send as answer to an user command, and request and streamId which identifies the related request. The response will be created in the ProcessingResultBuilder and return as ProcessResult
Use the ProcessingResponse in the ProcessingResult and use it in the ProcessingStateMachine
@Zelldon Zelldon force-pushed the zell-response-writer-recordbatch branch from 137faf2 to b1fcff9 Compare August 26, 2022 10:10
Copy link
Contributor

@deepthidevaki deepthidevaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. But I think you should also add a test using the new StreamingPlatformExtension to test that after processing response is sent.

@Zelldon
Copy link
Member Author

Zelldon commented Aug 26, 2022

Thanks @deepthidevaki for your review 🙇 Actually we have already some see here https://github.com/camunda/zeebe/blob/main/engine/src/test/java/io/camunda/zeebe/engine/processing/streamprocessor/StreamProcessorTest.java#L454 I had to fix them in this PR, since they made some order assumptions.

I will migrate them soon to the extension, which is why I didn't wrote a new one right now. Hope that is fine for you.

@Zelldon
Copy link
Member Author

Zelldon commented Aug 26, 2022

bors r+

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit 82d6a8a into main Aug 26, 2022
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the zell-response-writer-recordbatch branch August 26, 2022 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Iterate over BufferedProcessingResultBuilder
2 participants