zulip/zerver
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
..
actions message_flags: Fix deadlocks when updating message flags. 2022-09-06 16:06:58 -07:00
data_import rocketchat: Deduplicate and ignore huddle rooms with same users. 2022-09-09 16:57:24 -07:00
integration_fixtures/nagios
lib integrations: Remove "Yo". 2022-09-09 16:31:33 -07:00
management logout_all_users: Add --rotate-api-keys option to the command. 2022-08-15 17:58:05 -07:00
migrations user_settings: Add user setting to control the user list style. 2022-09-09 16:30:54 -07:00
openapi user_settings: Add user setting to control the user list style. 2022-09-09 16:30:54 -07:00
tests rocketchat: Deduplicate and ignore huddle rooms with same users. 2022-09-09 16:57:24 -07:00
tornado user_topic: Add user_topic event. 2022-08-04 17:44:00 -07:00
views user_settings: Add user setting to control the user list style. 2022-09-09 16:30:54 -07:00
webhooks integrations: Add incoming webhook macro to relevant docs. 2022-09-09 16:31:33 -07:00
worker message_flags: Fix deadlocks when updating message flags. 2022-09-06 16:06:58 -07:00
__init__.py
apps.py
context_processors.py templates: Rename `OPEN_GRAPH` variables to `PAGE` or `PAGE_METADATA`. 2022-09-06 14:57:06 -07:00
decorator.py decorator: Rename profile to user_profile. 2022-08-17 12:05:38 -07:00
filters.py
forms.py i18n: Deal with lazy strings more carefully. 2022-08-29 10:52:45 -07:00
logging_handlers.py python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
middleware.py middleware: Log 5xx json_errors in JsonErrorHandler. 2022-08-31 14:43:15 -07:00
models.py user_settings: Add user setting to control the user list style. 2022-09-09 16:30:54 -07:00
signals.py requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00