Commit Graph

4481 Commits

Author SHA1 Message Date
Alex Vandiver 73055255bb ci: Test pgroonga installation. 2021-11-20 07:13:50 -08:00
Sahil Batra 16d35f5b4e streams: Hide fake emails in stream creation form.
We hide fake emails in "People to add" section of
stream creation form and instead show user id
along with specifying that email is hidden.
2021-11-18 12:49:10 -08:00
YashRE42 b0be6a0f92 test_script: Reword provision warning not to assume running tests.
Previously, running `./tools/run-dev.py` when provision was required
would lead to a warning along the lines of:
```
Before we run tests, we make sure your provisioning version
is correct by looking at var/provision_version, which is at
version 165.1, and we compare it to the version in source
control (version.py), which is 165.2.

It looks like you checked out a branch that has added
dependencies beyond what you last provisioned. Your command
is likely to fail until you add dependencies by provisioning.

Do this: `./tools/provision`

If you really know what you are doing, use --skip-provision-check to
run anyway.
```

The assumption that we're trying to run tests might cause some
confusion, especially if its the first time you're seeing the
provision warning. Hence, we reword the first paragraph to avoid
making that assumption.

The second paragraph has also been slightly altered, since (1) it's
possible that we didn't checkout a different branch, but eg just
rebased with upstream and (2) we might not be on a VM.

The warning you'd get after this commit would be along the lines of:
```
Provisioning state check failed! This check compares
`var/provision_version` (currently 165.2) to the version in
source control (`version.py`), which is 164.6, to see if you
likely need to provision before this command can run
properly.

The branch you are currently on expects an older version of
dependencies than the version you provisioned last. This may
be ok, but it's likely that you either want to rebase your
branch on top of upstream/main or re-provision your machine.

Do this: `./tools/provision`

If you really know what you are doing, use --skip-provision-check to
run anyway.
```
or along the lines of:
```
Provisioning state check failed! This check compares
`var/provision_version` (currently 165.2) to the version in
source control (`version.py`), which is 167.2, to see if you
likely need to provision before this command can run
properly.

The branch you are currently on has added dependencies beyond
what you last provisioned. Your command is likely to fail
until you add dependencies by provisioning.

Do this: `./tools/provision`

If you really know what you are doing, use --skip-provision-check to
run anyway.
```
2021-11-16 16:29:34 -08:00
Alex Vandiver 64268f47e8 queue_processors: Drop unused current_queue_size, which was local size.
The `current_queue_size` key in the queue monitoring stats file was
the local queue size, not the global queue size -- d5a6b0f99a
renamed the function, but did not adjust the queue monitoring JSON,
despite the last use of it having been removed in cd9b194d88.

The function is still used to mark "we emptied our queue," and it
remains a reasonable metric for that.
2021-11-16 11:48:50 -08:00
Mateusz Mandera 3688ff38bd custom_check: Improve check for exit(...) call in management commands.
It's better for this to catch all exit(...) calls with non-zero exit
code, given the purpose is to catch all exits with failure, as opposed
to only exit(1).
2021-11-16 11:21:05 -08:00
Mateusz Mandera 7cc345d7b1 process_queue: Improve handling of exceptions in process_queue.
Unhandled exceptions propagating to process_queue were not caught there,
causing improper logging - errors didn't land in errors.log as expected.
Exceptions should be caught and explicitly logged by the process_queue
logger. Exceptions occurring during consuming events are caught and
handled inside the worker's logic - however those that happen while
setting up the worker were not addressed at all, and that's the core bug
we mean to address here.

Furthermore, in multi-threaded mode we want the autoreload mechanism to
be working - which it doesn't without catching the exceptions. The
correct approach is to - again - catch the exception, log it and then
send SIGUSR1 signal to trigger exit and autoreload.
2021-11-16 11:21:05 -08:00
Anders Kaseorg 7a431a690d dev-vagrant-docker: Upgrade docker-systemctl-replacement to 1.5.4505.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-11-10 09:02:56 -08:00
Alex Vandiver 2b025608d0 provision: Remove unsupported Ubuntu versions, add Impish. 2021-11-08 18:21:46 -08:00
Anders Kaseorg b54007d36c clean-repo: Remove.
Unless this was working around a specific bug that has somehow
persisted for eight years, this was just pointlessly defeating
Python’s bytecode cache every time you started the dev server.

