Go to file
Alex Vandiver 20b7a2d450 puppet: Each worker should chdir after forking.
The top-level `chdir` setting only does the chdir once, at initial
`uwsgi` startup time.  Rolling restarts, however, however, require
that `uwsgi` pick up the _new_ value of the `current` directory, and
start new workers in that directory -- as currently implemented,
rolling restarts cannot restart into newer versions of the code, only
the same one in which they were started.

Use [configurable hooks][1] to execute the `chdir` after every fork.
This causes the following behaviour:

```
Thu May 12 18:56:55 2022 - chain reload starting...
Thu May 12 18:56:55 2022 - chain next victim is worker 1
Gracefully killing worker 1 (pid: 1757689)...
worker 1 killed successfully (pid: 1757689)
Respawned uWSGI worker 1 (new pid: 1757969)
Thu May 12 18:56:56 2022 - chain is still waiting for worker 1...
running "chdir:/home/zulip/deployments/current" (post-fork)...
Thu May 12 18:56:57 2022 - chain is still waiting for worker 1...
Thu May 12 18:56:58 2022 - chain is still waiting for worker 1...
Thu May 12 18:56:59 2022 - chain is still waiting for worker 1...
WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x55dfca409170 pid: 1757969 (default app)
Thu May 12 18:57:00 2022 - chain next victim is worker 2
[...]
```

..and so forth down the line of processes.  Each process is correctly
started in the _current_ value of `current`, and thus picks up the
correct code.

[1]: https://uwsgi-docs.readthedocs.io/en/latest/Hooks.html
2022-05-12 21:54:02 -07:00
.github ci: Update upgrade test to 5.2, from 5.1. 2022-05-04 11:37:15 -07:00
.tx cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
.vscode vscode: Recommend remote development extension. 2021-11-03 16:03:46 -07:00
analytics python: Excise None from pointlessly nullable booleans. 2022-04-27 12:40:14 -07:00
confirmation python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
corporate python: Excise None from pointlessly nullable booleans. 2022-04-27 12:40:14 -07:00
docs docs: Document the ./scripts/log-search tool. 2022-05-10 14:31:54 -07:00
frontend_tests org_settings: Add "Role" column in bot-list table. 2022-05-10 14:09:57 -07:00
locale i18n: Update translations from Transifex. 2022-04-18 13:50:19 -07:00
pgroonga pgroonga: Remove unnecessary code from first migration. 2021-05-28 09:42:33 -07:00
puppet puppet: Each worker should chdir after forking. 2022-05-12 21:54:02 -07:00
requirements requirements: Require boto3-stubs packages only in development. 2022-05-09 12:49:15 -07:00
scripts log-search: Allow multiple search terms. 2022-05-06 17:45:46 -07:00
static org_settings: Add main feature to change bot role. 2022-05-10 14:09:57 -07:00
stubs/taint actions: Split out zerver.actions.message_send. 2022-04-14 17:14:34 -07:00
templates org_settings: Add backend support to change bot role. 2022-05-10 14:09:57 -07:00
tools tail-ses: Add a tool to tail SES delivery/bounce/complaint queues. 2022-05-06 17:49:00 -07:00
var/puppeteer puppeteer_tests: Port to TypeScript. 2021-02-22 16:03:10 -08:00
zerver streams: Mark messages as read only for unsubscribed streams. 2022-05-12 18:53:45 -07:00
zilencer bulk_create: Copy realm-level defaults in bulk_create_users. 2022-05-04 12:52:43 -07:00
zproject portico: Add Recurse Center case study. 2022-05-05 16:43:00 -07:00
.browserslistrc zjsunit: Set browserslist target to current Node for Node tests. 2022-05-04 09:56:07 -07:00
.codecov.yml
.codespellignore CI: Add Codespell linter. 2021-10-27 16:49:30 -07:00
.editorconfig editorconfig: Restore indent_size = 2 for Markdown. 2021-08-20 23:14:37 -07:00
.eslintignore requirements: Remove Thumbor. 2021-05-06 20:07:32 -07:00
.eslintrc.json home: Don't send /register response for spectators. 2022-05-05 15:20:46 -07:00
.gitattributes .gitattributes: Mark *.bmp, *.bson, *.mp3, *.pdf as binary. 2022-02-07 18:51:06 -08:00
.gitignore editor: Add `.vscode/extensions.json` file. 2021-10-29 15:47:44 -07:00
.gitlint lint: Re-enable imperative-mood checking. 2021-02-23 14:54:07 -08:00
.mailmap mailmap: Add entries to deduplicate more contributors. 2022-03-29 12:13:21 -07:00
.npmignore
.prettierignore prettier: Exclude backend-processed Markdown files. 2021-08-20 23:14:37 -07:00
.pyre_configuration pysa: Update .pyre_configuration to point to typeshed. 2020-09-22 15:44:47 -07:00
.sonarcloud.properties tools: Configure Zulip to be scannable by SonarCloud. 2020-06-24 12:41:17 -07:00
.yarnrc .yarnrc: Set ignore-scripts true. 2019-08-28 16:15:54 -07:00
CODE_OF_CONDUCT.md docs: Apply bullet style changes from Prettier. 2021-09-08 12:06:24 -07:00
CONTRIBUTING.md docs: Clarify stages of PR review. 2022-03-25 18:11:18 -07:00
Dockerfile-postgresql docker: Document the PostgreSQL Dockerfile build steps. 2022-04-26 18:00:00 -07:00
LICENSE license: Move copyright notice from LICENSE to NOTICE. 2021-02-05 09:28:12 -08:00
NOTICE docs: Bump copyright year. 2021-02-05 09:28:15 -08:00
README.md docs: Update README and installation guide. 2022-03-04 13:59:17 -08:00
SECURITY.md SECURITY.md: Reorder and make clearer how to subscribe to announcements. 2022-01-07 15:56:26 -08:00
Vagrantfile Remove Debian 10 support. 2022-04-26 16:32:02 -07:00
babel.config.js dependencies: Upgrade JavaScript dependencies. 2022-05-04 09:56:07 -07:00
manage.py manage: Restore `changepassword` back to documented_commands. 2021-06-18 09:11:01 -07:00
package.json dependencies: Upgrade JavaScript dependencies. 2022-05-04 09:56:07 -07:00
postcss.config.js css: Replace "night-mode-block" with "dark-theme-block". 2021-11-26 22:03:29 -08:00
prettier.config.js prettier: Disable embedded language formatting for Markdown. 2021-08-20 23:14:37 -07:00
pyproject.toml mypy: Link some upstream issues for adding library type annotations. 2022-05-03 10:10:06 -07:00
setup.cfg pycodestyle: Improve comments documenting excludes. 2021-02-12 13:11:25 -08:00
stylelint.config.js yarn: Add package which allows creating css mixins. 2021-12-09 18:15:18 -08:00
tsconfig.json tsconfig: Enable noImplicitOverride. 2021-09-13 10:10:34 -07:00
version.py org_settings: Add backend support to change bot role. 2022-05-10 14:09:57 -07:00
webpack.config.ts webpack: Remove LoaderOptionsPlugin. 2021-10-17 07:13:57 -07:00
yarn.lock dependencies: Upgrade JavaScript dependencies. 2022-05-04 09:56:07 -07:00

README.md

Zulip overview

Zulip is an open-source team collaboration tool with unique topic-based threading that combines the best of email and chat to make remote work productive and delightful. Fortune 500 companies, leading open source projects, and thousands of other organizations use Zulip every day. Zulip is the only modern team chat app that is designed for both live and asynchronous conversations.

Zulip is built by a distributed community of developers from all around the world, with 74+ people who have each contributed 100+ commits. With over 1000 contributors merging over 500 commits a month, Zulip is the largest and fastest growing open source team chat project.

Come find us on the development community chat!

GitHub Actions build status coverage status Mypy coverage code style: black code style: prettier GitHub release docs Zulip chat Twitter GitHub Sponsors

Getting started

You may also be interested in reading our blog, and following us on Twitter and LinkedIn.

Zulip is distributed under the Apache 2.0 license.