Commit Graph

12833 Commits

Author SHA1 Message Date
Tim Abbott 0c5f419be0 Annotate test-queue-worker-reload. 2016-10-15 22:36:10 -07:00
Steve Howell a85f9a951a subscriptions: Remove spurious error handling.
Remove error handling in stream_data.add_subscriber() that no
longer makes sense in a world where we track streams that we
are not yet subscribed to.
2016-10-15 21:36:38 -07:00
Steve Howell 6a6f45f525 streams: Handle stream/create event. 2016-10-15 21:36:38 -07:00
Steve Howell dca5a3354e Extract stream_data.create_sub_from_server_data(). 2016-10-15 21:36:38 -07:00
Brock Whittaker baa5de5230 Increase default emoji box size.
Set the default emoji box size height to 140px rather than 60px, so
you can see more than one row of text.
2016-10-15 12:29:05 -07:00
Abhishek Kumar Singh 87c94a8697 docs/writing-views: Fix minor typo.
I found this typo while reading the blog written about
[mypy](http://blog.zulip.org/2016/10/13/static-types-in-python-oh-mypy/)
2016-10-15 12:26:40 -07:00
Tim Abbott 66df520cbe docs: Add a section on CalledProcessorError issues when provisioning.
Inspired by @deekshaarul's work on
https://github.com/zulip/zulip/pull/1939.
2016-10-14 21:29:27 -07:00
Brock Whittaker 33c6960980 New Emoji Popover Dragging Mechanism.
This is a new mechanism to replicate the behavior of Emoji Box
drag-to-resize without the adverse effects of the last iteration — such
as not being able to drag to select text in the compose box.
2016-10-14 21:29:03 -07:00
Tim Abbott 8821b269bf flush-memcached: Replace 'set -x' with more clear output.
Similar to `terminate-psql-sessions`, this was just unnecessary spam
output.
2016-10-14 17:10:06 -07:00
Tim Abbott 382c8853f3 terminate-psql-sessions: Remove set -x.
Now that we're no longer actively debugging this tool, there's no need
to have it print everything it's doing.

This will make `test-backend` a lot nicer to use.
2016-10-14 17:08:05 -07:00
Tomasz Kolek 92bfadcca4 Normalize github pull requests event message.
Add detailed info (description, source and target branch, assignee) to message.
Change subject to 'repo_name / PR #id title'.
Modify some test fixtures for better coverage.
2016-10-14 16:54:13 -07:00
Tomasz Kolek ce9ac30fac Normalize bitbucket pull requests event message.
Add detailed info (description, source and target branch, assignee) to message.
Change subject to 'repo_name / PR #id title'.
Modify some test fixtures for better coverage.
2016-10-14 16:54:13 -07:00
Tomasz Kolek 421c51cc14 Normalize gitlab pull requests event message.
Add detailed info (description, source and target branch, assignee) to message.
Change subject to 'repo_name / MR #id title'.
Modify some test fixtures for better coverage.

Fixes: #1883.
2016-10-14 16:54:13 -07:00
Tomasz Kolek 2941c1f517 Move converting commits data to text to separate function.
Create get_commits_content function for converting
commits list to text.
2016-10-14 16:54:13 -07:00
Tomasz Kolek d2cedd3667 Rename consts in lib/webhooks/git.py to make it more general.
Rename:
   PUSH_COMMITS_LIMIT to COMMITS_LIMIT
   PUSH_COMMIT_ROW_TEMPLATE to COMMIT_ROW_TEMPLATE
   PUSH_COMMITS_MORE_THAN_LIMIT_TEMPLATE to COMMITS_MORE_THAN_LIMIT_TEMPLATE
2016-10-14 16:54:13 -07:00
Tomasz Kolek ee70cc5141 Add git integration method to build message for pull requests events. 2016-10-14 16:54:13 -07:00
Tomasz Kolek 0f01150449 Add bitbucket tests for push, push a lot of commits and force push events. 2016-10-14 16:54:13 -07:00
Tomasz Kolek 165cdb79d9 Rename bitbucket2 fixtures directory to bitbucket.
Rename all bitbucket fixtrues from bitbucket2.* to bitbucket_v2.*.
2016-10-14 16:54:13 -07:00
sonali0901 66a740b5c1 Architecture docs: Reposition backtick for address of Nagios plugin 2016-10-14 16:25:25 -07:00
umkay bfbf07fde2 Update pinned SQLAlchemy requirement to latest upstream version.
The prerequisite to this change is
278574a6ec
2016-10-14 14:45:43 -07:00
umkay 278574a6ec Fix cursor() arguments for connection classes.
In order to use the latest version of psycopg2 with the latest version
of sqlalchemy we must integrate the changes made in the 2.4.6 release of
psycopg2. See
c86ca7687f
and the release notes for psycopg2 2.4.6.
2016-10-14 13:35:06 -07:00
Tim Abbott 0b7b15b361 subs: Reorganize encoding code a bit. 2016-10-14 12:34:01 -07:00
Tim Abbott eb5ef03ec0 subs: Encode stream names before changing stream names. 2016-10-14 12:34:00 -07:00
Mohsen Ibrahim 74baee93fa subs: Encode stream names before updating stream descriptions.
The API uses this endpoint /json/streams/<stream_name> to update
stream information such as description, since the stream_name is
part of the URI it should be encoded to escape unsafe characters.

Fixes #1986.
2016-10-14 12:33:55 -07:00
Rishi Gupta 82b814a1cd analytics: Simplify frequency and measurement interval options.
Change the CountStat object to take an is_gauge variable instead of a
smallest_interval variable. Previously, (smallest_interval, frequency)
could be any of (hour, hour), (hour, day), (hour, gauge), (day, hour),
(day, day), or (day, gauge).
The current change is equivalent to excluding (hour, day) and (day, hour)
from the list above.

This change, along with other recent changes, allows us to simplify how we
handle time intervals. This commit also removes the TimeInterval object.
2016-10-14 10:18:37 -07:00
Rishi Gupta 807520411b analytics: Simplify logic in do_fill_count_stat_at_hour.
Adding FillState, removing do_aggregate_hour_to_day, and disallowing unused
(interval, frequency) pairs removes the need for the nested for loops in
do_fill_count_stat_at_hour. This commit replaces that control flow with a
simpler equivalent.
2016-10-14 10:18:37 -07:00
Rishi Gupta 27d1360e1d analytics: Remove do_aggregate_hour_to_day.
The functionality provided is more naturally done in the views code. It also
allows us to aggregate using day boundaries from the local timezone, rather
than UTC.
2016-10-14 10:18:37 -07:00
Rishi Gupta 655ee51e35 analytics: Add table to keep track of fill state.
Adds two simplifying assumptions to how we process analytics stats:
* Sets the atomic unit of work to: a stat processed at an hour boundary.
* For any given stat, only allows these atomic units of work to be processed
  in chronological order.

Adds a table FillState that, for each stat, keeps track of the last unit of
work that was processed.
2016-10-14 10:18:37 -07:00
umkay 721529b782 analytics: Remove HuddleCount for now.
Planned changes to the underlying analytics model will require potentially
complicated changes to huddle queries.
2016-10-14 10:18:37 -07:00
Umair Khan 7787b780bc Period should be part of the translation. 2016-10-13 15:07:37 -07:00
Umair Khan f1007de0f4 Handle invite remaining translation in JS.
Since we use JavaScript to insert this text, sever side tags will not
be able to handle this translation correctly.
2016-10-13 15:07:37 -07:00
Umair Khan ca0681a98b Use block translation tag where appropriate. 2016-10-13 15:07:37 -07:00
Vikas Parashar 08b61c1b3d Fix z-index of desktop app recommendation banner.
Change banner container's z-index so it's stay on top.

Fixes #1862.
2016-10-13 09:13:45 -07:00
Umair Khan 624f79a892 Use a version of Talon hardcoded to use the --no-ml argument.
This works around https://github.com/pypa/pip/issues/3845, where the
`--install-option` argument was incorrectly polluting other
dependencies).
2016-10-12 22:32:34 -07:00
Steve Howell a845b15a54 casper: Remove then_log_out flakiness and sleep.
We were getting flakes from then_log_out() due to it
making an assert too early.  With this race condition removed,
I can run without the 0.3 sleep.
2016-10-12 22:03:55 -07:00
Tim Abbott ea075dd043 Update translations from transifex. 2016-10-12 09:59:01 -07:00
Tim Abbott 14f6e4c740 scripts: Stop using apt-add-repository.
Unfortunately, apt-add-repository is highly unreliable and was causing
problems both in Travis CI and with developers provisioning their
environment.
2016-10-11 22:10:36 -07:00
Tim Abbott e2810ca1be docs: Update path to update_realm code. 2016-10-11 21:28:14 -07:00
Tim Abbott 8f145e03cf views: split events_register.py from main views file. 2016-10-11 21:27:06 -07:00
Tim Abbott 0c02015541 views: Move one-click unsubscribe to its own file. 2016-10-11 21:27:06 -07:00
Tim Abbott 5b7dfafcac views: Move json_refer_friend to invite.py. 2016-10-11 21:27:06 -07:00
Tim Abbott dd352dd456 views: Move invitation views to their own file. 2016-10-11 21:27:06 -07:00
Tim Abbott 67d9e19ccf views: Split views/auth.py out of core views file. 2016-10-11 21:27:06 -07:00
Tim Abbott dd61f136a5 filter: Add is: to operator_to_prefix logic. 2016-10-11 21:01:01 -07:00
Tim Abbott d2be9241f2 feature_flags: Eliminate always true negated_search feature. 2016-10-11 20:50:47 -07:00
umkay 7e2340155d analytics: Fix aggregation to RealmCount for realms with no users.
Previously, if a Realm had no users (or no streams),
do_aggregate_to_summary_table would fail to add a row with value 0. This
commit fixes the issue and also simplifies the do_aggregate_to_summary_table
logic.
2016-10-11 18:20:58 -07:00
Rishi Gupta 52b56cca65 analytics: Reorder arguments to assertCountEquals.
Require a table argument and change argument order around for clarity.
2016-10-11 18:20:58 -07:00
Kartik Maji 9807ec6539 Fix phrasing when re-subscribing user to a stream. 2016-10-11 18:19:57 -07:00
Kartik Maji 6d57e2a646 stream_data: Remove user from subscriber list on unsubscribe.
This fixes a bug where the .subscribers property of a subscription
object in stream_data wasn't being properly updated to remove the
current user when the current user unsubscribed from the stream.

Fixes #1667.
2016-10-11 18:19:03 -07:00
Tim Abbott c886bd9065 do_update_message_flags: test starring historical messages. 2016-10-11 17:38:39 -07:00