Commit Graph

391 Commits

Author SHA1 Message Date
Jessica McKellar 12a37ed2b8 Always keep the compose box open after sending.
(Some cases are disabled on outside of staging still due to mix
protection concerns).

(imported from commit 26fcb95c055640ddd87c5df424990ebd865a336a)
2013-07-19 15:48:12 -04:00
Kevin Mehall c7db0f8147 Fix test breakage introduced by 16af5e3
(imported from commit 6945b32a0ae1105c3ad91de5b9f98d39ae0228a5)
2013-07-19 10:49:34 -04:00
Tim Abbott 6a333395ca check-all: Run checks in parallel.
This save most of a second on the runtime for check-all on my laptop.

(imported from commit 16af5e3cbeb1511d9491c1cfb9778bdb19a9fb8c)
2013-07-18 17:54:46 -04:00
Scott Feeney 3395ac2fb1 Allow CasperJS tests to use 'document' & 'window'
(imported from commit f3f3834d723c7b07e7aaff4ce8cab10a72255f22)
2013-07-16 17:53:44 -04:00
Luke Faraone bb0a7c8fc3 [manual] Switch various configuration files to refer to .zulip.net.
We only want to change cases where we're talking about the hostname; HTTP
requests should still go to staging.humbughq.com for now.

Before this commit is deployed the hostname of staging.humbughq.com should
be changed to staging.zulip.net on the VM.

(the same for prod)

(imported from commit 7412530773f720ac227f40061c9ddb1a851e19bb)
2013-07-15 16:49:55 -04:00
Scott Feeney 3942907eec Fix pathname in an update-deployment error message
(imported from commit 1f21593056d4a272c0ad9f7f16ed5664f9d393f1)
2013-07-12 11:59:11 -04:00
Scott Feeney 2c33320746 Reuse minified JS from previous deploys
This is a big change affecting lots of areas:

* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
  minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
  update-prod-static, is used to copy minified JS from a previous
  deploy (i.e., a previous git checkout), if the source files have
  not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
  than Pipeline's compressed_js

Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.

Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.

(Based on code review, this commit has been revised to:
 * Warn if git returns an error in minify-js
 * Add missing output redirects in update-prod-static
 * Use DEPLOY_ROOT instead of manually constructing that directory
 * Use old style formatting)

