149bea8309 added a separate config file
for smokescreen (which is necessary because it can be installed
separately) but failed ot notice that `zulip.template.erb` already had
a config line for it. This leads to failures starting the logrotate
service:
```
logrotate[4158688]: error: zulip:1 duplicate log entry for /var/log/zulip/smokescreen.log
logrotate[4158688]: error: found error in file zulip, skipping
```
Remove the duplicate line.
(cherry picked from commit 725affcb5a)
This commit fixes "Automatically follow topics where I'm mentioned"
setting label click functionality so that the setting is toggled
on clicking the label .
(cherry picked from commit 1c286a6835)
We now allow system bots to mention a group if can_mention_group
setting is set to "role:everyone" group and not when it is set
to some other group.
(cherry picked from commit 76b2e6de0b)
We previously created the connection to the outgoing email server when
the EmailSendingWorker was first created. Since creating the
connection can fail (e.g. because of firewalls or typos in the
hostname), this can cause the `QueueProcessingWorker` creation to
raise an exception. In multi-threaded mode, exceptions in the worker
threads which are _not_ during the handling of a specific event
percolate out to `log_and_exit_if_exception` and trigger the
termination of the entire process -- stopping all worker threads from
making forward progress.
Contain the blast radius of misconfigured email servers by deferring
the opening of the connection until it is first needed. This will not
cause any overall performance change, since it only affects the
latency of the very first email after startup.
(cherry picked from commit c618c42729)
Creating the QueueProcessingWorker objects when the ThreadedWorker is
created can lead to a race which caused confusing error messages:
1. A thread tries to call `self.worker = get_worker()`
2. This call raises an exception, which is caught by
`log_and_exit_if_exception`
3. `log_and_exit_if_exception` sends our process a SIGUSR1, _but
otherwise swallows the error_.
4. The thread's `.run()` is called, which tries to access
`self.worker`, which was never set, and throws another exception.
5. The process handles the SIGUSR1, restarting.
Move the creation of the worker to when it is started, so the worker
object does not need to be stored, and possibly have a decoupled
failure.
(cherry picked from commit 8dfa6fa735)
boto3 has two different modalities of making API calls -- through
resources, and through clients. Resources are a higher-level
abstraction, and thus more generally useful, but some APIs are only
accessible through clients. It is possible to get to a client object
from a resource, but not vice versa.
Use `get_bucket(...).meta.client` when we need direct access to the
client object for more complex API calls; this lets all of the
configuration for how to access S3 to sit within `get_bucket`. Client
objects are not bound to only one bucket, but we get to them based on
the bucket we will be interacting with, for clarity.
We removed the cached session object, as it serves no real purpose.
(cherry picked from commit 617c35398a)
e883ab057f started caching the boto client, which we had identified
as slow call. e883ab057f went further, calling
`get_boto_client().generate_presigned_url()` once and caching that
result.
This makes the inner cache on the client useless. Remove it.
(cherry picked from commit f8c432bd53)
This causes us to cover all of our supported operating systems, and
Ubuntu 22.04 support was originally added in Zulip Server 6.0.
(cherry picked from commit 545e1f9487)
As the help center article now has detailed instructions to generate
an incoming webhook URL, the integration documentation only needs to
link to that information.
(cherry picked from commit 67e77ad370)
We previously allowed adding pills for inaccessible user by typing
the email manually. This commit updates it to handle inaccessible
users like we handle invalid emails.
(cherry picked from commit 9197a2c3e2)
Earlier, 'topic' parameter length for
'/users/me/subscriptions/muted_topics' and '/user_topics' endpoints
were not validated before DB operations which resulted in exception:
'DataError: value too long for type character varying(60)'.
This commit adds validation for the topic name length to be
capped at 'max_topic_length' characters.
The doc is updated to suggest clients that the topic name should
have a maximum length of 'max_topic_length'.
Fixes#27796.
(cherry picked from commit c4330be2b1)
That specific piece of the instructions makes it sound like /auth/ is
surely supposed to be there in the URL. But newer versions of Keycloak
don't have it - so mention that explicitly, not to create a wrong
expectation.
(cherry picked from commit 75212e7ded)
Now we clear the stream id from the compose state on opening the stream
selection dropdown when no stream is specified.
This fixes the bug where the compose box placeholder text would refer to
the previously selected stream, even when the open stream dropdown had
no stream selected.
(cherry picked from commit 48d0d49fde)
We now do not remove the user group row immediately from "Your groups"
panel when user is removed from the group, if the user can join that
group again by themselves. This makes the behavior similar to what
we have for streams.
(cherry picked from commit 377df9e4db)
This commit fixes the bug about not showing the tooltip about push
notifications not being enabled on the server on checkbox in stream
specific notification row.
(cherry picked from commit 415fb2014b)
We previously showed tooltips about push notifictions not being
enabled on server on the checkboxes in "Notification triggers"
section incorrectly when server had push notifications enabled.
This bug was present as realm_push_notifications_enabled was
not passed to the template correctly. This commit fixes it by
instead using "is_disabled" in the "if" condition as we only
expect it to be true when push notifications are not enabled
on server.
(cherry picked from commit 99f29983a1)