This reverts commits deffda072f,
59228f7458, and
ae45217671.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-11-05 17:44:24 -07:00
Anders Kaseorg a3445dac95 install-shfmt: Upgrade shfmt from 3.3.1 to 3.4.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-11-05 17:34:13 -07:00
Vishnu KS 6c06858e02 billing: Migrate to Stripe hosted checkout page. 2021-11-05 17:23:10 -07:00
Alex Vandiver c9ebccdf70 ci: Update outdated comments to generated Dockerfiles.
These were missed in the doc updates in d78723b6e8, which were for
behavior changes in 16067bc4fc.
2021-11-05 15:45:46 -07:00
Kevin Scott 64f099d2f5 compose: Add compose box button to insert global times.
Fixes #20045.
2021-11-01 16:20:05 -07:00
Anders Kaseorg 8bb540fa31 run-codespell: Fix invocation with multiple arguments.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-10-28 09:59:27 -07:00
rht a3a71487b0 CI: Add Codespell linter.
This tool helps catch common typos in code and documentation, which is
particularly useful for our many contributors who are not native
English speakers.

The config is based on the codespell that I ran in
https://github.com/zulip/zulip/pull/18535.
2021-10-27 16:49:30 -07:00
Kartik Soneji 6705085e25 provision: Silently unset PIP_USER if set. 2021-10-22 13:43:40 -07:00
Anders Kaseorg 2c27a87bcd provision: Refuse to run outside an existing Vagrant environment.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-10-20 10:35:46 -07:00
Anders Kaseorg 51971a48f3 debug-require-webpack-plugin: Handle missing chunkGraph.
This seems to be triggered by mini-css-extract-plugin@2.4.0.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-10-17 07:15:09 -07:00
Anders Kaseorg 9cf5a03f2a ci: Migrate to new Codecov uploader.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-10-14 17:56:52 -07:00
Anders Kaseorg 9f2ac49fb3 ci: Change github UID from 3434 to 1001.
CircleCI expected 3434; GitHub Actions expects 1001.  This is the
reason zulip-ci.yml currently needs to mess with the permissions in
/__w.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-10-14 13:01:47 -07:00
Dinesh e2df0d171f user_settings: Add send_read_receipts setting.
This will be useful to let users enable/disable
sharing read receipts once we add that feature.

Note: Added "I've" to IGNORED_PHRASES in
tools/lib/capitalization.py to avoid capitalization
errors for the label text of this setting.
2021-10-07 17:46:05 -07:00
Aman Agrawal 8433ce90dc channel: Ask spectator to login for unauthenticated requests.
Get complete coverage for channel.
2021-10-05 10:23:43 -07:00
Aman Agrawal 50812ead0f setup: Move 401 error check to channel.
Channel already handles all the requests and general errors related to
them; so, channels seems the right place for this check.
2021-10-05 10:11:10 -07:00
Eeshan Garg 763b3c27d6 corporate: Add contact support page. 2021-10-01 17:30:01 -07:00
sahil839 b13bfa09c5 message: Make zero invalid value for message_content_delete_limit_seconds.
We make zero invalid value for message_content_delete_limit_seconds and
for handling the case of "Allow to delete message any time", the API-level
value of message_content_delete_limit_seconds is "anytime" and "None"
as the DB-level value. We also use these values for message retention
setting, so it helps maintain consistency.
2021-09-30 14:45:39 -07:00
Anders Kaseorg c3e7a22afc webpack: Increase Node.js heap size on low-memory systems.
On a 2 GiB, 1 CPU system, webpack would hit the Node.js heap
limit (which is half of physical memory up to 4 GiB, on 64-bit
systems).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-22 16:01:01 -07:00
Anders Kaseorg 7d515ac510 fetch-contributor-data: Modernize set literal syntax.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-22 14:59:42 -07:00
Sahil Batra ba1fe77996 settings: Add UI for realm-level default of enter_sends settings. 2021-09-21 14:56:25 -07:00
Anders Kaseorg 5ab90c541c requirements: Install gitlint from its Debian package.
gitlint has a bunch of pinned requirements that hold back important
upgrades and conflict with other packages’ requirements.  The gitlint
author has rejected proposals to unpin them because it might increase
the amount of maintenance he needs to do
(https://github.com/jorisroovers/gitlint/pull/133).  That decision is
his to make, but _somebody_ needs to do the maintenance, so we
delegate it to Debian and Ubuntu.  If that means using a significantly
older version of gitlint, that’s a tradeoff we need to make to keep
the rest of our requirements current.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-17 17:05:18 -07:00
Anders Kaseorg fe8f2fbf94 lint: Remove deprecated semgrep flag.
The semgrep --dangerously-allow-arbitrary-code-execution-from-rules
flag is deprecated and no longer used.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-17 17:05:18 -07:00
Priyank Patel 0d91472c64 ts: Convert timerender module to TypeScript. 2021-09-15 17:19:39 -07:00
Priyank Patel 9de3b2f4fd ts: Convert user_groups module to TypeScript. 2021-09-15 16:53:17 -07:00
Sahil Batra 96d6bf28db settings: Add UI for realm-level defaults of display settings.
This commit adds a new module settings_defaults.js which calls
the functions in settings_display passing appropriate container
element and settings object as parameters.
We also add one more parameter for_realm_settings to some of the
functions in settings_dislay to differentiate between the user
and realm-level settings.
2021-09-15 09:56:32 -07:00
Sahil Batra a440c93030 settings: Add realm_user_settings_defaults module. 2021-09-15 09:50:31 -07:00
Anders Kaseorg 79b88b79bb webpack: Upgrade to Webpack 5.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-14 17:02:03 -07:00
Anders Kaseorg 18891a84c3 Vagrantfile: Move inline provision script to a separate file.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-14 10:22:48 -07:00
Anders Kaseorg 04075201a0 dependencies: Upgrade webpack-dev-server to 4.2.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-13 10:12:43 -07:00
Anders Kaseorg 2fe1ece3a6 run-dev: Discard Transfer-Encoding header from upstream response.
When the upstream provides a chunked response, proxying this header
causes a protocol-level miscommunication.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-13 10:12:43 -07:00
Anders Kaseorg cf6515c774 test-js-with-puppeteer: Remove bogus CHROMIUM_EXECUTABLE variable.
This environment variable is not a thing and has never been a thing,
while the path it purportedly pointed to does not exist and has never
existed.  It appears to have been inexplicably both cargo-culted and
renamed from test-js-with-casper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-13 10:10:13 -07:00
Ganesh Pawar dee20f0dbf node_tests: Run node tests in parallel.
Fixes #9471.
2021-09-10 14:18:31 -07:00
Tim Abbott c9063870d0 lint: Fix linter excludes for 'realm' in /help/. 2021-09-10 13:15:14 -07:00
Philipp Seßner a8797b4d9f help: Document how to configure Keycloak as the SAML IdP. 2021-09-10 13:04:04 -07:00
Anders Kaseorg cf2302b272 check-openapi: Automatically fix Prettier formatting errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-10 10:39:25 -07:00
Anders Kaseorg a08c138c03 check-openapi: Add option to automatically fix errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-10 10:39:25 -07:00
Anders Kaseorg 7af2647d64 check-openapi: Use low-level YAML parser.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-10 10:39:25 -07:00
Anders Kaseorg 8854cd7945 check-openapi: Print diffs for Prettier formatting errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-10 10:39:25 -07:00
Anders Kaseorg b45548e85a check-openapi: Check that descriptions are formatted with Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-10 10:39:25 -07:00
Anders Kaseorg b7b4c033a5 check-openapi: Use yaml library for better error messages.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-10 10:39:25 -07:00
Sahil Batra 693d58265e realm: Add 'PATCH /realm/user_settings_defaults' endpoint.
The realm-level default value of settngs for new users will
be updated using this endpoint.
2021-09-09 10:55:18 -07:00
Anders Kaseorg 1376feda93 docs: Add missing space in “emoji set”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-08 15:31:28 -07:00