Commit Graph

1627 Commits

Author SHA1 Message Date
Aman Agrawal
75afa9c055 provision: Replace Fedora 38 support with Fedora 43.
Fedora 38 reached end of life upstream; replace it with Fedora 43,
which ships dnf5 and a recent enough groonga to skip the source
build. Concretely, to make `tools/provision` run cleanly on
Fedora 43:

* dnf5 (Fedora 41+) dropped the `groupinstall` alias and no longer
  resolves the "Development Tools" display name, so switch the
  Fedora branch of `setup-yum-repo` to
  `dnf group install development-tools` (by group ID). Move the
  existing CentOS/RHEL `groupinstall` calls into their own branches
  so they keep working on yum/dnf4.

* Map Fedora 43 to PostgreSQL 17, and add `groonga-devel`,
  `xxhash-devel`, `meson`, and `redhat-rpm-config` to the Fedora
  package list. PGroonga 4.0.6 switched its build system to meson;
  on Fedora, PostgreSQL's `pg_config` exports CFLAGS containing
  `-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1` and
  `-specs=.../redhat-annobin-cc1`, and without `redhat-rpm-config`
  the PGroonga build fails with "cannot read spec file".
  `xxhash-devel` is required because `xxhash-libs` is often pulled
  in transitively (by blosc2, pyarrow, etc.) without its headers,
  in which case meson detects libxxhash via pkg-config and skips
  the vendored fallback that would otherwise build it from source.

* Use the packaged groonga from Fedora's main repo (15.0.4 on
  Fedora 43, satisfying PGroonga 4.0.6's >= 14.1.0 requirement)
  instead of compiling groonga from source. This removes the only
  remaining caller of `scripts/lib/build-groonga` and the
  BUILD_GROONGA_FROM_SOURCE plumbing in provision.py, which the
  prior Fedora 38 path was the only user of.

Verified end-to-end on a Fedora 43 host and in a fresh fedora:43
podman container: setup-yum-repo, the package install, and the
PGroonga source build against the system groonga all complete
cleanly.
2026-04-25 22:27:34 -07:00
Anders Kaseorg
34ed22a117 install: Support Ubuntu 26.04.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-22 22:00:04 -07:00
Anders Kaseorg
cc3d4b6459 build-pgroonga: Upgrade PGroonga from 4.0.1 to 4.0.6.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-22 22:00:04 -07:00
Anders Kaseorg
5e068b2ffd build-groonga: Upgrade Groonga from 13.0.5 to 16.0.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-22 22:00:04 -07:00
Anders Kaseorg
9e51a06a4a install-node: Upgrade Node.js from 2.14.0 to 2.15.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-17 15:39:27 -07:00
Anders Kaseorg
d6df5337ff requirements: Upgrade Python requirements.
Also enable a 24-hour dependency cooldown:
https://docs.astral.sh/uv/concepts/resolution/#dependency-cooldowns

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-17 15:04:02 -07:00
Anders Kaseorg
a946a66825 install-uv: Upgrade uv from 0.10.9 to 0.11.7.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-17 15:04:02 -07:00
Alex Vandiver
c9fccaa975 restore-backup: Handle PORT being an int, not a str.
This changed in f1ec8163ef.
2026-03-26 21:52:51 -07:00
Anders Kaseorg
d282ef3e64 provision: Use uv sync --no-managed-python.
This is the default, but if we ever want to switch to uv’s managed
Python later, it will be necessary to have this earlier to stop uv
from keeping it after checking out an earlier branch.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-03-25 04:05:47 -07:00
Anders Kaseorg
9516d5ac1e install-uv: Upgrade uv from 0.10.4 to 0.10.9.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-03-10 18:11:54 -07:00
Anders Kaseorg
bfd8f1078b install-node: Upgrade Node.js from 24.13.0 to 24.14.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-02-24 15:59:05 -08:00
Anders Kaseorg
9ae6c05972 install-uv: Upgrade uv from 0.9.23 to 0.10.4.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-02-23 18:49:17 -08:00
Sutou Kouhei
d690e589b2 setup-upgrade-postgresql: Add missing --file flag to execute SQL in a file
Fix GH-36350

If we want to execute SQL in a file, we need to use `psql --file PATH`
not `psql PATH`.
2026-02-17 10:57:33 -05:00
Anders Kaseorg
7cd303c9db scripts: Replace parse_os_release with platform.freedesktop_os_release.
This is available in Python ≥ 3.10.