(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-12 11:59:04 -04:00
Scott Feeney 88d070e182 Convert update-prod-static from shell to Python
(imported from commit 6c362367776bbfa678632adde2379d6e8c0096f3)
2013-07-12 11:59:04 -04:00
Kevin Mehall 8df4857524 Revert to old mark as unread on view behavior.
Effectively reverts 185e865 and b67e52d.

(imported from commit e9b95f1fd9e2ab7926f15910044e9e9879ea085f)
2013-07-11 14:01:26 -04:00
Kevin Mehall d284f6e91f Preliminary stress testing tool.
(imported from commit a94bb7798788870d90423af10959e6a145dc8e85)
2013-07-09 15:56:57 -04:00
Tim Abbott 493d8276e5 update-deployment: Fix buffering argument.
(imported from commit 7a62af4727384d4c1c0f87513aa62c25ab075569)
2013-07-09 14:41:06 -04:00
Tim Abbott 9ddf6b0295 do-destroy-rebuild-database: Default to randomly generated message data.
And use only 1 thread, to work around pylibmc multithreading issues on
OSX.

(imported from commit bb065b611cb67133f727747cec4a0ff568513788)
2013-07-09 14:35:02 -04:00
Steve Howell ca3f2f4c4d Do not buffer deployment output.
(imported from commit a4ffde1096cc8eb5ca64b0feafd33063e6a159d1)
2013-07-09 12:39:21 -04:00
Scott Feeney c42bf9b9b2 Refactor popovers into their own file
(imported from commit 36ad3c61e4d7eb05751f9b886d15edceab656d71)
2013-07-08 18:53:03 -04:00
Steve Howell 0908f15109 Make narrow.by_subject 'read' its message.
(imported from commit e81140c440fecd283443eab46f0c65faffee8df1)
2013-07-08 17:12:32 -04:00
acrefoot fdb597b4d3 v1 Emoji autocomplete
(imported from commit 0b0d4b004936ce4abc37f44317aec414451f3a8e)
2013-07-08 15:26:39 -04:00
Steve Howell aacb5c3da9 Prevent 'function(' in JS code.
(imported from commit 1f86de8786ec9db10c54c1630da633690990859b)
2013-07-05 16:32:33 -04:00
Kevin Mehall 0f6bdafea3 Mark all messages in view as read when you hit the bottom.
Trac #1428

(imported from commit f40d890091528969ae4e4db80adb019cbce60fef)
2013-07-03 17:10:15 -04:00
Kevin Mehall 22c1a66da8 Don't mark messages as read by visibility.
Trac #1428

(imported from commit b67e52d7434220e397ca20ffa49915de6633519c)
2013-07-03 17:10:15 -04:00
Michael McCanna d284c92ea0 Reworded usage help for tools/review
(imported from commit 75595c9fde0ce37ec052c18fbb4b4d35623fe1ce)
2013-07-03 14:16:56 -04:00
Jessica McKellar 5688ee5e57 Provide a function to set the get_updates timeout to 0 for the tutorial.
(imported from commit c904360ffe6fe3cacc9de37d523501a0d45f7176)
2013-07-02 18:26:17 -04:00
Steve Howell 741929008b Add profiled decorator and a tool to show profiler results.
The goal here is to make it easier to do ad hoc profiling on
our codebase, particularly by running tests.

(imported from commit 71da06feb3a369dec8dc4d8391f7f40e4c2d02ff)
2013-07-02 16:47:34 -04:00
Tim Abbott 8dcdf74af8 update-deployment: Wait up to 5 minutes for lock, rather than just failing.
(imported from commit 3677354841d6084f0917acde4baa79f9c8c3d26b)
2013-07-02 11:36:40 -04:00
Tim Abbott 152ba9ccc7 update-deployment: Remove unnecessary arguments.
(imported from commit b28336b1e45de85a7bc24ee89327d19e106cf3cb)
2013-07-02 11:36:40 -04:00
acrefoot b62d7acbc7 W3C Notifications to allow Desktop Notifications in FF too.
Caveats:

- Since Chrome has trouble using W3C Notification when it's not
  initiated by a user gesture, we try to use webkitNotification first.
- FF doesn't allow iconUrl to be of a different origin, so it won't display
  our gravatars

(imported from commit c4f99ce6927a0d203d9f220d50b06737779bd7f8)
2013-06-28 17:30:57 -04:00
Scott Feeney 83cd963c49 Remove unused imports
(imported from commit 9e3050c72a2d1137b9096c6cfa1c3945341b9a56)
2013-06-27 16:22:39 -04:00
Steve Howell 7c9aee1dd0 Check for more Python gotchas in check-all.
Avoid these idioms:
   "foo"(2)
   'foo'(2)
   "Hello %s" % planet

(imported from commit 3a726928d8e4e4f2148ea12d13b709d9adf1a3f1)
2013-06-27 14:41:17 -04:00
Steve Howell 2bacaf2213 Fix % formatting style in miscellaneous places.
(imported from commit 917196024c981f879355c728da9b4590e964eeef)
2013-06-27 14:41:17 -04:00
Tim Abbott 84b073b05c API: Release several additional API calls to users.
(imported from commit 8b32fa126ab76dc80ee775482a9749dff17edf37)
2013-06-25 16:34:45 -04:00
Kevin Mehall bab2c2f93a Don't print an error when nodejs is at /usr/bin/node
(imported from commit d9d7b1d258825c4ea9804eae71dffe54eedc3c1c)
2013-06-24 10:46:36 -04:00
Kevin Mehall fb678e330b Make test-all's check for trailing whitespace give the line number
of the failure.

(imported from commit 721a19145d52c285e134b82c4b0f6e7faa3c64db)
2013-06-24 10:42:16 -04:00
Michael McCanna 425a247569 Fix path injection for tools/review
(imported from commit 25bac426b71a55f29faa232dcac1d957f2941182)
2013-06-21 11:44:40 -04:00
Luke Faraone 7b75dd9cc4 Use different mechanism to determine the running user
Per http://docs.python.org/2/library/os.html#os.getlogin, getlogin()
only works when you have an associated controlling tty.

This script didn't work previously because when we do deployments there
is no tty. Thus, we switch to the alternative mechanism for determining
the current username described on the page linked above.

(imported from commit 1dbcf98fd7248d20e501fd7fb22e1dbd306040fd)
2013-06-19 16:35:35 -04:00
Luke Faraone df1211e6af Make restart-server refuse to run if non-Humbug user on deployment
If you're running this as a user other than "humbug" on a deployed server,
you're going to have a bad time.

Specifically, memcached won't work, and other undefined behaviour may
occur.

So here we add a check and error out if you run this script on an
app_frontend as non-"humbug".

(imported from commit a3d5f0f58ded42393c03f4d21b4650494fae418f)
2013-06-19 08:32:59 -07:00
Tim Abbott 5c1dda5e31 generate-activity-metrics: Use a long time horizon.
Now that we have more than a month worth of data, it's nice to
actually just display it all.

(imported from commit f2ec027af81699d6937e52b18ac40973a54c349b)
2013-06-18 14:59:07 -04:00
Leo Franchi 3fd7c44331 Tweak desktop app JS to support Cocoa WebScript
(imported from commit 6b0c3442f92cffedbd210530479a13d4af5ea266)
2013-06-14 10:46:26 -04:00
Tim Abbott cbbca8319b Restart Tornado _after_ moving the deployment symlink.
Otherwise we end up running Tornado against the _previous_ version of
our code!

Testing of using supervisorctl to stop and then start a process shows
it takes about the same amount of time as doing a supervisorctl
restart, so there's no reason not to split the two commands apart and
make it super clear that nothing is running at the time that we move
the deployment symlink.

(imported from commit c38049da2bfc9fa94320a32dbf3240d1fcba67f7)
2013-06-13 16:32:23 -04:00
Zev Benjamin 614b5396a6 Collect static files directly in the location that will be served
We exclude the original source files for minified files by using a
custom Finder.

(imported from commit a6a25eb6146da53167b71c6d1c44588f75966059)
2013-06-12 17:46:38 -04:00
Zev Benjamin 33fed064e2 Prepend the minified static file header using a custom Storage class
(imported from commit 2b67a6d94de1693bdb8a91f455b92375692f4c41)
2013-06-12 17:46:38 -04:00
Tim Abbott f0f8ce957a humbug-puppet-apply: Pass through arguments like --noop to puppet.
(imported from commit 3ec5c1402acd7910da399f420290c0269a12c525)
2013-06-12 17:19:33 -04:00
Tim Abbott 34904c51a3 Sync the local user's API key into test database.
(imported from commit 999334fea0d922ced506b454163e640a35a30509)
2013-06-12 16:21:10 -04:00
acrefoot da361b9208 jbarnold composebox UI experiment
1) When you send a message, restore the focus to the composebox, targeted at the same recipient
2) If the composebox is completely empty and you press up or down, have that close the composebox and take the appropriate action
3) If you started the compose via a reply option (r, enter, click), don't refocus the composebox if the cursor has changed.

