If we don't revoke sessions, this can lead to issues when we import a
realm (e.g. from Slack) into the original subdomain for the same
organization. Because then, users who already had sessions before the
move end up stuck:
- when they try to open Zulip on the original subdomain, which now has
the imported instance, they get redirected to the moved subdomain due to
their pre-existing session cookie.
- they can't even log out to get rid of the bugged cookie, because the
account they're logged into in that session is now on the moved
subdomain.
Otherwise, these tests fail if ZULIP_VERSION is different locally from
what's hard-coded. Use a placeholder instead and replace dynamically in
a helper function.
(node:13734) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit updates all third-party importer tools (Slack, Mattermost,
and Rocket Chat) in the `zerver/data_import` directory to also output a
migration_status.json file in their output tarball.
This is required because all importable tarball will be checked for
migration compatibility during import.
Fixes#28443.
When transferring a realm to a server that has a different set of
applied migrations (different Zulip versions), there is a chance that
the imported data formats appear to be compatible but data invariants
could still be violated.
This commit adds an assertion during the import process to verify
that both the exported realm and the importing server have matching
Zulip versions and have a compatible set of migrations.
This commit updates the export process to write the migration status of
the realm as a JSON file to be included in the export tarball.
This is a preparatory step for adding an assertion to ensure that the
importing and exporting realms have a compatible set of applied
migrations.
Newrelic has introduced a new update. This commit
updates the exisiting integration by adding support
for new types of payloads and cleaning up legacy
codes and fixtures.
Fixes#29729.
Co-authored-by: Pieter CK <pieterceka123@gmail.com>
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
For resizing the icon.png files, we use resize_avatar, not resize_logo.
This is pretty confusing - sure, for icons we use the same function as
for avatars, but we should have a proper name for the function called in
the icon context. So this commit also adds resize_realm_icon, and
changes the calls to resize_avatar in icon contexts to
resize_realm_icon.
In 245357c868 we added a redirect
after stream creation, to go to the stream feed. This means
the stream settings modal was closed partway through the tests.
This caused a flake where when the modal was reopened it was
not always open by the time we fetched the stream name.
The main fix in this commit is changing the classname for
the stream in the modal to be more specific (`stream-name`
can also be found in the left sidebar in many places) and
waiting for it to be visible again before getting text from
it.
More discussion here:
https://chat.zulip.org/#narrow/channel/43-automated-testing/topic/stream.20create.20puppeteer.20failure/near/1976724
Co-authored-by: Anders Kaseorg <anders@zulip.com>
Fixes#31823
When home view changes, CSS just puts the selected home view
at the top of the left_sidebar navigation list (expanded)
or to the left (collapsed), but the rendered <li> elements
stay in the same order in DOM, so regarldess of current home view,
keyboard navigation always follows the order in which the <li>
elements appear in DOM.
Changes:
- Reorder <li> navigation elements in DOM based on current home view.
- Remove tabindex=0 from <a> elements, because they are now ordered
correctly in DOM.
- Add (tabindex="0" role="button") to the <i> collapsable VIEWS, to be
keyboard accessibile.
This commit refactors `render_attachment` and `render_block`
out of slack_incoming.py to promote reusability.
The primary motivation for this refactor is to add support for
converting integration bots messages in Slack exports, which could use
the same functions.
Part of #31311.
I saw some profiling traces where it appears multiple copies of this
click handler got processed when clicking on a topic in the left
sidebar.
I suspect that was a profiling artifact, but the intent is for
on_topic_click to fully process clicks on topics in the sidebar, and
we should write the code to say that.
This commit adds more space between rows, increases the line height
so that the status message doesn't touch the status emoji, and makes
the status circle a little bigger.
Previously, the GoCD integration relied on GoCD's integration with bug
tracking and monitoring tools through the users' Config XML file [1].
However, this feature no longer works as expected, as it cannot send
HTTPS payloads to an external endpoint.
This commit updates our GoCD integration to use Sentry's WebHook
notifier GoCD plugin [2] to send webhook payloads from users GoCD server
to Zulip. We are using an older version of the plugin—v0.0.6—because the
newer version—v0.0.9—doesn't work at this time.
Additionally, this change reformats the notifications to include more
details on the GoCD event, such as lists of passed and failed jobs.
Fixes#21224.
Co-authored-by: Pieter CK <pieterceka123@gmail.com>
[1]:
https://docs.gocd.org/current/integration/#integration-with-bug-tracking-and-story-management-tools
[2]:
https://github.com/getsentry/gocd-webhook-notification-plugin/releases/tag/v0.0.6
This makes it easier for us to change the default values for these
settings, and also just helps keep settings files clear of values that
the relevant organization didn't choose themselves.
There's about a dozen more settings that could receive similar
treatment; I just went with the easiest ones.
c39ae45d95 was incorrect, and should
only have been applied to the circles in the buddy list avatars.
In other places in the app, the transparency was over other colors
of background.
'process_downgrade' is used inside an outer db transaction
created in 'remote_server_post_analytics'.
`transaction.atomic()` block in 'process_downgrade' resulted in
savepoint creation.
This commit adds `savepoint=False` to avoid that.
'do_deactivate_user' is used inside an outer db transaction
created in 'sync_user_from_ldap'.
`transaction.atomic()` block in 'do_deactivate_user' resulted
in savepoint creation.
This commit adds `savepoint=False` to avoid that.
'bulk_remove_subscriptions' is used inside an outer db transaction
created in 'do_change_bot_owner'.
`transaction.atomic()` block in 'bulk_remove_subscriptions'
resulted in savepoint creation.
This commit adds `savepoint=False` to avoid that.
'do_activate_mirror_dummy_user' is used inside an outer db
transaction created in 'registration_helper'.
`transaction.atomic()` block in 'do_activate_mirror_dummy_user'
resulted in savepoint creation.
This commit adds `savepoint=False` to avoid that.
'get_or_create_direct_message_group' is used inside an outer
db transaction created in 'edit_scheduled_message'.
`transaction.atomic()` block in 'get_or_create_direct_message_group'
resulted in savepoint creation.
This commit adds `savepoint=False` to avoid that.
'compose_views' is used inside an outer db transaction created in
'update_user_group_backend'.
`transaction.atomic()` block in 'compose_views' resulted in
savepoint creation.
This commit adds `savepoint=False` to avoid that.