Commit Graph

22907 Commits

Author SHA1 Message Date
Harshit Bansal d9c2f613e3 api: Add new endpoint for reactions.
This endpoint will allow us to add/delete emoji reactions whose emoji
got renamed during various emoji infra changes. This was also a
required change for realm emoji migration.

This commit was tweaked significantly by tabbott for greater clarity
(with no changes to the actual logic).
2017-11-16 20:52:15 -08:00
Vishnu Ks 40fca20c51 droplets: Run git clean -f after creating droplet. 2017-11-16 19:47:42 -08:00
Vishnu Ks 75601f660d droplets: Always rebase instead of merge during git pull. 2017-11-16 19:47:42 -08:00
Greg Price 3828305305 error_notify: Try `git describe` too.
Tested for graceful degradation both with `git` not existing and the
`.git` directory not existing.
2017-11-16 19:15:12 -08:00
Greg Price 41ecdd8d83 error_notify: Add some idea of the deployed code version.
Tested in dev with the help of our handy /emails/ display.
2017-11-16 19:15:12 -08:00
Greg Price 4b5c52fc99 queue: Prevent an AttributeError rather than swallowing it.
When the RabbitMQ server disappears, we log errors like these:

```
Traceback (most recent call last):
  File "./zerver/lib/queue.py", line 114, in json_publish
    self.publish(queue_name, ujson.dumps(body))
  File "./zerver/lib/queue.py", line 108, in publish
    self.ensure_queue(queue_name, do_publish)
  File "./zerver/lib/queue.py", line 88, in ensure_queue
    if not self.connection.is_open:
AttributeError: 'NoneType' object has no attribute 'is_open'

During handling of the above exception, another exception occurred:
[... traceback of connection failure inside the retried self.publish()]
```

That's a type error -- a programming error, not an exceptional
condition from outside the program.  Fix the programming error.

Also move the retry out of the `except:` block, so that if it also
fails we don't get the exceptions stacked on each other.  This is a
new feature of Python 3 which is sometimes indispensable for
debugging, and which surfaced this nit in the logs (on Python 2 we'd
never see the AttributeError part), but in some cases it can cause a
lot of spew if care isn't taken.
2017-11-16 18:33:14 -08:00
Brock Whittaker 16d06c6a78 portico-header: Remove border between image and realm name.
This removes the border between the realm image and the realm name in
the portico header that is shown when logged in.
2017-11-16 16:03:24 -08:00
Greg Price 0cc8d243e4 build-release-tarball: Fold away the confusing variable TMP_CHECKOUT.
Even where this is actually used for a temporary checkout, it obscures
the relationship between this and $TMPDIR -- and some of our logic
depends on that.  In other places, it isn't actually even a checkout.
In all cases, the expanded version is clearer.
2017-11-16 15:54:34 -08:00
Greg Price 3d1211edcf build-release-tarball: Cut a recently-obsoleted comment.
We no longer use .gitattributes for this purpose (since bfaf0fb3b),
so this comment isn't true anymore.
2017-11-16 15:54:34 -08:00
Greg Price 18f9e18324 build-release-tarball: Drop likely-bitrotted macOS support.
This script, and tools/update-prod-static which it relies on,
have kept getting more complex since this conditional was added
in 2013, and the places we rely on GNU features have probably
multiplied beyond `mktemp -d`.  It's unlikely this works on
macOS with BSD tools now, and it'd be hard to maintain that way
if it did; drop the pretense.
2017-11-16 15:54:34 -08:00
Greg Price 5a2f3fe9c2 build-release-tarball: Reorder a bit for clarity.
This puts our fiddling with the update-prod-static logfiles
immediately after we run update-prod-static.
2017-11-16 15:54:34 -08:00
Greg Price 93fbffebd7 build-release-tarball: Cut a redundant cleanup step.
There's no need to remove this file here -- the whole tree will be
removed a few commands later, and the `tar` command we do first, to
supplement our tarball with various generated files, is quite
selective and wouldn't look at this file anyway.
2017-11-16 15:54:34 -08:00
Greg Price 09a38ec5dc build-release-tarball: Cut a long-stranded comment.
This comment only made sense for about one week, in 2013;
the setting it points at was removed in e6ca5d265.
2017-11-16 15:54:34 -08:00
Greg Price 8d405da96c build-release-tarball: Use set +x consistently. 2017-11-16 15:54:34 -08:00
Greg Price 92e322a9d1 build-release-tarball: Add --authors-not-required.
This makes it not real annoying to run this in a development loop.
2017-11-16 15:54:34 -08:00
Eeshan Garg ae6d30b60e requirements: Upgrade to fakeldap 0.6.1.
Tweaked by tabbott to remove the unnecessary GitHub indirection.
2017-11-16 15:23:44 -08:00
Sampriti Panda a696141a25 search: Add more extensive logging for Unicode errors in highlight_string.
Tweaked by tabbott to provide finer-grained logging.
2017-11-16 15:08:16 -08:00
Mohd Ali Rizwi 66d658d7f1 docs: Use `git clone -c` to set `git pull` to rebase by default.
This updates the developer documentation to recommend `git clone -c`
to set the git pull mode to be rebase by default in the repository
configuration.

