Skip to content

Conversation

@sandhose
Copy link
Member

@sandhose sandhose commented Feb 27, 2025

Can be reviewed commit by commit

First commit is to handle localparts that have colons in them (for some reason), e.g. @foo:bar:matrix.org

Second commit is to not warn when importing '-' as IP address, because Synapse will use this value sometimes

Thirds is to ignore devices with the guest_devices as device ID, as we don't care about importing those

@sandhose sandhose added A-Migration Related to the migration tooling T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. labels Feb 27, 2025
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 27, 2025

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: b6bb596
Status: ✅  Deploy successful!
Preview URL: https://798348a4.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://quenting-syn2mas-ignore-thin.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose requested a review from reivilibre February 27, 2025 13:10
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy otherwise

};

let Some((localpart, server_name)) = without_sigil.split_once(':') else {
let Some((localpart, server_name)) = without_sigil.rsplit_once(':') else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is different from Synapse's splitting logic (see below refs) and moreover would break on @user:localhost:4242...

If we have truly broken user IDs in the m.org DB then .... maybe it'd be best to find a way to exorcise the database of those :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I reverted this for now; the problematic user on matrix.org is an AS one, and has no 3pid or device, so I'll do a proper fix to ignore this user once the PR to read AS users lands

@sandhose sandhose requested a review from reivilibre March 3, 2025 16:35
@sandhose sandhose changed the title Ignore guest devices, empty IPs and colons in localparts when migrating from Synapse Ignore guest devices and empty IPs when migrating from Synapse Mar 4, 2025
@sandhose sandhose merged commit dd928c4 into main Mar 4, 2025
21 checks passed
@sandhose sandhose deleted the quenting/syn2mas/ignore-things branch March 4, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Migration Related to the migration tooling T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants