Commit graph

1669 commits

Author SHA1 Message Date
alexfca 1a5d7f2bb2
- Add SetUpdateTime() to all Update statements (#20)
- Refactor Updates to use a shared method
- Remove private setXX() methods

Co-authored-by: alexf@example.com <alexf@example.com>
2021-09-24 10:56:06 +10:00
alexfca 3088238419
Add UniqueId to PartitionKey for some Dendrite tables (where possible) (#19)
* - Make all PartitionKeys include the tablename
- Update specific PKs to be item specific
- Add validation to the PerformQueryXX methods
- Fix queries that fail validation

* - Revert the PK back to CollectionName as it already includes the TableName

Co-authored-by: alexf@example.com <alexf@example.com>
2021-09-23 14:48:32 +10:00
alexfca 927238a686
Use a common way to generate CollectionName and PartitionKey (#18)
* - Create CosmosDocument as a base class
- Add CT and UT
- Refactor all tables to use the CosmosDocument

* - Add UpsertDocument method to perform updates in a generic way
- Add SetUpdateTime() to update the UT for updates
- Refactor it all

* - Add Performquery method
- Refactor appservice_events_table

* - Update naffka Topics and Messages to use the common pattern

* - Update keyserver to use the common pattern for collection and PK

* - Update mediaapi to use the common pattern for collection and pk

* - Update roomserver to use the common pattern for collectionname and pk

* - Update signingkeyserver to use the common pattern for collectionname and pk

* - Update userapi touse the common pattern for collectionname and pk

* - Update partitionOffset to use the common collectionname and pk
- Remove generic GetPartitionKey() method

Co-authored-by: alexf@example.com <alexf@example.com>
2021-09-23 09:02:37 +10:00
alexfca acf63daf79
Add CT and UT to all documents and refactor (#17)
* - Create CosmosDocument as a base class
- Add CT and UT
- Refactor all tables to use the CosmosDocument

* - Add UpsertDocument method to perform updates in a generic way
- Add SetUpdateTime() to update the UT for updates
- Refactor it all

Co-authored-by: alexf@example.com <alexf@example.com>
2021-09-20 17:41:04 +10:00
Jared Jacobson c0989167f9 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 17:33:04 +10:00
Jared Jacobson ef4ec9a9b8 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 17:29:31 +10:00
Jared Jacobson c4b2cd6998 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 17:21:25 +10:00
Jared Jacobson ed1424e946 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 17:13:37 +10:00
Jared Jacobson 196118e255 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 17:03:13 +10:00
Jared Jacobson 2605b844ad Update azure-pipelines.yml for Azure Pipelines 2021-09-13 16:53:00 +10:00
Ubuntu 0f1ea3994e Modify the docker build files 2021-09-13 06:52:54 +00:00
Jared Jacobson 2aabcbb945 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 15:56:47 +10:00
Jared Jacobson ed495f4cd1 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 11:44:33 +10:00
Jared Jacobson b72f2ff0f5 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 11:43:03 +10:00
Jared Jacobson e8e89dc29b Update azure-pipelines.yml for Azure Pipelines 2021-09-13 11:40:18 +10:00
Jared Jacobson 22fdb575fd Update azure-pipelines.yml for Azure Pipelines 2021-09-13 11:38:25 +10:00
Jared Jacobson 1160178c60 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 11:29:28 +10:00
Jared Jacobson 96ba9a9119 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 11:29:13 +10:00
Jared Jacobson c007c97e15 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 11:21:31 +10:00
Jared Jacobson 6af0e71729 Modify the build script 2021-09-13 11:16:33 +10:00
Jared Jacobson 03220ccc56 Merge branch 'develop' of https://github.com/criticalarc/dendrite into develop 2021-09-13 11:02:10 +10:00
Jared Jacobson 4d6b8ab5f2 Revert build script changes 2021-09-13 11:02:03 +10:00
Jared Jacobson 3ef16f660e Update azure-pipelines.yml for Azure Pipelines 2021-09-13 11:00:30 +10:00
Jared Jacobson 277af95b36 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 10:58:20 +10:00
Jared Jacobson a5e887320b Update azure-pipelines.yml for Azure Pipelines 2021-09-13 10:55:23 +10:00
Jared Jacobson 571777ede8 Modify build script 2021-09-13 10:49:11 +10:00
Jared Jacobson 43894bee6d Update azure-pipelines.yml for Azure Pipelines 2021-09-13 10:44:55 +10:00
Jared Jacobson 00f8eddf8a Update azure-pipelines.yml for Azure Pipelines 2021-09-13 10:41:55 +10:00
Jared Jacobson fb84313666 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 10:37:28 +10:00
Jared Jacobson 920dfa0530 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 10:33:01 +10:00
Jared Jacobson 58dde8fc14 Merge branch 'develop' of https://github.com/criticalarc/dendrite into develop 2021-09-13 10:23:25 +10:00
Jared Jacobson 71407cb2e4 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 10:22:56 +10:00
Jared Jacobson 4ed0910477 Remove the github actions 2021-09-13 10:22:29 +10:00
Jared Jacobson a9c1635407 Update azure-pipelines.yml for Azure Pipelines 2021-09-13 10:20:15 +10:00
Jared Jacobson 8fd78a3d6a Add Azure build pipeline 2021-09-13 10:17:57 +10:00
alexfca 032ad5b052
Fix Forget Room bug that prevented Room Deletion (#16)
- Fix membership Insert to ensure the OnConflict performs an Update if exists
- Fix type in the rooms bulkSelectRoomNIDsSQL

Co-authored-by: alexf@example.com <alexf@example.com>
2021-09-13 09:52:55 +10:00
alexfca fd7f25479b
Upgrade Dendrite 0.5.0 support for CosmosDB (#15)
* - Add CosmosDB back
- Add missing methods to blacklist_table.go
- Add missing methods to device_keys_table.go
- Add missing methods to events_table.go
- Add missing methods to membership_table.go
- Update state_block_table.go (due to reafctor SQL)
- Update state_snapshot_table.go (due to reafctor SQL)
- Add new key_backup_table.go
- Add new key_backup_version_table.go
- Code compiles but has runtime errors

* Message sending + receiving working
Rooms and DMs working
- Add CrossSigningKeys table
- Add CrossSigningSigs table
- Refactor DeviceKeys yable
- Fix OneTimeKeys
- Update the KeyServer storage.go to use a PartitionStorer instead of a specific SQL PartitionOffsetStatements
- Fix small issues from the previous commit
- Implement DeleteSendToDeviceMessages

Co-authored-by: alexf@example.com <alexf@example.com>
2021-09-10 16:04:17 +10:00
Jared Jacobson 84c8cb052b Merge branch 'master' into develop
# Conflicts:
#	go.mod
#	go.sum
2021-09-03 13:54:05 +10:00
Neil Alexander 037ff4fb23
Version 0.5.0 2021-08-24 15:03:28 +01:00
Neil Alexander 4b0cc32af2
Hopefully fix UIA for cross-signing setup (closes #1983) (#1986) 2021-08-24 11:44:03 +01:00
Neil Alexander 329c9e671c
Update to matrix-org/pinecone@e692df1 2021-08-19 16:07:28 +01:00
Neil Alexander 9a2dcd6078
Update to matrix-org/pinecone@21e3b39228 2021-08-19 15:02:50 +01:00
Neil Alexander cd3823308c
Version 0.5.0rc1 2021-08-18 14:29:45 +01:00
Neil Alexander cf42ae6064
Build Docker images using Go 1.17 2021-08-18 14:13:38 +01:00
Kevin Liu fe5050c0a5
Add and use M_ROOM_IN_USE (#1972)
Signed-off-by: nivekuil <mail@nivekuil.com>

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-08-18 12:41:30 +01:00
Neil Alexander 614e67280d
Delete device keys/signatures from key server when deleting devices (#1979)
* Delete device keys/signatures from key server when deleting device from user API

* Move loop to within database transaction

* Don't fall over deleting no rows
2021-08-18 12:07:09 +01:00
Sambhav Saggi 1bee1ae204
Syslog integration (#1952)
* Syslog integration, part 1

* Add protocol, make sure syslog actually logs

* Make golangci-lint happy about shadow variables

* Add syslog tag, wrap syslog in logLevelHook
2021-08-17 16:18:51 +01:00
Neil Alexander ff21675c5b
Cross-signing fixes, notifications via sync, federation (#1974)
* Initial work on signing key update EDUs

* Fix build

* Produce/consume EDUs

* Producer logging

* Only produce key change notifications for local users

* Better naming

* Try to notify sync

* Enable feature

* Use key change topic

* Don't bother verifying signatures, validate key lengths if we can, notifier fixes

* Copyright notices

* Remove tests from whitelist until matrix-org/sytest#1117

* Some review comment fixes

* Update to matrix-org/gomatrixserverlib@f9416ac

* Remove unneeded parameter
2021-08-17 13:44:30 +01:00
S7evinK 8a4b90b7dd
Update golangci-lint (#1978)
* Update golangci-lint

* Use unconditional strings.TrimSuffix

* Add error checks

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Disable lint typecheck

* Fix ineffectual error assignment (#1976)

Was working on another PR and noticed that golangci-lint was failing
locally on `ineffassign`

Signed-off-by: Devon Mizelle <dev@devon.so>

* Revert "Disable lint typecheck"

This reverts commit 3c76f219d3.

Co-authored-by: Devon Mizelle <dev@devon.so>
2021-08-17 10:39:09 +01:00
Devon Mizelle c2b9ab7470
Fix ineffectual error assignment (#1976)
Was working on another PR and noticed that golangci-lint was failing
locally on `ineffassign`

Signed-off-by: Devon Mizelle <dev@devon.so>
2021-08-16 14:19:35 +01:00