Commit Graph

78 Commits

Author SHA1 Message Date
Quentin Gliech
028a993dc6 syn2mas: implement WriteBatch for MasNewUnsupportedThreepid 2025-04-22 14:30:51 +02:00
Quentin Gliech
2450e2e480 syn2mas: implement WriteBatch for MasNewEmailThreepid 2025-04-22 14:25:13 +02:00
Quentin Gliech
4c081152a9 syn2mas: implement WriteBatch for MasNewUserPassword 2025-04-22 14:17:37 +02:00
Quentin Gliech
8488476368 syn2mas: implement WriteBatch for MasNewUser 2025-04-22 14:14:44 +02:00
Quentin Gliech
b3538219e6 syn2mas: introduce a WriteBatch trait to refactor how we write to MAS 2025-04-22 14:14:20 +02:00
Quentin Gliech
b21748c2bd syn2mas: add a buffered channel for writing refreshable tokens 2025-04-22 13:49:22 +02:00
Quentin Gliech
c292da7ac9 syn2mas: add a buffered channel for writing external IDs 2025-04-22 13:44:52 +02:00
Quentin Gliech
ef81b3ce4f syn2mas: add a buffered channel for writing threepids 2025-04-22 13:40:14 +02:00
Quentin Gliech
1fcf650322 Option to generate a MAS config from an existing Synapse config
This is a best-effort conversion, which will warn about unsupported options.
2025-04-18 18:27:15 +02:00
Quentin Gliech
b4a1e5f691 syn2mas: replace #[allow] annotations with #[expect]
Also removes unused #[allow] annotations.
2025-04-18 11:34:27 +02:00
Quentin Gliech
35cd982e6f syn2mas: refactor the metrics logic in the progress module
We don't need to carry around the various meters. Just make them global.
2025-04-18 11:32:26 +02:00
Quentin Gliech
a86696e0a8 Fix Clippy lints introduced by Rust 1.86 2025-04-06 16:18:27 +02:00
Quentin Gliech
130cc5e834 syn2mas: Track skipped entities in the syn2mas progress (#4225) 2025-03-28 14:58:58 +01:00
Olivier 'reivilibre
887584d78f syn2mas: remove obsolete TODOs
all of these are either solved through implementation or through lack of
necessity.
2025-03-18 16:57:03 +00:00
Olivier 'reivilibre
390571f8e0 syn2mas: fix handling of missing Synapse password_config config
Closes #3929
2025-03-18 15:58:05 +00:00
Olivier 'reivilibre
a55b349a80 syn2mas: fix handling of Synapse user_consent config
Closes #3928
2025-03-18 15:57:40 +00:00
Olivier 'reivilibre
0553cbf249 syn2mas: use ChaCha20 for all operations 2025-03-17 17:14:53 +00:00
dependabot[bot]
24534c7df5 build(deps): bump uuid from 1.15.1 to 1.16.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 12:55:37 +00:00
Quentin Gliech
d7bd50f12b Track skipped entities in the syn2mas progress 2025-03-14 13:29:19 +00:00
Olivier 'reivilibre
35ef586447 fixup! syn2mas: Add progress reporting to log and to opentelemetry metrics
Add metrics directly within syn2mas, no background thread
2025-03-13 14:50:32 +00:00
Olivier 'reivilibre
3a29eef432 syn2mas: Add progress reporting to log and to opentelemetry metrics 2025-03-12 18:49:36 +00:00
Olivier 'reivilibre
b670d1dc19 Add dependency on arc-swap to syn2mas, moving it to a workspace dependency 2025-03-12 14:55:03 +00:00
Olivier 'reivilibre
75ca08b7f9 Remove TODO on MIGRATOR 2025-03-12 14:38:32 +00:00
Olivier 'reivilibre
163b1e8d79 syn2mas: improve performance of reading access tokens / refresh tokens 2025-03-12 14:38:32 +00:00
Quentin Gliech
51e1c11df9 Order the OAuth providers in the UI by their order in the config file (#4199) 2025-03-12 12:12:39 +01:00
reivilibre
8553efdab4 syn2mas: better performance, output tweaks, tracing tweaks, access token fixes (#4175) 2025-03-12 10:56:56 +00:00
Quentin Gliech
c4f7cad172 Update test snapshots 2025-03-12 11:47:07 +01:00
Quentin Gliech
bf496e8d81 syn2mas: import the deactivation and locked status independently 2025-03-11 17:35:13 +01:00
Quentin Gliech
d2f3b56cd0 Better report errors when a writing task fails 2025-03-10 13:53:36 +00:00
Quentin Gliech
8ee4e68d6d Read and write users in different tasks 2025-03-10 13:53:36 +00:00
Quentin Gliech
c45500be72 Use rustc' FxHasher instead of the std one 2025-03-10 13:36:12 +00:00
Quentin Gliech
0b9036601a Better tracing during the migration 2025-03-10 13:36:12 +00:00
Quentin Gliech
32071e1833 Make sure tracing spans are propagated in tokio::task::spawn 2025-03-10 13:36:11 +00:00
Olivier 'reivilibre
07dd9cd9ec Log timings of migrations and index/constraint rebuilds 2025-03-10 13:25:59 +00:00
Olivier 'reivilibre
8c1a8dd8a1 Add spans for the constraint/index drop operations 2025-03-10 13:23:59 +00:00
Olivier 'reivilibre
6fdfb263b5 Don't include access tokens where the referenced device has vanished 2025-03-10 13:23:59 +00:00
Olivier 'reivilibre
eff33289a5 Don't read refresh tokens that don't have associated access tokens
These appear to be accidental and should not be migrated.
2025-03-10 13:23:59 +00:00
Olivier 'reivilibre
4f4fe822d9 For performance, switch to a row count estimate for users and devices 2025-03-10 13:23:59 +00:00
Olivier 'reivilibre
b0c958007f Replace panic on unfinished buffers with an error
This doesn't get clobbered by the progress bar
2025-03-10 13:23:55 +00:00
Olivier 'reivilibre
bfcd0f8209 Downgrade presence of guests and unsupported 3pids to warnings
Since migration is supported, but the data won't be used
2025-03-10 13:20:46 +00:00
Olivier 'reivilibre
155b4f31d2 Remove obsolete OIDC provider warning
We now produce an error for unmapped OIDC providers!
2025-03-10 13:20:46 +00:00
dependabot[bot]
895678f968 build(deps): bump uuid from 1.14.0 to 1.15.1
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.14.0 to 1.15.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.14.0...v1.15.1)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 14:05:02 +00:00
Quentin Gliech
6e65db5aca Handle AS users with invalid localparts edge case 2025-03-04 12:38:51 +01:00
Quentin Gliech
9dc1b39fa1 Properly ignore devices, threepids and access tokens from AS users (#4122) 2025-03-04 12:38:14 +01:00
Quentin Gliech
004119dbce Pass the MasWriter as owned to the various migration functions (#4120) 2025-03-04 12:37:23 +01:00
Quentin Gliech
fa38879558 syn2mas: use NonNilUuid for MAS user IDs 2025-03-04 11:55:59 +01:00
Quentin Gliech
435911bb85 Revert "Ignore colons in localparts when importing users"
This reverts commit bd0b04ae4d.
2025-03-03 13:52:25 +01:00
Quentin Gliech
8e7322f0e8 Actualy read appservice users, but don't insert them 2025-02-27 14:11:42 +01:00
Quentin Gliech
500f3530e3 Ignore 'guest_devices' in synapse 2025-02-27 14:07:23 +01:00
Quentin Gliech
2d90e25077 Ignore '-' as ip on devices 2025-02-27 14:07:23 +01:00