Commit Graph

35666 Commits

Author SHA1 Message Date
Anders Kaseorg 9620611ec9 check-openapi: Restore functionality after OpenAPI definitions moved.
Commit 35577a1f66 (#9406) moved the
OpenAPI definitions to zerver/openapi, and this script was not
updated, so it has been validating nothing for two years.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-21 16:11:56 -07:00
Anders Kaseorg 7bbbc46aad check-openapi: Remove check_duplicate_operation_ids.
This is handled by swagger-parser now.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-21 16:11:56 -07:00
Aman Agrawal 59c2b6dcc7 release-checklist: Replace Xenial with Focal. 2020-04-21 15:03:14 -07:00
Aman Agrawal 79acd5ae40 docs: Remove development Xenial and Stretch support. 2020-04-21 15:01:31 -07:00
arpit551 88d253e8f2 ci: Add bionic production job in Circle CI.
We now replaced our production suites to run on circle ci
that too on bionic docker image.
2020-04-21 14:46:40 -07:00
arpit551 0121e82d2c ci: Fixed saving cache bug in Circle CI jobs.
While saving cache we used thumbor.txt in as key but while
restoring cache we used thumbor-dev.txt as the key so we could
never restore zulip-venv-cache in ci builds.
2020-04-21 14:46:40 -07:00
arpit551 56a5beddc0 ci: Fixed errors related to running services in ci production build.
Restart postgres service if provision is called in production test suite.
This is required because terminate-psql-sessions script (used
in tools/ci/setup-production) throws error if postgres service is not running.

Restart rabbitmq service if provision is called in production test suite.
This is done to start the node as Circle CI don't start services on installation.

Removed memcached restart as flush-memcached script (which is furthur
used in tools/ci/production) throws UNKNOWN READ FAILURE if memcached is restarted
in development.
2020-04-21 14:46:40 -07:00
arpit551 e6edf469ee ci: Remove the need of using TRAVIS in env.
Since now we want to use production suites on Circle CI so there
is no need to set TRAVIS in env while running scripts.

CIRCLECI is set default in the enviroment of Circle CI builds
so we can use it directly.

Also Travis CI had rabbitmq-server installed so we had to add workaround
in install script to avoid the error. That workaround is removed.
2020-04-21 14:46:40 -07:00
arpit551 4946405e3a ci: Change production setup in ci according to bionic and Circle CI.
Used postgres 10 inplace of postgres 9.5 as it is used in Bionic.

Upgraded nginx version in success-http-headers which is in CircleCI
Bionic enviroment.
2020-04-21 14:46:40 -07:00
arpit551 dee8de3b88 ci: Replaced travis with test suite while setting production setup on ci. 2020-04-21 14:46:40 -07:00
arpit551 80af201ef9 ci: Removed hacky code required for travis CI.
Removed hacky code required for travis CI in production-helper
and setup production.
2020-04-21 14:46:40 -07:00
arpit551 2abefa29c2 travis: Removed travis.yml.
Removed travis.yml in the process of shifting production tests
to CircleCI.
2020-04-21 14:46:40 -07:00
Steve Howell 900fe02471 tools: Remove replacer.
This seems to be a complicated wrapper around `sed`.
It's not used anywhere or documented anywhere.  I
assume it was used in some code sweep or something.

See cec45b0ae5
2020-04-21 14:12:57 -07:00
Steve Howell 735f098ff5 tools: Remove get-handlebars-vars.
I built this in 2013 to help me quickly build
some sample data for our very early node tests,
I believe.

Ever since then it's just been changed for various
code sweeps.  Also, if we wanted to resurrect this
idea for some reason, we now have the template
parser that was written since then.
2020-04-21 14:12:57 -07:00
Steve Howell 3dd1a9211c tools: Remove html-grep.
I built this in August 2016, but I haven't used it
since, and all the more recent commits are just for
things like mypy sweeps.
2020-04-21 14:12:57 -07:00
Steve Howell 5bf43b77df tools: Remove django-template-graph.
This tool was last modified in 2016, has no
documentation, and requires `dot` to run, so
I think we can remove it to reduce some clutter
in the tools directory.
2020-04-21 14:12:57 -07:00
Steve Howell 2488438d90 tools: Convert fix-unused-css to look at zulip.scss.
This tool is hackish and incomplete, but it's still
worth looking at if somebody wants to hunt down
obsolete CSS.  There are probably better ways to
tackle this problem, so we should eventually just
remove this tool, but it's pretty low maintenance.

Current output looks like this:

    $ ./tools/find-unused-css
    actions_hovered
    actions_link
    bookend_tr
    btn-skip
    company-name
    flatpickr-months
    label_for_text
    loading_more_messages_indicator_box
    loading_more_messages_indicator_box_container
    logoimage
    messages-collapse
    messages-expand
    numInputWrapper
    page_loading_indicator_box
    page_loading_indicator_box_container
    skinny-user-gravatar
    sp-input
    summary_colorblock
    summary_row
    summary_row_private_message
    tutorial-done-button
2020-04-21 14:12:57 -07:00
Mateusz Mandera 62c0ab3f9d saml: Change which IdPs are returned to get_external_method_dicts.
If queried without a realm, get_external_method_dicts should only
have IdPs that can be used on all realms.
2020-04-21 13:49:34 -07:00
Kartik Srivastava b29ccdf51c
api: Refactor get_members_backend to return a single bot's data.
This makes `get_members_backend` in zerver/views/users.py to
return a single bot's data too.
2020-04-21 13:45:58 -07:00
Vishnu KS 87fdef2472 team: Don't remove duplicate commits inside the retry loop.
Else for each retry the duplicate commits would be removed
again and again from the contributor's zulip/zulip commits.
This is a bug in the original commit
6bed6ccdcf that added the
functionality to remove duplicate commits.
2020-04-21 13:41:10 -07:00
Hashir Sarwar e3b90a5ec8 api: Add a monotonic integer "feature level" for non-webapp clients.
The purpose is to provide a way for (non-webapp) clients,
like the mobile and terminal apps, to tell whether the
server it's talking to is new enough to support a given
API feature -- in particular a way that

* is finer-grained than release numbers, so that for
features developed after e.g. 2.1.0 we can use them
immediately on servers deployed from master (like
chat.zulip.org and zulipchat.com) without waiting the
months until a 2.2 release;

* is reliable, unlike e.g. looking at the number of
commits since a release;

* doesn't lead to a growing bag of named feature flags
which the server has to go on sending forever.

Tweaked by tabbott to extend the documentation.

Closes #14618.
2020-04-21 13:37:57 -07:00
jagansivam28 0de77cabb0 settings UI: Add brighness on hover effect for "X" icon in upload avatar.
Increase brightness on hover effect for "X" icon in upload
avatar area is added and change the text to "delete profile picture"
while hovering over "X" icon in the avatar upload area.
2020-04-21 13:27:55 -07:00
Steve Howell 105c168b19 test-api: Avoid flakes with curl tests. 2020-04-21 11:30:29 -04:00
Puneeth Chaganti 10d93ae1b7 requirements: Remove requirement on cairosvg in production.
The import of cairosvg has been made lazy, and we no longer need cairosvg on
production. This reverts commit 561ded5e59.
2020-04-20 23:25:45 -07:00
Puneeth Chaganti 7a5033852d provision: Add dependencies for Chromium used by latest puppeteer.
a51902a870 upgraded the puppeteer version to
3.0.0, which upgraded the Chromium version being used[1]. This version of
Chromium requires a couple of extra libraries to be installed.

[1]: https://github.com/puppeteer/puppeteer/releases/tag/v3.0.0
2020-04-20 23:25:45 -07:00
Aman Agrawal c87d58bb4f docs/wsl: Add recommendations for developing using wsl. 2020-04-20 23:21:45 -07:00
sahil839 578ccea220 typeahead: Update for email_address_visibility settings.
This commit changes the code to show user according to emails based
on email_address_visibilty_values and the type of user.

1. email_address_visibility = admins,members and guests

   Typeaheads are shown according to original emails.

2. email_address_visibility = admins only

   Typeaheads are shown according to original email to admins which
   were previously shown according to system-generated email of
   form "user10@zulipdev.com".

   For non-admins, typeaheads are not shown according to emails as
   they are not visible in the typeahead itself to non-admins.

3. email_address_visibility = nobody

   Typeaheads are not shown according to emails for all type of users.
2020-04-20 20:53:39 -07:00
sahil839 821059814e typeahead: Fix broken email address handling in typeahead.
Previously, when email_address_visibility was set to admins only, the
non-admin users were not shown emails in typeaheads, while admins were
shown emails of the form 'user11@zulipdev.com'.

This commit corrects it to show the original emails in typeaheads and
input box of adding subscribers to admins and the behaviour is same
for non-admins.
2020-04-20 20:49:47 -07:00
sahil839 6657cddd7a refractor: Move get_visible_email from popovers.js to people.js.
This commit moves the get_visible_email function to people.js
as this function will be used in other places and people.js seems
relevant file for this.

Tests are added to get full coverage.
2020-04-20 20:48:47 -07:00
shubhamgupta2956 7c3169a1d9 api_docs: Add "MessageId" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "message_id" in components.
2020-04-20 17:52:49 -07:00
shubhamgupta2956 05bb1e7075 api_docs: Add "Content" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "content" in components.
2020-04-20 17:52:49 -07:00
shubhamgupta2956 0425f53e88 api_docs: Add "ClientGravatar" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "client_gravatar" in components.
2020-04-20 17:52:49 -07:00
shubhamgupta2956 c814afd4a7 api_docs: Add "StreamIdInPath" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "stream_id" (in path) in components.
2020-04-20 17:52:48 -07:00
shubhamgupta2956 942fd39065 api_docs: Add "StreamIdInQuery" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "stream_id" (in query) in components.
2020-04-20 17:52:30 -07:00
shubhamgupta2956 d5f96c3c12 api_docs: Add "Stream" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "stream" in components.
2020-04-20 17:49:53 -07:00
shubhamgupta2956 22c273eacd api_docs: Add "QueueId" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "queue_id" in components.
2020-04-20 17:49:53 -07:00
shubhamgupta2956 86eed5d9bb api_docs: Add "Topic" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "topic" in components.
2020-04-20 17:49:52 -07:00
shubhamgupta2956 05b1ddeb84 api_docs: Add "GroupId" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "group_id" in components.
2020-04-20 17:47:13 -07:00
shubhamgupta2956 8e617d7f26 api_docs: Add "Narrow" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "narrow" in components.
2020-04-20 17:47:13 -07:00
vaibhavrajsingh2001 6ddc4827fe design: Make copy text button clickable again.
Due to added opacity of 0.5 through the readonly property, the button
for copy and close was not clickable. Increasing z-index of the button
solves it.
2020-04-20 16:01:14 -07:00
Siddharth Varshney 2d11d58c9a ui: Fix deleted msg color in Message edit history modal.
New colors are introduced in msg edit history modal for better readability
These color will have better constrat with their background colors

Fixes #13622
2020-04-20 15:42:24 -07:00
Steve Howell 51f74a7fd8 provision: Manage digests more rigorously.
We now have two functions related to digests
for processes:

    is_digest_obsolete
    write_digest_file

In most cases we now **wait** to write the
digest file until after we've successfully
run a process with its new inputs.

In one place, for database migrations, we
continue to write the digest optimistically.
We'll want to fix this, but it requires a
little more code cleanup.

Here is the typical sequence of events:

    NEVER RUN -
        is_digest_obsolete returns True
        quickly (we don't compute a hash)

        write_digest_file does a write (duh)

    AFTER NO CHANGES -
        is_digest_obsolete returns False
        after reading one file for old
        hash and multiple files to compute
        hash

        most callers skip write_digest_file

        (no files are changed)

    AFTER SOME CHANGES -
        is_digest_obsolete returns False
        after doing full checks

        most callers call write_digest_file
        *after* running a process
2020-04-20 15:06:47 -07:00
Steve Howell b280f73c77 provision: Extract path_version_digest(). 2020-04-20 15:06:47 -07:00
Steve Howell 2bd836bc4c provision: Promote pygments import to module scope.
There's no real reason to do the lazy import any
more, as we use this unconditionally inside `main`
(indirectly), and `provision_inner` runs after we
have set up the venv.
2020-04-20 15:06:47 -07:00
Steve Howell e66bd6a7a4 provision: Put hash_name argument first (minor). 2020-04-20 15:06:47 -07:00
Steve Howell ca49f38619 provision: Extract helpers for paths to hash.
I make these all functions for consistency,
and in particular I want to continue to avoid
`glob.glob` calls until we are actually
computing hashes.

This is mostly a prep to allow us to do
hashing in two separate places:

    - check hashes
    - update hashes

We would only update hashes **after** running
processes anew.

For `provision_inner` I considered using a
class to put the three path-related helpers
into a mini namespace, but it felt too heavy.

It wouldn't be completely implausible here
to extract something like a JSON config
file that has a list of globs for each
process that we do path-hashing for, but I
want to clean up other stuff first.
2020-04-20 15:06:47 -07:00
Steve Howell 2dd6e6f568 refactor: Add Database.database_exists(). 2020-04-20 15:06:47 -07:00
Steve Howell 4822f8d7d6 refactor: Add Database.template_status.
This is mostly a pure code move from
template_database_status().
2020-04-20 15:06:47 -07:00
Steve Howell 0ea4f727d4 refactor: Change params to template_database_status(). 2020-04-20 15:06:47 -07:00
Steve Howell 108b43c873 refactor: Add Database.what_to_do_with_migrations().
This is purely a code move and s/database/self/.
2020-04-20 15:06:47 -07:00