Commit Graph

4662 Commits

Author SHA1 Message Date
Alex Vandiver
75af21ac98 release: Support -rc1 style suffixes for releases.
These suffixes suppress some checks in the process, but still generate
and upload a tarball, push a tag, and make a Github prerelease.
`upload-release` already understands that anything with a suffix never
becomes the "latest" release.

(cherry picked from commit f3fd0b6975)
2022-11-15 14:12:53 -08:00
Alex Vandiver
d7cd2a3079 build-release-tarball: Override merge-base for full official releases.
(cherry picked from commit 1f1e1e4ec2)
2022-11-15 14:12:53 -08:00
Alex Vandiver
b7e15df30b release: Be explicit about which branch was expected.
(cherry picked from commit e95e8b985f)
2022-11-15 14:12:53 -08:00
Alex Vandiver
5f8ee7a15f release: Be consistent about TZ-setting.
(cherry picked from commit abb7a63b62)
2022-11-15 14:12:53 -08:00
Tim Abbott
d383b2ff99 tools: Don't display release candidate as forks.
(cherry picked from commit 931ed069b3)
2022-11-15 14:12:53 -08:00
Alex Vandiver
001e37a34f ci: Do not pre-install rabbitmq-server in Docker images.
Before Zulip 4.9, the Zulip install process left any already-installed
rabbitmq with whatever nodename it had previously configured.  Wince
this encodes the name of the host when it was installed, this does not
function well with containers.

Leave rabbitmq-server uninstalled, which lets the Zulip installation
process set the nodename to `localhost`, which ensures that it is
usable across container restarts.

(cherry picked from commit 63d2565467)
2022-11-15 08:42:23 -05:00
Alex Vandiver
2fdf0f60ca ci: Backport two patches to the 3.4 prod install process.
(cherry picked from commit b161cba078)
2022-11-15 08:42:23 -05:00
Alex Vandiver
de76c3d498 ci: Stop rabbitmq when making CI images.
The production CI image starts `rabbitmq-server` but does not stop it,
which leaves a stale `/var/run/rabbitmq/pid` file in the image.

`rabbitmqctl wait --timeout 600 /var/run/rabbitmq/pid`, which is run
after starting the rabbitmq node, reads the PID file and waits for the
PID to be running, and for rabbitmq's port to be responding to pings.

If it reads an old PID file before the new PID is written, it
aborts (all but the first and last lines are output from `rabbitmqctl
wait` that is hidden by `/etc/init.d/rabbitmq-server`):

```
 * Starting RabbitMQ Messaging Server rabbitmq-server
Waiting for pid file '/var/run/rabbitmq/pid' to appear
pid is 341
Waiting for erlang distribution on node 'rabbit@fc8f64d6acdb' while OS process '341' is running
Error:
process_not_running
 * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
 ```

If it failed, the `production-upgrade` script tried to start
`rabbitmq` again -- despite it already still starting in the
background.  These two attempts conflicted, and often one or both
failed.

Stop `rabbitmq-server` when building the image, which removes the
stale PID file.

