Apparently `manage.py collectstatic` by default strips files starting
with "." from what it collects. This is a reasonably precaution,
though mostly irrelevant to us, since Zulip primarily runs that as
part of build-release tarball, which runs in a clean directory.
It also breaks our current approach for transferring node_modules to
prod machines via release tarballs; this change fixes that bug.
- Add websocket client to create connection with SockJS websocket server.
It contains callback method to launch after connection setup.
- Add '--websocket' parameter to 'check_send_receive_time' script to
check websocket connection.
- Add testing websocket connection to production installation checking.
- Add cronjob to launch websocket connection nagios test.
This makes it possible for Zulip Nagios monitoring to check for
problems impacting the websockets sending code path, which is what all
web users use.
Previously, we got the following as a part of the output when running
`tools/run-dev.py` without provisioning:
It looks like you checked out a branch that has added
dependencies beyond what you last provisioned. Your tests
are likely to fail until you add dependencies by provisioning.
which is a bit confusing.
This finishes clearing unnecessarily excluded items from the global
tools/lint-all exclude list. The remaining items are third-party code
or generated code that doesn't make sense to lint.
Fixes#822.
This required instead exempting these files:
bots/jabber_mirror_backend.py
tools/deprecated/iframe-bot/show-last-messages
Turning on mypy for the API exposes issues in the annotations
of other files.
We used to create endpoints with Client._register.
Now we now have explicit methods for the endpoints.
This allows us to add docstrings and stricter mypy annotations.
This fix also introduces a call_endpoint() method that avoids
the need for manually building urls with API_VERSTRING when you
know the URL pattern of the endpoint you want to hit (and when
the API doesn't have a convenient wrapper).
I fixed a bug with create_users where it now uses PUT instead
of POST.
I also removed client.export(), which was just broken.
I had to change recent-messages and zulip-export, which were
using client.do_api_query and Client._register.
Now it's easier to just call client.call_endpoint() for
situations where our API doesn't have convenient wrappers,
so that's what I did with those scripts.