The hope is that this will help minimize how often new contributors
end up accidentally messing up their PRs by using `git pull`.

Tweaked by tabbott to fix broken links and optimize the language.

Fixes: #7022.
2017-11-16 14:35:02 -08:00
KiranS 92caa4abab docs: Add more troubleshooting cases to Vagrant guide. 2017-11-16 14:12:38 -08:00
Rishi Gupta 1a360ecd20 portico: Add code of conduct features to for/open-source.md.
We got asked about this from a potential user, and they seemed fairly
excited and confused by it. In particular, it wasn't obvious that
deactivating a user was the feature they were looking for.
2017-11-16 14:05:49 -08:00
Rishi Gupta 549401ede4 docs: Update emoji.md to explain new naming scheme. 2017-11-16 14:05:49 -08:00
Tim Abbott e1f8d24166 lint: Fix tools tests.
These were broken when Travis wasn't running properly.
2017-11-16 13:59:40 -08:00
derAnfaenger 6a72fcff9c docs: Fix outdated bots guide link. 2017-11-16 13:58:07 -08:00
Tim Abbott 2563f93d46 test-help-documentation: Pass use_db=True.
With the new portico work we've done, the help documentation does
sorta depend on the database if you're logged in.  So it's best to
just require it for these tests.
2017-11-16 13:44:53 -08:00
Tim Abbott cb4acf2aa4 docs: Lint rst files for trailing whitespace. 2017-11-16 13:20:50 -08:00
Tim Abbott d9da8f859d lint: Check for absolute/relative link style in developer docs.
This should help avoid a pretty wide range of link bugs we've had in
the past.
2017-11-16 12:44:16 -08:00
Tim Abbott bf77ad3a6e docs: Clean a few files of too-long lines.
We also document why the rest of them are still on the list.
2017-11-16 11:49:00 -08:00
Greg Price 011114397b docs: Fix some Markdown links missing a close-paren.
These were just introduced today.
2017-11-16 11:43:19 -08:00
Tim Abbott 6973f1d1ef docs: Fix unnecessary absolute links in docs/. 2017-11-16 11:39:59 -08:00
Tim Abbott 7c24e04223 lint: Fix long lines in README.md. 2017-11-16 11:38:13 -08:00
Rhea Parekh 8c4651d716 zerver/lib/actions.py: Fix translation bugs.
Fixes #7396.
2017-11-16 11:05:49 -08:00
Tim Abbott 638eb7a8e4 docs: Update links to ReadTheDocs to always use https.
This is better security practice.

We also add a lint rule to enforce this for the future.
2017-11-16 10:59:24 -08:00
Tim Abbott 054952a44a docs: Update links from codebase to point to ReadTheDocs. 2017-11-16 10:53:49 -08:00
Tim Abbott 07c2b205a4 docs: Update absolute links to point to new URLs.
This should get test-documentation and test-help-documentation passing
again after we moved everything around in the last commit.

There are a lot more absolute links (generally in code comments) to
update, but they are lower-priority and can be done in a follow-up
pass.
2017-11-16 10:08:22 -08:00
David Rosa Tamsen 7072fa5b37 docs: Reorganize developer docs to improve navigation.
This commit helps reduce clutter on the navigation sidebar.
Creates new directories and moves relevant files into them.
Modifies index.rst, symlinks, and image paths accordingly.

This commit also enables expandable/collapsible navigation items,
renames files in docs/development and docs/production,
modifies /tools/test-documentation so that it overrides a theme setting,
Also updates links to other docs, file paths in the codebase that point
to developer documents, and files that should be excluded from lint tests.

Note that this commit does not update direct links to
zulip.readthedocs.io in the codebase; those will be resolved in an
upcoming follow-up commit (it'll be easier to verify all the links
once this is merged and ReadTheDocs is updated).

Fixes #5265.
2017-11-16 09:45:08 -08:00
Harshit Bansal 3b95a6d2d9 bugdown: Fix a bug in the updation logic of markdown engines.
While fixing an issue related to email gateway messages not getting
rendered properly, I unknowingly introduced a bug in the markdown
engine updation code. This commit fixes it. The issue was that for
a realm having email gateway setup, updation of realm filters would
lead to the updation of only one of the markdown engines not both.
2017-11-15 22:47:11 -08:00
Harshit Bansal b849c5e551 bugdown: Remove an unnecessary check in `do_convert()`. 2017-11-15 22:47:11 -08:00
Harshit Bansal 5e5bb02e39 bugdown: Remove `make_realm_filters()`.
This commit removes `make_realm_filters()` and merges its functionality
in `make_md_engine()` and `maybe_update_markdown_engines()`.
2017-11-15 22:47:11 -08:00
Harshit Bansal f9f9e92443 bugdown: Correct the descriptions of `Bugdown` config. 2017-11-15 22:47:11 -08:00
Harshit Bansal e615a2ab4f bugdown: Simplify the "opts" parameter of `make_md_engine()`. 2017-11-15 22:47:11 -08:00
Harshit Bansal e3f2f67d0e bugdown: Rename `maybe_update_realm_filters()`.
This commit renames `maybe_update_realm_filters()` to
`maybe_update_markdown_engines()` which sounds closer
to the semantics.
2017-11-15 22:47:11 -08:00
Tim Abbott 64230b3bd5 populate_db: Remove the 'simple' realm.
The 'simple' realm was super broken and confusing for new users.  We
should replace this with having an easy way to make a new realm in
development, done properly.

Fixes #6116.
2017-11-15 22:42:05 -08:00
Umair Khan 98be0cc502 user-groups: Send delete user group event.
Fixes #7380
2017-11-15 22:35:43 -08:00
Umair Khan cc76f7deac user-groups: Create check_delete_user_group. 2017-11-15 22:35:43 -08:00
Umair Khan 79f4a7627f user-groups: Send remove members event. 2017-11-15 22:35:23 -08:00
Umair Khan cec3f19366 user-groups: Send add members event. 2017-11-15 22:35:23 -08:00
Umair Khan eb48fab495 user-groups: Send description update event. 2017-11-15 22:35:23 -08:00
Umair Khan 5571122120 user-groups: Send name update event. 2017-11-15 22:35:23 -08:00
Umair Khan 912505317a user-groups: Send create group event. 2017-11-15 22:35:23 -08:00
Umair Khan 31efe951b7 user-groups: Fix function argument bug; pass group.
In remove_members_from_group_backend, we are passing user group to
remove_members_from_user_group. In remove_members_from_user_group,
expect user_group_id.
2017-11-15 22:35:23 -08:00