https://docs.python.org/3/library/platform.html#platform.freedesktop_os_release

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-02-10 13:38:28 -08:00
Alex Vandiver
6b9642b480 log-search: Filter to just authed or unauthed requests. 2026-01-20 17:13:28 -08:00
Anders Kaseorg
3edd276653 install-node: Upgrade Node.js from 24.12.0 to 24.13.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-01-13 11:01:51 -08:00
Anders Kaseorg
6096907263 install-uv: Upgrade uv from 0.9.12 to 0.9.21.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-01-02 19:09:18 -08:00
Anders Kaseorg
6cd0a354ef install-node: Upgrade Node.js from 24.11.1 to 24.12.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-12-28 00:49:26 -08:00
Alex Vandiver
13243be3e8 migrations: Move schema creation and search_path into pre_migrate hook. 2025-12-16 13:03:27 -08:00
Alex Vandiver
3ee7690b0b migrations: Fix default search_path.
PostgreSQL's `search_path` sets the order in which schemas are
searched, and the first one is the one in which unqualified objects
are created[^1].

Lower in the file, we create an explicit `zulip` schema -- so we
should not use the database name in the `search_path`.  Switch to the
correct constant `zulip`.

[^1]: https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATH
2025-12-16 13:03:27 -08:00
Alex Vandiver
359e5c2b78 install: Support PostgreSQL 18. 2025-12-10 21:37:07 -08:00
Alex Vandiver
1f3aed14a5 migrations: Degrade gracefully with missing remote dictionaries.
Rather than require a configuration option, detect the `tsearch_data`
error, in conjunction with a remote PostgreSQL host, and warn and
continue.  It is pretty much impossible to arrive at that combination
and then _not_ want to try again with the flag, so we should handle
that degradation gracefully, instead of requiring an explicit
install and configuration flag.
2025-12-03 11:44:14 -08:00
Alex Vandiver
f22592151a setup-certbot: Puppet guarantees the certbot package.
It has been installed on all hosts since 01e8f752a8.
2025-11-26 11:33:27 -08:00
Alex Vandiver
0c953f9870 setup-certbot: Run hooks, instead of "service nginx reload".
`certbot certonly`, when obtaining a new certificate, does not
run deploy hooks that were installed into
`/etc/letsencrypt/renewal-hooks` (certbot/certbot#9978).  Because of
this, we added an explicit `service nginx reload`.

This turns out to be awkward for a few reasons -- firstly, this does
not handle the restarting of our SMTP server, which also needs to pick
up the new certificates.  It requires that Docker installs explicitly
restart nginx their own way.  And it also means that if certbot
already had a certificate, we reload nginx twice.

We would ideally just have certbot just run all of the deploy hooks,
as usual, no matter if the certificate is new or a renewal; however,
it has no flag to do so.

We move to approximating running the deploy hooks, if the certificate
is new.  This makes it easier to have identical behaviour between
initial install and later renewals.

This requires moving the symlinking step itself to a deploy hook, so
it can run before nginx and the email server are restarted.  Our one
consumer of the `--skip-symlink` flag, Docker, can work around its
removal.  The symlink step is a no-op if `$ZULIP_DOMAIN` is unset,
i.e. during automated renewals.  This ensures that system that
installed certbot, but has since changed to manual certificate
management, does not have those certificates overridden next time
certbot renews itself.
2025-11-26 09:10:40 -08:00
Alex Vandiver
52b1bd69a9 setup-certbot: More reasonable non-interactive behaviour.
The use of `--force-interactive` was because it "suppresses a
warning", which current certbot shows no sign of displaying without
the flag.

We remove `--force-interactive`, and instead add
`--keep-until-expiring` if we are non-interactive, to allow
`setup-certbot` to default to not unnecessarily renewing certificates.
When run interactively, it may still prompt if a not-near-expiry
certificate is to be force-renewed.
2025-11-26 09:10:40 -08:00
Alex Vandiver
150b81f3ad letsencrypt: Remove danging fixes from Zulip Server 5.0.
It is no longer possible to upgrade directly from 5.0, so these steps
are no longer necessary.
2025-11-26 09:10:40 -08:00
Anders Kaseorg
9235ccfc99 install-node: Upgrade Node.js from 24.11.0 to 24.11.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-25 21:02:51 -08:00
Anders Kaseorg
6916c33186 install-uv: Upgrade uv from 0.9.5 to 0.9.12.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-25 16:29:32 -08:00
Alex Vandiver
6c9705a6bb checks: Move checkconfig to standard check framework. 2025-11-19 11:50:18 -08:00
Anders Kaseorg
35d20b04d1 install-node: Upgrade Node.js from 22.20.0 to 24.11.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Anders Kaseorg
69f2e95e49 install-uv: Upgrade uv from 0.8.22 to 0.9.5.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-23 15:52:47 -07:00
Alex Vandiver
a8f0cb2cf9 restart-server: All realm Tornado ports need a restart when they change. 2025-10-21 11:38:03 -07:00
Alex Vandiver
21f08265de restart-server: --tornado-reshard implies --skip-client-reloads.
The flags are marked mutually exclusive, so don't pass both; have the
former imply the latter.
2025-10-21 11:38:03 -07:00
Anders Kaseorg
4192d46a0e upgrade-zulip-from-git: Fix fully broken refname parsing.
Commit c903128eb7 (#36214) was evidently
never tested.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-12 16:47:53 -07:00
Alex Vandiver
c903128eb7 upgrade-zulip-from-git: Provide better error message on a bad refname.
Some checks failed
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:trixie, false, false, Debian 13 (Python 3.13, backend), trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie, , Debian 13 production install, trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie-11.0, 11.0 Version Upgrade, trixie) (push) Has been cancelled
2025-10-07 22:44:53 -07:00
Anders Kaseorg
88a7fde8bd install-node: Upgrade Node.js from 22.19.0 to 22.20.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-07 22:42:50 -07:00
Alex Vandiver
01664a1a10 sharding: Swap new config into place during restart-server.
This allows restart-server, before moving the new config into place,
to perform a diff and only restart the affected Tornado ports.
2025-10-07 13:19:05 -07:00
Alex Vandiver
e18b0fcd16 sharding: Use restart-server after setting up new sharding config.
restart-server has grown more complex since
efresh-sharding-and-restart was written -- use that complexity.  For
instance, workers are stopped one-at-a-time, rather than requiring
that they all stop sequentially before being started again.

It also means that Django restarts will be rolling, which trades off
500s during login for realms which are moving, in exchange for leaving
other realms unaffected.
2025-10-07 13:19:05 -07:00
Alex Vandiver
2bd4c07fdb sharding: Move chown/chmod into where the files are written. 2025-10-07 13:19:05 -07:00
Alex Vandiver
6249c2f970 sharding: Make nginx shard map owned by zulip:zulip.
This will make it easier to manipulate in restart-server.
2025-10-07 13:19:05 -07:00
Alex Vandiver
970ff73c5f restart-server: Fix comment to be sensical. 2025-10-07 09:40:53 -07:00
Anders Kaseorg
890ccec8d4 timestamp: Use localized formatting in format_datetime_to_string.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-03 10:43:16 -07:00
Anders Kaseorg
0b400a66cc install-uv: Upgrade uv from 0.8.15 to 0.8.22.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
270c50651c install-uv: Upgrade uv from 0.8.10 to 0.8.15.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-04 19:48:55 -07:00
Anders Kaseorg
fc32adaa38 install-node: Upgrade Node.js from 22.18.0 to 22.19.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-04 15:01:37 -07:00
Alex Vandiver
fc962b8b0e run-hooks: Handle hooks after OS upgrade on fresh install. 2025-09-03 15:20:53 -07:00
Alex Vandiver
bef864251b reload-clients: Ensure that Smokescreen does not interfere with reloads.
When run from cron, reload-server (and thus reload-clients) picks up
the `HTTP_proxy` environment variable, which redirects HTTP requests
through Smokescreen -- which prevents localhost requests.  This
results in clients never getting sent reload events.

Explicitly unset proxies when talking to localhost in reload-clients.
2025-08-19 23:39:38 -07:00
Anders Kaseorg
8de55e7cc1 install-node: Upgrade Node.js from 22.17.1 to 22.18.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-08-14 21:37:50 -07:00
Anders Kaseorg
26dc355bf5 install-uv: Upgrade uv from 0.7.21 to 0.8.10.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-08-13 23:40:33 -07:00
Anders Kaseorg
ff15d746c3 install: Support Debian 13.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2025-08-13 14:11:05 -07:00