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

Refactor checksum collection writing and usage #14175

Merged
merged 8 commits into from
Sep 6, 2023

Conversation

Zelldon
Copy link
Member

@Zelldon Zelldon commented Sep 6, 2023

Description

The first part of PR:

Instead of constructing a byte array with byte output stream and writers, and then later writing again
to a stream, we now get an OutputStream in and write directly to the stream

Additionally PR contains #14184

  • Support to update the checksum collection from bytes, which might be received or read from the file already. This is useful, if we want to avoid re-reading files etc.
  • Support to persist snapshot with given checksum collection.
  • collection of checksum is no longer recreated and directly written to the directory.

Related issues

related #14045

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.)
  • 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.

Other teams:
If the change impacts another team an issue has been created for this team, explaining what they need to do to support this change.

Please refer to our review guidelines.

Instead of constructing a byte array with byte output stream and writers, and then later writing again
to a stream, we no get an OutputStream in and write directly to the stream
Copy link
Member

@npepinpe npepinpe left a comment

Choose a reason for hiding this comment

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

👍 Just one comment, but no need for another review

Co-authored-by: Nicolas Pepin-Perreault <43373+npepinpe@users.noreply.github.com>
@Zelldon
Copy link
Member Author

Zelldon commented Sep 6, 2023

bors r+

zeebe-bors-camunda bot added a commit that referenced this pull request Sep 6, 2023
14175: Refactor checksum collection writing r=Zelldon a=Zelldon

## Description

Instead of constructing a byte array with byte output stream and writers, and then later writing again
to a stream, we no get an OutputStream in and write directly to the stream



<!-- Please explain the changes you made here. -->

## Related issues

<!-- Which issues are closed by this PR or are related -->

related #14045 



Co-authored-by: Christopher Zell <zelldon91@googlemail.com>
Co-authored-by: Christopher Kujawa (Zell) <zelldon91@googlemail.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

Base automatically changed from ck-new-checksum-interface to main September 6, 2023 10:32
Useful, if we want to avoid re-reading files etc.
Should allow to use pre calculated checksums, instead of always recalculating the value.
New persist method accepts SFV checksum, but needs to be reworked that we not recalculate value.
@Zelldon
Copy link
Member Author

Zelldon commented Sep 6, 2023

bors r+

@zeebe-bors-camunda
Copy link
Contributor

Canceled.

@Zelldon
Copy link
Member Author

Zelldon commented Sep 6, 2023

bors r+

@Zelldon Zelldon changed the title Refactor checksum collection writing Refactor checksum collection writing and usage Sep 6, 2023
zeebe-bors-camunda bot added a commit that referenced this pull request Sep 6, 2023
14175: Refactor checksum collection writing and usage r=Zelldon a=Zelldon

## Description

The first part of PR:

Instead of constructing a byte array with byte output stream and writers, and then later writing again
to a stream, we now get an OutputStream in and write directly to the stream


Additionally PR contains #14184

- Support to update the checksum collection from bytes, which might be received or read from the file already. This is useful, if we want to avoid re-reading files etc.
- Support to persist snapshot with given checksum collection.
- collection of checksum is no longer recreated and directly written to the directory.



<!-- Please explain the changes you made here. -->

## Related issues

<!-- Which issues are closed by this PR or are related -->

related #14045 



Co-authored-by: Christopher Zell <zelldon91@googlemail.com>
Co-authored-by: Christopher Kujawa (Zell) <zelldon91@googlemail.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@Zelldon
Copy link
Member Author

Zelldon commented Sep 6, 2023

bors r+

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit 87fc564 into main Sep 6, 2023
32 checks passed
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the ck-refactor-checksum branch September 6, 2023 15:24
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.

None yet

2 participants