Ignore Matrix DM's when importing rooms
Ignore Matrix DM's when importing rooms
See #2609 (comment 1239312376)
This way we have less failedRoomIds
printed out at the end so we can better
scrutinize the list with less noise.
We were already ignoring Matrix DM's in the gitterToMatrixHistoricalImport(...)
function itself but the error occurs earlier in the worker script when we tried to grab into about the room for the meta dashboard info.
Error occurred while backfilling events for opts.uri=matrix/5f762e89986e461e663059c2/@erictroupetester:my.matrix.host gitterRoomId=6094c6240bd9fc3c663c829b: AssertionError [ERR_ASSERTION]: DM rooms with Matrix users can only be created with createMatrixDmRoomByGitterUserAndOtherPersonMxid. gitterRoomId=6094c6240bd9fc3c663c829b gitterLcUri=matrix/5f762e89986e461e663059c2/@erictroupetester:my.matrix.host
at MatrixUtils.createMatrixRoomByGitterRoomId (C:\Users\MLM\Documents\GitLab\webapp\modules\matrix-bridge\lib\matrix-utils.js:82:12)
at async MatrixUtils.getOrCreateHistoricalMatrixRoomByGitterRoomId (C:\Users\MLM\Documents\GitLab\webapp\modules\matrix-bridge\lib\matrix-utils.js:716:26)
at async exec (C:\Users\MLM\Documents\GitLab\webapp\scripts\utils\gitter-to-matrix-historical-import-one-room.js:42:32)
The reason I didn't notice this locally is because I usually test with the following command which includes --uri-deny-pattern "...(matrix/)..."
to ignore all of the Matrix DM room looking rooms created by tests that don't comply with the canonical matrixDmGroup
of the instance that we can normally key off of.
set DEBUG=gitter:scripts:*,gitter:app:matrix-bridge:gitter-to-matrix-historical-import,gitter:scripts-debug:events-imported&&set matrix__bridge__applicationServicePort=9001&&node ./scripts/utils/gitter-to-matrix-historical-import-worker.js --concurrency 3 --uri-deny-pattern "^((_test_)|(_group)|(matrix/)|(gitter-integration-tests(-organisation)?/)|(_Repo-Group/)|(MadLittleMods/import-test1))"
Follow-up to !2313 (merged)
Part of #2609 (closed)