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)
Tue, Dec 24, 6:05 AM
Unknown Object (File)
Tue, Dec 24, 6:05 AM
Unknown Object (File)
Tue, Dec 24, 6:05 AM
Unknown Object (File)
Tue, Dec 24, 6:04 AM
Unknown Object (File)
Tue, Dec 24, 6:04 AM
Unknown Object (File)
Fri, Dec 6, 6:59 PM
Unknown Object (File)
Fri, Nov 29, 3:13 AM
Unknown Object (File)
Fri, Nov 29, 12:20 AM
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.