Page MenuHomePhabricator

[keyserver] Replace ashoat with admin
ClosedPublic

Authored by inka on Feb 19 2024, 5:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 1:44 AM
Unknown Object (File)
Fri, Nov 1, 10:45 PM
Unknown Object (File)
Oct 24 2024, 4:31 AM
Unknown Object (File)
Oct 24 2024, 4:12 AM
Unknown Object (File)
Oct 17 2024, 8:00 PM
Unknown Object (File)
Oct 15 2024, 8:31 PM
Unknown Object (File)
Oct 15 2024, 5:54 PM
Unknown Object (File)
Oct 15 2024, 5:54 PM
Subscribers

Details

Summary
Test Plan

Tested that creating a new db is successful - a user with the id provided by identity service is created and added to the users table(with the correct name), GENESIS is correctly created with creator id set to this id, user_id field is correctly filled

Diff Detail

Repository
rCOMM Comm
Branch
inka/testing_multikeyservers
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

inka requested review of this revision.Feb 19 2024, 5:18 AM
tomek added inline comments.
keyserver/src/database/setup-db.js
25–27

Is it OK to call createOlmAccounts before users in the DB exist?

433–453

Can we keep inserting admin.id in the same statement where it was? It should be possible by e.g. conditionally appending a query, or creating a values array and pushing to it based on a condition.

If it appears challenging, we should at least fix the formatting - when we insert a single value, it is placed in the same line as VALUES keyword.

keyserver/src/scripts/create-community.js
14
keyserver/src/user/identity.js
55–56
75
This revision is now accepted and ready to land.Feb 20 2024, 3:22 AM

Address review. I tested that the query still executes correctly for both uuid and a number like id

keyserver/src/database/setup-db.js
25–27

Yes, createOlmAccounts doesn't fetch anything from the db. It calls createPickledOlmAccount which basically only uses olm from '@commapp/olm', and uuid from uuid'. then it stores the data in olm_accounts table. Nothing else is being done.

This revision was automatically updated to reflect the committed changes.