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

Allow usage of the SQLite-based crypto store #714

Merged
merged 8 commits into from
Apr 21, 2023
Merged

Conversation

AndrewFerr
Copy link
Member

Fixes #609

@AndrewFerr AndrewFerr requested a review from a team as a code owner April 14, 2023 14:34
@AndrewFerr AndrewFerr self-assigned this Apr 14, 2023
@AndrewFerr
Copy link
Member Author

TODO: cut release of the vector-im fork of the matrix-bot-sdk with SQLite crypto storage support included. It relies on the latest beta release of the matrix-rust-sdk, but trying to use it has Hookshot fail on launch with this:

Error: Cannot find module '@matrix-org/matrix-sdk-crypto-nodejs-linux-x64-gnu'

yarn linking to a local build of the rust-sdk Node bindings works, though.

Could that failure be related to matrix-org/matrix-rust-sdk#968 ?

Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

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

(I'm a dumb and didn't review comment the first two comments, but anyway, some 🥫 for 💭 )

src/appservice.ts Outdated Show resolved Hide resolved
@Half-Shot Half-Shot mentioned this pull request Apr 17, 2023
@AndrewFerr
Copy link
Member Author

Barring review, this PR should now be done, other than updating the bot-sdk dependency (once it becomes available).

The yarn script for resetting crypto state should help fix "stuck" Hookshots that crash on startup with E2EE errors, or fail to decrypt messages even after resetting room keys (like with /discardsession or a page refresh in Element Web). The scenarios that cause those issues shouldn't happen during normal usage, but they're possible; having a command to get things back in order should come in handy.

Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

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

Rest of the changes look good, but a few things in the new script look suspect

src/App/ResetCryptoStore.ts Outdated Show resolved Hide resolved
src/App/ResetCryptoStore.ts Outdated Show resolved Hide resolved
src/App/ResetCryptoStore.ts Outdated Show resolved Hide resolved
src/App/ResetCryptoStore.ts Outdated Show resolved Hide resolved
src/App/ResetCryptoStore.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

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

I'm happy once CI passes

@AndrewFerr AndrewFerr mentioned this pull request Apr 21, 2023
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
Also document its usage & when it may be necessary to use it.
- add trailing semicolons
- remove redundant `Promise.resolve`s
- Move error object to parameter
- Rename logger
and call it to let the process exit cleanly
Use release with SQLite crypto store support
@AndrewFerr AndrewFerr merged commit f29fac7 into main Apr 21, 2023
@AndrewFerr AndrewFerr deleted the af/sql-crypto-store branch April 21, 2023 14:18
SpiritCroc added a commit to SpiritCroc/matrix-hookshot that referenced this pull request Apr 27, 2023
4.0.0 (2023-04-27)
==================

Features
--------

- Add support for specifying custom templates for feeds. ([\matrix-org#702](matrix-org#702))
- Use SQLite for file-based crypto stores by default, instead of Sled. ([\matrix-org#714](matrix-org#714))
- Notifications for RSS feed failures can now be toggled on and off. The feature is now **off** by default. ([\matrix-org#716](matrix-org#716))

Bugfixes
--------

- Fix mishandling of empty feed/item title tags. ([\matrix-org#708](matrix-org#708))
- Add information about GitHub App Installs in 'update' state on the oauth status page. ([\matrix-org#717](matrix-org#717))
- Fix cases of GitHub repos not being bridgable if the GitHub App had to be manually approved. ([\matrix-org#718](matrix-org#718))
- Switch to using Rust for parsing RSS feeds. ([\matrix-org#721](matrix-org#721))

Deprecations and Removals
-------------------------

- Add support for Node 20, and drop support for Node 16. ([\matrix-org#724](matrix-org#724))

Internal Changes
----------------

- Ensure all Hookshot specific metrics have a `hookshot_` prefix. ([\matrix-org#701](matrix-org#701))
- Update dependency used in Generic Webhook JS functions to fix a security flaw. ([\matrix-org#705](matrix-org#705))
- Switch to using Rust for parsing RSS feeds. ([\matrix-org#709](matrix-org#709))
- Update the README with a prettier set of features. ([\matrix-org#726](matrix-org#726))
- Update `yaml` dependency to `2.2.2` ([\matrix-org#728](matrix-org#728))

Conflicts:
	src/feeds/FeedReader.ts
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.

Failed to set up crypto on intent (IO error: could not acquire lock)
3 participants