(cherry picked from commit fb338f22d7)
2022-11-15 08:42:23 -05:00
Anders Kaseorg
88b6f1fe14 run-codespell: Update codespell exclude list.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 4fb97576e9)
2022-11-14 17:11:39 -05:00
Tim Abbott
e469cf4bc9 release: Don't remove OUTPUT_DIR on exit.
This ends up deleting your local copy of the release tarball, which
can be annoying if you need to upload it manually to the GitHub
releases page.
2022-08-25 12:51:41 -07:00
Tim Abbott
5823cc79f1 release: Fix pushing new release tags. 2022-08-25 12:51:41 -07:00
Anders Kaseorg
170d805d9f upload: Replace boto3.Session with boto3.session.Session.
boto3-stubs seems to have dropped the former for some reason.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 2508b579a6)
2022-08-23 15:25:01 -07:00
Anders Kaseorg
90c45bd230 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit feff1d0411)
2022-08-22 22:41:49 -07:00
Tim Abbott
6c8f5ca459 release: Fix OUTDIR typo.
This was missed in 58962f0b7b.
2022-08-22 22:40:20 -07:00
Anders Kaseorg
e0442e5683 commit-message-lint: Take release branches into account.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-22 22:24:27 -07:00
Matt Keller
69a7690a89 tools: Add executable bit to release tool. 2022-07-21 20:29:38 -04:00
Alex Vandiver
0aa3b9136f release: Use the right variable to build predictable tarball path.
`tools/build-release-tarball` respects `OUTPUT_DIR`, not `OUTDIR`.
2022-07-21 11:42:18 -07:00
Anders Kaseorg
5ebfb6aae5 check-thirdparty: License under GPLv2+.
Since python-debian is GPL licensed, our script that imports it should
arguably be GPL licensed as well.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit e069330084)
2022-07-07 13:31:32 -07:00
Alex Vandiver
bb3cc8eae8 release: Write a tool to automate final release checks and steps.
(cherry picked from commit c915400101)
2022-07-07 13:19:36 -07:00
Alex Vandiver
2e7738470f build-release-tarball: Use OUTPUT_DIR environment variable, if set.
(cherry picked from commit d9958618a9)
2022-07-07 13:19:36 -07:00
Alex Vandiver
b5d75b9dba build-release-tarball: Verify full releases are tagged and pushed.
This ensures that anything that looks like a full release will
identify itself as such.  It requires that the version have a tag at
the current commit (though it doesn't need to be pushed yet), as well
as the commits exist in `main` or a release branch in the remote.

(cherry picked from commit 2d132bf342)
2022-07-07 13:19:36 -07:00
Alex Vandiver
2aa3695d41 upload-release: Only copy full releases to zulip-server-latest.tar.gz.
`zulip-server-6.0-pre0.tar.gz` should not be copied to
`zulip-server-latest.tar.gz`.

(cherry picked from commit 6cd4d907ba)
2022-06-23 20:38:48 -07:00
Alex Vandiver
9d3fb85897 install/upgrade: Allow new packages during apt-get upgrade.
`postgresql-14.4` is a notable upgrade in the PostgreSQL series, as it
fixes potential database corruption from `CREATE INDEX CONCURRENTLY`
statements which are run while rows are modified[1].  However, it also
requires an upgrade from `libllvm9` to `libllvm10`, which means it is
not installed by a mere `apt-get upgrade`.

Add the `--with-new-pkgs` flag to all of the potentially relevant
`apt-get upgrade` calls, so that this (and similar) packages are
upgraded successfully.

[1]: https://www.postgresql.org/docs/release/14.4/

(cherry picked from commit a35af3f38b)
2022-06-21 11:22:39 -07:00
Alex Vandiver
602984f73e oneclick: Fail if the fab command fails.
(cherry picked from commit c93024cd5b)
2022-05-17 13:42:52 -07:00
Alex Vandiver
fcf4ede700 oneclick: Do not use a stale Zulip client.
Initializing the Zulip client opens a long-lived TCP connection due to
connection pooling in urllib3.  In Github Actions, the network kills
such requests after ~270s, making the later `send_message` call fail.

Use a singular call to `zulip.Client()` early on to verify the
credentials, and do not cache the resulting client object.  Instead,
re-create it during the final step when it is needed, so we do not run
afoul of bad TCP connection state.

This would ideally be fixed via connection keepalive or retry at the
level of the Zulip module.

(cherry picked from commit ff647dff03)
2022-05-17 13:42:50 -07:00
Anders Kaseorg
1593ab6082 install: Resupport Ubuntu 22.04.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit e952641013)
2022-05-16 12:05:23 -07:00
Anders Kaseorg
e124464fea requirements: Upgrade to Tornado 6.
Fixes #8913.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 7acb642fa5)
2022-05-16 12:05:23 -07:00
Anders Kaseorg
9362158e04 run-dev: Fix types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit f23bfe91c0)
2022-05-16 12:05:23 -07:00
Anders Kaseorg
ad9187d9f7 cache: Instantiate only one BMemcached cache backend.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit c9faefd50e)
2022-05-16 12:05:23 -07:00
Anders Kaseorg
f7f750e7a8 run-dev: Switch to asyncio event loop.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 0ef9309e92)
2022-05-16 12:05:23 -07:00
Anders Kaseorg
ac5e31ce04 tornado: Unfork tornado.autoreload.
We previously forked tornado.autoreload to work around a problem where
it would crash if you introduce a syntax error and not recover if you
fix it (https://github.com/tornadoweb/tornado/issues/2398).

A much more maintainable workaround for that issue, at least in
current Tornado, is to use tornado.autoreload as the main module.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit bded7180f7)
2022-05-16 12:05:23 -07:00
Anders Kaseorg
5f474e8425 run-dev: Avoid deprecated tornado.gen.engine.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 1c7954b452)
2022-05-16 12:05:23 -07:00
Anders Kaseorg
4d0ddf483d actions: Delete zerver.lib.actions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit cc30ed8ec7)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
37b40df30c actions: Split out zerver.actions.realm_settings.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 59f6b090c7)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
f4fe1660f3 actions: Split out zerver.actions.bots.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit ec174dfb47)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
c59eb24674 actions: Split out zerver.actions.create_user.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit cbad5739ab)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
c530f1b582 actions: Split out zerver.actions.streams.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 5fcbc412cf)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
3b48bcca95 actions: Split out zerver.actions.message_send.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 975066e3f0)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
50ca78447e actions: Split out zerver.actions.user_settings.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit ec6355389a)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
b4d9cd4e0f actions: Split out zerver.actions.users.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit d7981dad62)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
025219da16 actions: Move part into zerver.lib.streams.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit a29f1b39da)
2022-04-15 10:08:19 -07:00
Anders Kaseorg
ea9ba8b24c actions: Add zerver/actions directory.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit dd8b1aaba6)
2022-04-15 10:08:19 -07:00
Alex Vandiver
fb03c3205e timeout: Add test coverage.
(cherry picked from commit e6e4b7b3ef)
2022-04-13 20:47:34 -07:00
Alex Vandiver
d9e7feae0a migrations: Remove the possibly-duplicated emoji re-uploading.
In 85e531e377, we duplicated this block
of migration code to fix a bug, but moving it (aka deleting the
original copy) is a cleaner solution.

(cherry picked from commit 35e27aef4a)
2022-04-01 22:31:54 -07:00
Tim Abbott
4db1aa75ce migrations: Repeat part of migration 0376.
The blockquote explains the motivation for this change in detail.

Fixes #21608.

(cherry picked from commit 85e531e377)
2022-04-01 15:21:05 -07:00
Tim Abbott
13da2c2fb7 total-contributions: Clone repositories if already available.
This makes it more convenient to manage.
2022-03-28 23:01:58 -07:00
Tim Abbott
a7f13ba723 total-contributions: Support all repositories and improve output. 2022-03-28 23:01:58 -07:00
Tim Abbott
7cbe9665b6 total-contributions: Exclude dependabot commits. 2022-03-28 23:01:58 -07:00
Tim Abbott
a234fe9c4c total-contributions: Use commits by date, not by release. 2022-03-28 23:01:58 -07:00
Tim Abbott
6b5ce3579c total-contributions: Do a fetch for zulip/zulip as well.
This avoids producing stale output by having a consistent algorithm
for all repositories.
2022-03-28 23:01:58 -07:00