zulip/zerver/data_import
Florian Pritz a276603766 rocketchat: Deduplicate and ignore huddle rooms with same users.
If there are more than 1 room with the same set of users, the import
will fail due to a unique constraint on the huddle_hash. Figuring out
why and which room is causing this database error is kinda difficult.

We deduplicate those cases here and simply merge the rooms together.
Note however, that the deduplication does not work as expected so we
simply ignore them all together for now and only raise an exception
along some logging output. At least this way, it is pretty clear what is
wrong and you do not have to wait to get a database error during the
actual import.

We also ignore empty huddle rooms since those are the duplicates that
caused problems for me and if they are empty, ignoring them is easier
than trying to get the merge to work.

Not sure where those channels come from since we discovered this with
production data.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2022-09-09 16:57:24 -07:00
..
__init__.py
gitter.py gitter: Make imported Realm start with only GitHub auth enabled. 2022-08-29 11:10:18 -07:00
import_util.py import: Fix timestamp check in long_term_idle_helper. 2022-08-29 15:18:00 -07:00
mattermost.py mattermost: Run html2text as a subprocess. 2022-06-26 17:32:59 -07:00
rocketchat.py rocketchat: Deduplicate and ignore huddle rooms with same users. 2022-09-09 16:57:24 -07:00
sequencer.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
slack.py long_term_idle_helper: Change all_user_ids arg to an Iterator. 2022-08-29 11:03:27 -07:00
slack_message_conversion.py docs: Fix capitalization mistakes. 2021-05-10 09:57:26 -07:00
user_handler.py data_import: Rename mattermost_user to user_handler. 2021-07-15 14:28:36 -07:00