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

chore(backup): serialize the backup header [WPB-10575] #3159

Merged

Conversation

vitorhugods
Copy link
Member

@vitorhugods vitorhugods commented Dec 10, 2024

StoryWPB-10575 Cross Platform Backup: Write common backup / restore library


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

We need to be able to read and write the actual backup file, which contains metadata in its start.

Solutions

  1. Define a BackupHeader format (documented in the README).
  2. Write a Serializer that is able to convert a Header into a bytearray, and vice-versa.

In a future PR, this serializer + encryption (developed in another PR) will be joined together by an entity responsible for creating and restoring backups.

Testing

Test Coverage

  • I have added automated test to this contribution

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@echoes-hq echoes-hq bot added the echoes: product-roadmap/feature Work contributing to adding a new feature as part of the product roadmap. label Dec 10, 2024
@vitorhugods vitorhugods changed the title chore(backup): read and write the backup header [WPB-10575] chore(backup): serialize the backup header [WPB-10575] Dec 10, 2024
Copy link
Contributor

github-actions bot commented Dec 10, 2024

Test Results

3 359 tests   3 252 ✅  5m 29s ⏱️
  572 suites    107 💤
  572 files        0 ❌

Results for commit e8e1a5c.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (epic/multiplatform-backup@77f183f). Learn more about missing BASE report.

Additional details and impacted files
@@                     Coverage Diff                      @@
##             epic/multiplatform-backup    #3159   +/-   ##
============================================================
  Coverage                             ?   54.03%           
============================================================
  Files                                ?     1246           
  Lines                                ?    36152           
  Branches                             ?     3656           
============================================================
  Hits                                 ?    19534           
  Misses                               ?    15208           
  Partials                             ?     1410           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77f183f...e8e1a5c. Read the comment docs.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Dec 10, 2024

Datadog Report

Branch report: backup/chore/read-write-backup-header
Commit report: fd0d3ad
Test service: kalium-jvm

✅ 0 Failed, 3252 Passed, 107 Skipped, 37.33s Total Time

@vitorhugods vitorhugods merged commit ff0f36f into epic/multiplatform-backup Dec 11, 2024
21 checks passed
@vitorhugods vitorhugods deleted the backup/chore/read-write-backup-header branch December 11, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap/feature Work contributing to adding a new feature as part of the product roadmap. 👕 size: XL type: chore 🧹
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants