Commit Graph

42807 Commits

Author SHA1 Message Date
Alex Vandiver 670c7e7ba4 settings: Remove now-unnecessary EMAIL_DELIVERER_DISABLED setting. 2021-05-18 12:39:28 -07:00
Alex Vandiver 1e67e0f218 deliver_scheduled_*: SELECT FOR UPDATE the relevant rows.
`deliver_scheduled_emails` and `deliver_scheduled_messages` use their
respective tables like a queue, but do not have guarantees that there
was only one consumer (besides the EMAIL_DELIVERER_DISABLED setting),
and could send duplicate messages if multiple consumers raced in
reading rows.

Use database locking to ensure that the database only feeds a given
ScheduledMessage or ScheduledEmail row to a single consumer.  A second
consumer, if it exists, will block until the first consumer commits
the transaction.
2021-05-18 12:39:28 -07:00
Alex Vandiver 82797dd53c settings: Standardize the name of the deliver_scheduled_messages logs.
This makes it match its command name, and other logfile name.
2021-05-18 12:39:28 -07:00
Alex Vandiver 343a1396af puppet: Rename logfile for deliver_scheduled_messages to be consistent. 2021-05-18 12:39:28 -07:00
Alex Vandiver ef6d0ec5ca puppet: Only run deliver_scheduled_messages and _emails on one server.
`deliver_scheduled_emails` and `deliver_scheduled_messages` use the
`ScheduledEmail` and `ScheduledMessage` tables as a queue,
effectively, pulling values off of them.  As noted in their comments,
this is not safe to run on multiple hosts at once.  As such, split out
the supervisor files for them.
2021-05-18 12:39:28 -07:00
Anders Kaseorg 79c087471c jinja2: Serialize page-params with orjson.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-18 12:36:15 -07:00
Steve Howell 45fb7165b1 node tests: Test list cursor more directly.
This tests the basic mechanics of list_cursor
more directly than the activity node tests.

It also sets the stage to eliminate some
tests from activity.js while maintaining
100% coverage on list_cursor.
2021-05-18 14:16:55 -04:00
Steve Howell dbd60d18fe minor: Tweak list_cursor tests.
We just make the config a bit more explicit in
each test, and we use override to ensure that
stub functions aren't cruft.
2021-05-18 14:16:55 -04:00
Steve Howell cd1510c0ef node tests: Extract user_search tests.
This is mostly moving tests from activity.js
into user_search.js, but it's not a verbatim
code move.

The new module continues to make sure that
the boundary between activity and user_search
is correct, as most of the testing uses
the configuration of UserSearch from
static/js/activity.js.

It does not use a real buddy_list, though,
which simplifies some tests.

I cleaned up some tests by making sure we
were testing both sides of conditions more
rigorously.

After this change we no longer need the
bloated activity.js tests to maintain full
coverage on static/js/user_search.js.
2021-05-18 14:16:55 -04:00
Steve Howell ee066a1a91 node tests: Use per-test overrides for activity tests. 2021-05-18 14:16:55 -04:00
Alex Vandiver 033a96aa5d puppet: Fix check_ssl_certificate check to check named host, not self. 2021-05-17 18:38:30 -07:00
Alex Vandiver a2b7a5ef4b puppet: Clarify 20m keepalive time from the LB is a max; it can be less. 2021-05-17 14:56:51 -07:00
Steve Howell eee8ff40b4 node tests: Fix false positive for muted user.
The test was passing here because we didn't add
selma. We want to make sure it's due to the actual
muting.
2021-05-16 11:48:50 -04:00
Steve Howell 9825be339b node tests: Test buddy_data.get_items_for_users. 2021-05-16 11:48:50 -04:00
Steve Howell 4a20c968d0 node tests: Test level/description for buddy_data. 2021-05-16 11:48:50 -04:00
Tim Abbott 39519fc5c6 help: Use a tip to highlight giphy self-hosting situation. 2021-05-14 16:11:03 -07:00
Tim Abbott 16d39db043 help: Better highlight email gateway configuration is required. 2021-05-14 16:11:03 -07:00
Tim Abbott 0fe785183f help: Document anti-tracking features of images. 2021-05-14 16:11:03 -07:00
Tim Abbott b28389c5e4 help: Document GIPHY privacy story. 2021-05-14 16:11:03 -07:00
Vishnu KS e019045abe actions: Create send_message_to_signup_notification_stream. 2021-05-14 15:10:02 -07:00
Vishnu KS 13cf34f283 billing: Add test for billing page when the plan is scheduled for downgrade. 2021-05-14 15:10:02 -07:00
Vishnu KS 27a2317e65 billing: Add node template test for plan change form. 2021-05-14 15:10:02 -07:00
Vishnu KS 323ad83d98 billing: Allow updating licenses of plans on manual license management. 2021-05-14 15:10:02 -07:00
Vishnu KS 51ef5d62ad billing: Add ignored_inputs paramater to create_ajax_request. 2021-05-14 15:10:02 -07:00
Vishnu KS 20d2e00cf9 billing: Create update_license_ledger_for_manual_plan. 2021-05-14 15:10:02 -07:00
Vishnu KS 611866e3d6 billing: Create CustomerPlan.licenses_at_next_renewal function. 2021-05-14 15:10:02 -07:00
Vishnu KS 922cfac689 billing: Create CustomerPlan.licenses function. 2021-05-14 15:10:02 -07:00
Vishnu KS 878dcd95d0 billing: Call make_end_of_cycle_updates_if_needed before plan is updated. 2021-05-14 15:10:02 -07:00
Vishnu KS 45f7a25351 billing: Rename licenses_used variable to seat_count. 2021-05-14 15:10:02 -07:00
Vishnu KS c9f4439850 billing: Extract out validate_licenses function. 2021-05-14 15:10:02 -07:00
Vishnu KS d9baa681b2 billing: Use PATCH request for changing plan status.
I think it's much more cleaner to use PATCH request on
/json/billing/plan than using a POST request on
/json/billing/plan/change to update the plan.
2021-05-14 15:10:02 -07:00
Tim Abbott 3af0485d84 ci: Unpack installation tarball under /root/.
This ensures that we exercise the fact that the Zulip installer may be
unpacked to a directory that may not be world-readable.

bc45525369 fixed a recent regression in
this behavior that would have been caught by this commit.
2021-05-14 14:31:00 -07:00
Anders Kaseorg e015f3ed7d docs: Correct “webapp” to “web app”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-14 13:15:38 -07:00
Anders Kaseorg e3c570401e docs: Document password hashing change from PBKDF2 to Argon2.
This changed in commit 483a351d44
(#3410).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-14 13:07:51 -07:00
aryanshridhar 056e7d1a36 dropdown_list_widget: Add 'type' attribute to reset button.
Previously, when a user hits 'Enter' key within a input
field it incorrectly triggers the dropdown_list_widget's
reset button.

This is because the reset button had the default type attribute of
'submit' which triggers the click event binded to it. Fixed it by
explicitly defining it's type attribute to be a button.
2021-05-14 13:06:59 -07:00
Abhijeet Prasad Bodas 9a64f741ec help: Clarify what muting means for the muted user.
We don't want to claim something so strong as the first of this text,
because the mutee can still guess that they have been muted if the
muter suddenly starts completely ignoring messages, especially PMs.

But this framing is better in retaining the perspective as you.
2021-05-14 11:14:48 -07:00
Tim Abbott 73123300e3 models: Improve documentation for UserMessage. 2021-05-14 10:48:00 -07:00
Tim Abbott ed04966f79 version: Update version and changelog following 4.2 release. 2021-05-13 22:09:48 -07:00
Anders Kaseorg 09f6ba1971 install: Run git config commands from a known readable cwd.
Fixes this error when running the installer from a directory that
isn’t world-readable:

+ su zulip -c 'git config --global user.email anders@zulip.com'
fatal: cannot come back to cwd: Permission denied

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 22:00:29 -07:00
Anders Kaseorg bc45525369 postgresql-init-db: Fix installation from world-unreadable directory.
This reverts part of commit 476524c0c1
(#18215), to fix this error when running the installer from a
directory that isn’t world-readable:

+ '[' -e /var/run/supervisor.sock ']'
+++ dirname /root/zulip-server-4.1/scripts/setup/postgresql-init-db
++ dirname /root/zulip-server-4.1/scripts/setup
+ su zulip -c /root/zulip-server-4.1/scripts/stop-server
bash: /root/zulip-server-4.1/scripts/stop-server: Permission denied

Zulip installation failed (exit code 126)!

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 22:00:29 -07:00
Anders Kaseorg 6766a3f780 purge-old-deployments: Check /srv/zulip.git existence before pruning it.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 20:36:27 -07:00
Tim Abbott 6d4e7aa307 version: Update version and changelog following 4.1 release. 2021-05-13 18:58:11 -07:00
Tim Abbott de47feab43 scripts: Fix check for services running when upgrading.
When upgrading from a pre-4.0 release, scripts/stop-server logic would
check whether supervisord configuration files were present to
determine what it needed to restart, but only considered paths to
those files that are introduced in Zulip 4.0.

Fixed #18493.
2021-05-13 18:57:19 -07:00
Tim Abbott c6de9736b8 version: Link blog post from 4.0 release. 2021-05-13 17:53:44 -07:00
Aman Agrawal 987acd93f4 message_edit_form: Fix vertical alignment of bottom elements. 2021-05-13 17:11:29 -07:00
Anders Kaseorg e0c5994f5c changelog: Fix version number typo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 15:48:52 -07:00
Tim Abbott bf4f6544e7 version: Update version following 4.0 release. 2021-05-13 15:48:15 -07:00
Tim Abbott 825192a051 Release Zulip Server 4.0. 2021-05-13 15:37:37 -07:00
Tim Abbott 2ee6e1318d i18n: Update translation data from Transifex. 2021-05-13 15:37:37 -07:00
Anders Kaseorg 3275b781b8 about-zulip: Clean up about dialog.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 15:29:56 -07:00