Skip to content

Commit 0040dbd

Browse files
reivilibresandhose
authored andcommitted
HACK disable sanity checks
1 parent 1944844 commit 0040dbd

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

crates/syn2mas/src/migration.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// SPDX-License-Identifier: AGPL-3.0-only
44
// Please see LICENSE in the repository root for full details.
55

6+
#![expect(
7+
clippy::overly_complex_bool_expr,
8+
reason = "This is temporary, to remove a few safe guards"
9+
)]
10+
611
//! # Migration
712
//!
813
//! This module provides the high-level logic for performing the Synapse-to-MAS
@@ -14,6 +19,7 @@
1419
use std::{
1520
collections::{HashMap, HashSet},
1621
pin::pin,
22+
time::Instant,
1723
};
1824

1925
use chrono::{DateTime, Utc};
@@ -329,7 +335,8 @@ async fn migrate_threepids(
329335
.into_extract_localpart(synapse_user_id.clone())?
330336
.to_owned();
331337
let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
332-
if is_likely_appservice(&username) {
338+
if true || is_likely_appservice(&username) {
339+
// HACK can we do anything better
333340
continue;
334341
}
335342
return Err(Error::MissingUserFromDependentTable {
@@ -416,7 +423,8 @@ async fn migrate_external_ids(
416423
.into_extract_localpart(synapse_user_id.clone())?
417424
.to_owned();
418425
let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
419-
if is_likely_appservice(&username) {
426+
if true || is_likely_appservice(&username) {
427+
// HACK can we do anything better
420428
continue;
421429
}
422430
return Err(Error::MissingUserFromDependentTable {
@@ -505,7 +513,8 @@ async fn migrate_devices(
505513
.into_extract_localpart(synapse_user_id.clone())?
506514
.to_owned();
507515
let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
508-
if is_likely_appservice(&username) {
516+
if true || is_likely_appservice(&username) {
517+
// HACK can we do anything better
509518
continue;
510519
}
511520
return Err(Error::MissingUserFromDependentTable {
@@ -606,7 +615,8 @@ async fn migrate_unrefreshable_access_tokens(
606615
.into_extract_localpart(synapse_user_id.clone())?
607616
.to_owned();
608617
let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
609-
if is_likely_appservice(&username) {
618+
if true || is_likely_appservice(&username) {
619+
// HACK can we do anything better
610620
continue;
611621
}
612622
return Err(Error::MissingUserFromDependentTable {
@@ -725,7 +735,8 @@ async fn migrate_refreshable_token_pairs(
725735
.into_extract_localpart(synapse_user_id.clone())?
726736
.to_owned();
727737
let Some(user_id) = user_localparts_to_uuid.get(username.as_str()).copied() else {
728-
if is_likely_appservice(&username) {
738+
if true || is_likely_appservice(&username) {
739+
// HACK can we do anything better
729740
continue;
730741
}
731742
return Err(Error::MissingUserFromDependentTable {

0 commit comments

Comments
 (0)