Alex Vandiver
b3eb6680ef
create-database: Treat "zulip" db without "zerver_messages" as empty.
...
A user who somehow got an empty `zulip` database, but without a
`zerver_messages` table in it, would get stuck in the installer at:
```
++ su postgres -c 'cd / && psql -v ON_ERROR_STOP=1 -Atc '\''SELECT COUNT(*) FROM zulip.zerver_message;'\'' zulip'
ERROR: relation "zulip.zerver_message" does not exist
LINE 1: SELECT COUNT(*) FROM zulip.zerver_message;
^
+ records=
```
Treat a failure to select from `zerver_messages` as having 0 messages,
and continue with the `DROP DATABASE IF EXISTS` / `CREATE DATABASE`
that `create-db.sql` usually does.
Fixes : #29110 .
(cherry picked from commit ed70b62ea8
)
2024-03-19 13:47:16 -04:00
Sayam Samal
3034ad2931
compose: Fix topics required banner closing on enter to send.
...
We were updating the compose banners on every `keyup` event on the
topic input. Since, `keyup` also gets triggered for the modifier and
non-printing keys such as "Enter", this lead to banner for topic
required being closed via the `check_posting_policy_for_compose_box`
when pressing "Enter" to send a message with no topic.
This bug was probably introduced in 5c993f0
, which moved additional
logic into `update_on_recipient_change`.
To solve this issue, we use the `input` event instead of the `keyup`
event to update the compose banners only when the value inside the
input element changes.
This change also prevents the the compose banner from being closed
when we only press modifier keys - such as Shift.
(cherry picked from commit 44f313633f
)
2024-03-19 13:47:16 -04:00
Alex Vandiver
1aabbf1d8c
wal-g: Add support for incremental backups.
...
This only defaults to on for local-disk backups, since they are more
disk-size-sensitive, and local accesses are quite cheap compared to
loading multiple incremental backups from S3.
(cherry picked from commit 323e1e92b7
)
2024-03-19 10:41:20 -07:00
Alex Vandiver
ba061d448f
puppet: Remove backups cron job if they are no longer enabled.
...
(cherry picked from commit e200f4d233
)
2024-03-19 10:41:20 -07:00
Alex Vandiver
1b9be7c30c
wal-g: Provide a to-local-disk backup option.
...
(cherry picked from commit b86d92e053
)
2024-03-19 10:41:20 -07:00
Alex Vandiver
c9ca4bfe52
docs: Mention concurrency and storage class S3 backup settings.
...
(cherry picked from commit 612e8de739
)
2024-03-19 10:41:20 -07:00
Alex Vandiver
de979a2f9a
docs: Indent code blocks which are part of bulleted lists.
...
This makes the subsequent bullet resume its numbering correctly.
(cherry picked from commit fe594ab73a
)
2024-03-19 10:41:20 -07:00
Alex Vandiver
fb006d6181
i18n: Update translation data from Transifex.
2024-03-14 18:48:42 +00:00
Anders Kaseorg
1e7b07f80b
requirements: Move pip and zoneinfo forks to zulip organization.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit e00641b0c4
)
2024-03-07 16:42:00 -08:00
Anders Kaseorg
5ebc4a2a4b
requirements: Upgrade Python requirements.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit c85b2edbd4
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
070b051273
install: Support Ubuntu 24.04.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 066ea3ebf9
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
1a2a7a635b
timezone: Only look up canonical time zones from the system.
...
Legacy time zone aliases were removed from the Debian tzdata package
in tzdata 2023c-8.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040997
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 59b0548433
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
b2ee2c20e3
requirements: Patch pip 20 to run on Python 3.12.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 119900120e
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
21e08c50d9
build-pgroonga: Upgrade PGroonga from 3.1.0 to 3.1.8.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 55954c9819
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
aca239a4c5
ruff: Fix RUF022 __all__
is not sorted.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 7b1bb984b3
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
256cdc1278
ruff: Fix E721 Use is
and is not
for type comparisons.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit dbb20d636d
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
d5b4397cff
ruff: Fix E203 Whitespace before ','
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 0e71f52e86
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
9f02686885
ruff: Fix RUF025 Unnecessary dict comprehension for iterable.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 869d9d9a79
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
c9964d1593
ruff: Fix PLR2044 Line with empty comment.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 3b114c516c
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
8ce54599c7
ruff: Fix PERF403 Use a dictionary comprehension instead of a for-loop.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 87992b8b29
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
1eee06e961
ruff: Fix E226 Missing whitespace around arithmetic operator.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 82a9fd927b
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
e546bc5d26
ruff: Fix PLW0108 Lambda may be unnecessary.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit d748ec8d52
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
9eaec853d1
ruff: Fix RUF027 Possible f-string without an f
prefix.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 553f268b04
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
13a037a799
ruff: Fix RUF021 Parenthesize when chaining and
and or
together.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 865febb307
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
9ea290d5ae
python: Reformat with Ruff formatter.
...
https://docs.astral.sh/ruff/formatter/
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 570f3dd447
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
33a7147d37
requirements: Upgrade Python requirements.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit c85b2edbd4
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
7e3c30d62a
provision: Use binary PGroonga release on Debian 12.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit cba4b8141e
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
36837ddd8a
requirements: Upgrade Python requirements.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 1fdc09a88f
)
2024-03-07 15:07:12 -08:00
Charlie Marsh
13bc9a5867
ruff: Upgrade configuration for Ruff v0.2.0.
...
(cherry picked from commit c8e77b6cac
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
230574ebbf
ruff: Fix SIM113 Use enumerate()
for index variable in for
loop.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 53e80c41ea
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
3f9e4bd54b
ruff: Fix SIM910 Use d.get(…)
instead of d.get(…, None)
.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit f165ba0fb3
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
1fa8862e48
ruff: Fix RUF019 Unnecessary key check before dictionary access.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 712917b2c9
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
3bf1934598
openapi: Validate real requests and responses, not fictional mocks.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 029e765e20
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
9f2172c0f9
openapi: Get parameters from requestBody too.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 5cac872e4b
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
899819fb2f
openapi: Use Parameter class for generating curl examples.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit a67d1b57b9
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
33e77b6d15
openapi: Represent OpenAPI parameters with a Parameter class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 131b230e2b
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
fc8e023da2
openapi: Remove confusing check for 200 responses.
...
This error message didn’t make sense for the check as written, and our
OpenAPI document already provides the expected format for our 200
responses.
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 0cee3bee00
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
b5a1a9af25
test_openapi: Provide missing defs_mapping argument.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit bb699f7ee3
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
cf034cf19f
openapi: Loosen anchor parameter specification to string.
...
Real requests would not validate against the previous version. There
seems to be no consistent way to determine whether a string parameter
should be coerced to an integer for validation against an allOf
schema (which works at the level of JSON objects, not strings).
See also https://github.com/python-openapi/openapi-core/issues/698 .
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 0514f92bdb
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
9fd5e9af4a
test_classes: Add Content-Type header to empty DELETE/POST bodies.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 0dd92d2116
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
f03cc51aca
test_classes: Default client_post to application/x-www-form-urlencoded.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit a356ec7011
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
09706f820d
requirements: Upgrade to openapi-core pre-release.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit d9f2f23c6a
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
0c67227f88
Revert "zproject: Prevent having exactly 17/18 middlewares, for Python 3.11 bug."
...
This reverts commit cf0b803d50
.
(cherry picked from commit 41f253774d
)
2024-03-07 15:07:12 -08:00
Anders Kaseorg
81d78cb88c
ci: Disable coverage on Debian 12.
...
This is probably a more effective workaround for
https://github.com/python/cpython/issues/106092 .
Signed-off-by: Anders Kaseorg <anders@zulip.com >
(cherry picked from commit 4f27381ebc
)
2024-03-07 15:07:12 -08:00
Aman Agrawal
b222c7237b
css: Apply fa-chevron-down CSS to zulip-icon-chevron-down.
...
This was missed as part of #27577 migration.
(cherry picked from commit ff49fec7af
)
2024-03-07 15:01:15 -08:00
Alya Abbott
8a90495226
docs: Add plan sign-up to mobile notifications sign-up instructions.
...
(cherry picked from commit 3b22637d77
)
2024-03-07 15:01:15 -08:00
Tim Abbott
27507e5944
docs: Better document backup/export tool tradeoffs.
...
- More consistent export/import vs backup bullets at the top.
- Remove misleading documentation regarding the `zulip_org_id` reuse
problems. This documentation was written for Zulip 2.1.0 in
c6fe6cf0a4
and largely made obsolete
in d800ac33a0
(Zulip 5.0).
- Light editing for readability/crispness.
Fixes #28925 .
(cherry picked from commit 270deb0334
)
2024-03-07 15:01:15 -08:00
Alex Vandiver
dc29251edd
log-search: Fix attempts to limit to events requests in Django logs.
...
(cherry picked from commit 4735be85a7
)
2024-03-07 15:01:15 -08:00
Alex Vandiver
18ac602e29
log-search: Support user-agent / client limit.
...
(cherry picked from commit 4372138f13
)
2024-03-07 15:01:15 -08:00
Alex Vandiver
442b4fb71e
log-search: Remove old /report/ endpoints.
...
(cherry picked from commit ed0058dff6
)
2024-03-07 15:01:15 -08:00