(imported from commit 84545e49d06959eb62e7fd2b22e1387383df6d1d)
2013-06-07 17:39:31 -04:00
acrefoot 0972c1e677 [manual] Modify review to allow testing+review in the background
Does a test-all using /tmp.
Not safe to run with other tests simultaneously.

You use it just like tools/review, and on a successful test-all
it will submit the code review, without tying up your git working directory.

It depends on new patches to the acrefoot-bulk_create_with_id-1.5.1 branch of
django. Updating this is the [manual] step required. Since test-all doesn't happen
on staging or prod, this is not required for this commit to be deployed, but other
django patches will help with the SSL connection errors we've been seeing.

(imported from commit 3fd3ff00240a2d648c4c54748a8a70616067ef7d)
2013-06-06 17:36:02 -04:00
Zev Benjamin 8884e81bb3 Move the current deployment symlink in restart-server
This will help minimize downtime.

(imported from commit 47fb66f0d2e21fc12f62c69b7c59ca6828553309)
2013-06-05 16:33:43 -04:00
Zev Benjamin 300e57fcbd Fill memcached caches synchronously before restarting the server
(imported from commit a45fa845e94a1fc6e96a1aafca31e9a6fc2b7526)
2013-06-05 16:33:43 -04:00
acrefoot 8447174325 Make testing message appear on its own line in code reviews
(imported from commit 5d37c7dc51723d08aac7d12fa71e9d7da0f3f62c)
2013-06-05 15:38:16 -04:00
Tim Abbott 74f70f3915 generate-activity-metrics: Display by-week usage numbers changes.
(imported from commit 22bc1592c35c5f86ab89f7f4fc14ba7dbd2375db)
2013-06-05 10:24:23 -04:00
Tim Abbott 42ddabf91a Do only one bucket, as specified on command line.
(imported from commit 4ca4f9609a01a6cfedc55efdbe2423673bbe4904)
2013-06-05 10:24:23 -04:00
Tim Abbott 6f38feca05 Change display format for metrics
(imported from commit eb87f1958fd52098d8bdcf205efc95cdaad56787)
2013-06-05 10:24:23 -04:00
Leo Franchi b6a3446b62 Refactor to use wildcard/exclusion for all
(imported from commit 2874361aef2cbc14a3047f964eb584f27a29323c)
2013-06-05 10:24:23 -04:00