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

ElementR: report invalid keys rather than failing to restore from backup #4006

Merged
merged 6 commits into from
Jan 26, 2024

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Jan 12, 2024

matrix-org/matrix-rust-sdk-crypto-wasm#85 adds a parameter to the importBackedUpRoomKeys callback that adds a parameter giving the number of failures. This PR passes that information along.

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

Here's what your changelog entry will look like:

🐛 Bug Fixes

  • ElementR: report invalid keys rather than failing to restore from backup (#4006).

@uhoreg uhoreg added the T-Task Tasks for the team like planning label Jan 12, 2024
@uhoreg uhoreg requested a review from a team as a code owner January 12, 2024 22:51
@uhoreg uhoreg marked this pull request as draft January 12, 2024 22:51
@richvdh richvdh removed their request for review January 15, 2024 12:35
@uhoreg uhoreg marked this pull request as ready for review January 20, 2024 19:37
@uhoreg uhoreg requested a review from a team as a code owner January 20, 2024 19:37
@uhoreg
Copy link
Member Author

uhoreg commented Jan 20, 2024

matrix-org/matrix-rust-sdk-crypto-wasm#85 is merged, so this can be reviewed now.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

Presumably this won't actually work until matrix-sdk-crypto-wasm is updated (element-hq/element-web#26900)?

Also, would be nice to see a test.

src/rust-crypto/backup.ts Outdated Show resolved Hide resolved
@uhoreg uhoreg marked this pull request as draft January 22, 2024 14:20
@uhoreg uhoreg changed the title ElementR: allow reporting failures when restoring keys ElementR: report invalid keys rather than failing to restore from backup Jan 23, 2024
@uhoreg uhoreg added T-Defect and removed T-Task Tasks for the team like planning labels Jan 23, 2024
@uhoreg uhoreg marked this pull request as ready for review January 23, 2024 04:43
@uhoreg
Copy link
Member Author

uhoreg commented Jan 23, 2024

Also, would be nice to see a test.

Wrote a test and found another place where importing could fail.

src/rust-crypto/backup.ts Outdated Show resolved Hide resolved
src/rust-crypto/backup.ts Outdated Show resolved Hide resolved
Comment on lines 219 to 220
// since we didn't include the invalid keys when calling
// importBackedUpRoomKeys, we need to add them to the total
Copy link
Member

Choose a reason for hiding this comment

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

this comment no longer makes sense.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm other than incorrect comment

@uhoreg uhoreg added this pull request to the merge queue Jan 26, 2024
Merged via the queue into matrix-org:develop with commit 2fe35fe Jan 26, 2024
20 checks passed
@uhoreg uhoreg deleted the rust_backup_progress_failures branch January 26, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants