Commit Graph

23780 Commits

Author SHA1 Message Date
Greg Price 07969a2b0c test-install: Share the tarball directory between host and container.
This greatly simplifies iterating on changes to the installer and
associated code: just edit in the shared directory (or edit in your
worktree and rsync to the directory), and rerun.

With this change, the form with a directory is now really the main
way to run the script; the form accepting a tarball is really just
a convenience feature, unpacking the tarball and then proceeding with
that directory.
2018-01-22 18:55:46 -08:00
Greg Price d7e2190b85 test-install: Pass options through to the installer.
This will facilitate testing interesting installer features
using its own CLI.

On my laptop, with a recent base image (updated a few days ago with
`prepare-base`), it takes just 7 or 8 seconds to get to the installer
running, as timed by passing `--help` so that the installer promptly
exits.
2018-01-22 18:55:45 -08:00
Greg Price de7abd8f78 test-install: Upgrade CLI parsing, with getopt.
This will let us add more options without the CLI collapsing under
its own weight.
2018-01-22 18:55:45 -08:00
Cynthia Lin 7d8cd37035 modals: Dynamically replace keyboard shortcuts for Mac OS.
Fixes #3577.
2018-01-22 19:41:17 -05:00
Cynthia Lin d449fcb309 user docs: Dynamically replace keyboard shortcuts for Mac OS. 2018-01-22 19:41:17 -05:00
YJDave 2691c27126 stream settings: Hide create-stream-btn if user not allowed. 2018-01-22 18:26:36 -05:00
YJDave 01510c1e8f all streams: Show lock-icon for subscriber count, if user can't access.
Previoulsy, we display "0 subscribers" if user can't access stream's
subscribers. Replace subscriber count with lock icon in case of
unsubscribed private stream, in "All stream" list.
2018-01-22 18:26:36 -05:00
YJDave 81599cf906 stream settings: Display warning if user can not access subscribers.
Display warning, saying "You can not access private stream subscribers,
in which you aren't subscribed", if user can not access subscribers;
instead of showing zero subscriber to stream.
2018-01-22 18:26:36 -05:00
YJDave 8f65de1970 stream settings: Always show stream type, regardless of subscribed or not. 2018-01-22 18:26:36 -05:00
YJDave c22285c154 stream settings: Allow org admin to update settings of unsub-stream.
As per backend validations.
2018-01-22 18:26:36 -05:00
Eeshan Garg 3189388258 api docs: Show Python and JavaScript examples first.
It makes sense to make our Python and JS API examples more visible
than our curl examples, since Python is what most people will tend
to use.

Also, from a design perspective, an API documentation page that
starts off with a shiny Python example with syntax highlighting
looked much better than having a bland curl example be the first
thing readers see.
2018-01-22 18:10:29 -05:00
Eeshan Garg 96362e8e60 api docs: Move code examples farther up. 2018-01-22 18:10:29 -05:00
Eeshan Garg 668ac28b85 api/sidebar.md: Move "REST API" to the bottom. 2018-01-22 18:10:29 -05:00
Eeshan Garg 00d3f19c0a integrations/email: Render settings.EMAIL_GATEWAY_EXAMPLE correctly. 2018-01-22 18:05:20 -05:00
Balaji2198 41685105db api/update-message: Make it render correctly in Github. 2018-01-22 15:35:49 -05:00
Balaji2198 992b416802 api/delete-queue: Add Python syntax highlighting. 2018-01-22 15:35:49 -05:00
rht 953478a189 katex: Update the `require` path to point to the new one.
This fixes #7620.
2018-01-20 08:09:17 -05:00
Aditya Bansal efbddce34d settings_user_groups.js: Add 100% node test coverage. 2018-01-20 08:01:06 -05:00
Aditya Bansal 40f161ca63 settings_user_groups.js: Remove unnecessary call to get a person. 2018-01-20 08:01:06 -05:00
Greg Price bf5f1b5f20 install: Start on an LXC-based dev/test environment for the installer.
In order to do development on the installer itself in a sane way,
we need a reasonably fast and automatic way to get a fresh environment
to try to run it in.

This calls for some form of virtualization.  Choices include

 * A public cloud, like EC2 or Digital Ocean.  These could work, if we
   wrote some suitable scripts against their APIs, to manage
   appropriate base images (as AMIs or snapshots respectively) and to
   start fresh instances/droplets from a base image.  There'd be some
   latency on starting a new VM, and this would also require the user
   to have an account on the relevant cloud with API access to create
   images and VMs.

 * A local whole-machine VM system (hypervisor) like VirtualBox or
   VMware, perhaps managing the configuration through Vagrant.  These
   hypervisors can be unstable and painfully slow.  They're often the
   only way to get development work done on a Mac or Windows machine,
   which is why we use them there for the normal Zulip development
   environment; but I don't really want to find out how their
   instability scales when constantly spawning fresh VMs from an image.

 * Containers.  The new hotness, the name on everyone's lips, is Docker.
   But Docker is not designed for virtualizing a traditional Unix server,
   complete with its own init system and a fleet of processes with a
   shared filesystem -- in other words, the platform Zulip's installer
   and deployment system are for.  Docker brings its own quite
   different model of deployment, and someday we may port Zulip from
   the traditional Unix server to the Docker-style deployment model,
   but for testing our traditional-Unix-server deployment we need a
   (virtualized) traditional Unix server.

 * Containers, with LXC.  LXC provides containers that function as
   traditional Unix servers; because of the magic of containers, the
   overhead is quite low, and LXC offers handy snapshotting features
   so that we can quickly start up a fresh environment from a base
   image.  Running LXC does require a Linux base system.  For
   contributors whose local development machine isn't already Linux,
   the same solutions are available as for our normal development
   environment: the base system for running LXC could be e.g. a
   Vagrant-managed VirtualBox VM, or a machine in a public cloud.

This commit adds a first version of such a thing, using LXC to manage
a base image plus a fresh container for each test run.  The test
containers function as VMs: once installed, all the Zulip services run
normally in them and can be managed in the normal production ways.

This initial version has a shortage of usage messages or docs, and
likely has some sharp edges.  It also requires familiarity with the
basics of LXC commands in order to make good use of the resulting
containers: `lxc-ls -f`, `lxc-attach`, `lxc-stop`, and `lxc-start`,
in particular.
2018-01-19 17:27:04 -08:00
ihsavru a5be1fb109 lightbox: Fix responsiveness issues with image description.
Fixes #7789
2018-01-19 17:12:38 -08:00
akashnimare 37c792aee5 apps: Update desktop app to latest release. 2018-01-20 00:46:31 +05:30
YJDave 8905744bb1 stream settings: Add period at the end of error messages. 2018-01-19 13:05:43 -05:00
Aditya Bansal 1324d2e3c0 reminders: Make shortcuts to setup reminder in message feed work. 2018-01-19 11:33:11 -05:00
Aditya Bansal 7d8d7f7f9b reminders: Add alert message for set reminder success or failure. 2018-01-19 11:33:11 -05:00
Aditya Bansal 0f71a7ecca reminders: Add UI for setting up reminders for messages in the feed. 2018-01-19 11:33:11 -05:00
Aditya Bansal 732321818d scheduledmessage: Adjust schedule_message to accept callbacks. 2018-01-19 11:33:11 -05:00
Aditya Bansal 76f6f7cb47 datetimepicker: Add flatpickr lib as dependancy. 2018-01-19 11:33:11 -05:00
Aditya Bansal 9efc1b08a1 reminders: Add slash command to set reminders from reminder bot. 2018-01-19 11:33:11 -05:00
Aditya Bansal f272ea9087 scheduledmessages: Start using/expecting delivery_type as a param. 2018-01-19 11:33:11 -05:00
Aditya Bansal dcce8e7219 scheduledmessages: Add delivery_type field to the table. 2018-01-19 11:33:11 -05:00
Aditya Bansal c770bdaa3a reminder_bot: Add infra for adding reminder bot to every realm. 2018-01-19 11:33:11 -05:00
Aditya Bansal 5a794f9871 compose.js: Add schedule_message() to handle scheduling of messages.
In this we add code to support '/remind' command for causing
messages to be scheduled.
2018-01-19 11:33:11 -05:00
Aditya Bansal b71ed33e64 compose: Extract the 'Sending...' from template to be added with Js.
In this we change the way 'Sending...' is displayed. Instead of
hardcoding it into the template we make change the paradigm so
that we can have a flexible message about what's happening
rather than just always saying 'Sending...'. For eg. this will
help in the upcoming feature of Scheduled Messages by having this
message say 'Scheduling...'.
2018-01-19 11:33:11 -05:00
Aditya Bansal f46d098558 schedulemessages: Add handle_deferred_message() to handle requests.
This is responsible for:
1.) Handling all the incoming requests at the
messages endpoint which have defer param set. This is similar to
send_message_backend apart from the fact that instead of really
sending a message it schedules one to be sent later on.
2.) Does some preliminary checks such as validating timestamp for
scheduling a message, prevent scheduling a message in past, ensure
correct format of message to be scheduled.
3.) Extracts time of scheduled delivery from message.
4.) Add tests for the newly introduced function.
5.) timezone: Add get_timezone() to obtain tz object from string.
This helps in obtaining a timezone (tz) object from a timezone
specified as a string. This string needs to be a pytz lib defined
timezone string which we use to specify local timezones of the
users.
2018-01-19 11:33:11 -05:00
Brock Whittaker 6b03e25382 help: Add "Add a link preview" documentation.
This is a server setting so I created the section "Server settings" in the help sidebar for this to go under, and rewrote the copy and retook the images that were originally done by @Privisus due to some issues.
2018-01-19 06:15:30 -05:00
rht ee06da9350 bugdown: Linkify Bitcoin URI. 2018-01-19 06:07:43 -05:00
Umair Khan ea8f1efb63 tests: Re-raise exception if not import error. 2018-01-19 06:02:05 -05:00
Umair Khan 8f316183e0 tests: Make import error tracebacks terse.
This will also disable exception chaining; we do not need it here.
2018-01-19 06:02:05 -05:00
Greg Price 9565a5375f version: Belatedly bump PROVISION_VERSION.
This should have been done in 167a71292 yesterday, which added a
library to requirements; oops.
2018-01-18 17:46:37 -08:00
Greg Price e68f426286 docs/production: Revise doc on authentication methods.
Hopefully this version makes it somewhat clearer how the different
methods relate to each other, how to choose between them, what
`ZulipRemoteUserBackend` is for, and how the latter works.
2018-01-18 17:45:03 -08:00
Tarun Kumar 9b7b600772 user docs: Fix screenshot in TeX documentation.
Changes the screenshot to use $$ instead of $.
2018-01-18 16:42:15 -08:00
Vishnu Ks 7dbb4cdae2 uploads: Remove ExceededQuotaError class.
We are no longer using it.
2018-01-18 15:38:08 -08:00
Steve Howell a5e55cee9b bot docs: Clean up "Testing a bot's output".
The main cleanup here is to move the examples out of the bulleted
list, which was getting rendered in an ugly/confusing way.

I also removed some redundant text, fixed some typos, and changed
the wording a bit.
2018-01-18 16:09:24 -05:00
Sampriti Panda 6c32379985 compose: Fix browser extensions interfering with compose box.
Make sure that clicks outside <body> triggered by extensions
don't close the compose box.
2018-01-18 15:53:06 -05:00
Tim Abbott b04bb1a973 locale: Update translation files.
This includes adding the new Turkish language.
2018-01-18 09:13:05 -08:00
Tim Abbott 2c16c76551 beeminder: Fix buggy coding tag at top of file. 2018-01-18 09:07:06 -08:00
Umair Khan a994dba583 tests: Give more descriptive import error.
This code takes care of the environment running Python 3.4 when
test label is passed directly to the test-backend command:
./tools/test-backend test_alert_words
2018-01-18 07:13:26 -05:00
Umair Khan 0eda941822 tests: Verify imports in test modules. 2018-01-18 07:13:26 -05:00
Umair Khan 7248a3366b tests: Change print_error_message to check_import_error. 2018-01-18 07:13:26 -05:00