Commit Graph

290 Commits

Author SHA1 Message Date
Leo Franchi 7b0423efc1 Use incr instead of gauge when sending events to drawAsInfinite to statsd
(imported from commit 08a4b6920c7a4a8f472f147ddce7c04710fe5c0a)
2013-04-19 09:56:41 -04:00
Leo Franchi d02f46fba7 Log a statsd event when restarting the server
(imported from commit e9fa632a39f0a6b6aa7311e80e68faf4178a2cf3)
2013-04-18 18:05:52 -04:00
Tim Abbott 3fa32c8f7d Decrease restart timeouts for django and tornado command lines.
(imported from commit 5653de5e4e39f6ecfade794738d334a360bf2a7e)
2013-04-18 17:15:29 -04:00
Luke Faraone 80e452af82 Include get_messages call in tarball.
(imported from commit ed030c97ba3c34a72eb7ced867c20d1a7c315159)
2013-04-18 09:57:53 -07:00
Tim Abbott a54e8fee1c Add tool used for backing up wiki, trac, events.
This is a slightly tweaked version of the tool Keegan was using for
these backups.

(imported from commit c9fb7f0585c219703130fe1431ea40ca7320408e)
2013-04-17 10:19:13 -04:00
Tim Abbott 6ab480d9c6 restart-server: Call fill_memcached_caches via more direct path.
The previous version ended up being (at least sometimes) wrong after
the recent deployment system changes.

(imported from commit dec3beb1b1bf8b9c9ad6820b93b0a5d730d020e8)
2013-04-17 10:19:13 -04:00
Tim Abbott 104d3c8101 Make tools/send_confirmation_emails_command_line executable.
(imported from commit 3923efcbddaca705a64fb4359adc408c7f948ad4)
2013-04-12 15:37:49 -04:00
Tim Abbott 3ef78dd01c Fix restarting of commands with new deployment loops.
(imported from commit 139d80097d74b1c7f4ec92175a2052b4acf55af1)
2013-04-12 15:35:49 -04:00
Tim Abbott 1b3d93ad47 Fix restarting of various tools during deployments.
(imported from commit b16b8b3d7ce159a91e7d9c3781f1e69861bd3ff3)
2013-04-12 15:35:49 -04:00
Tim Abbott 28c77382d1 Update foo-command-line scripts for new deployment model.
(imported from commit 62a1fc9a5d90966d33afe31bdd5f4b80f6754fad)
2013-04-12 15:03:11 -04:00
Tim Abbott 1b8cf16988 [manual] Update deployment process to run atomically.
This requires manual steps on deploy to each of staging and prod:
(1) Run the new update-deployment code to setup the initial deployment directory.
(2) Restart all the programs running in screen sessions.
(3) Deploy the nginx changes and restart nginx.

(imported from commit 1ffe27933ee79274dc0a93d35c9938712de0ef36)
2013-04-12 11:54:50 -04:00
Tim Abbott 88e2949818 Move update-prod-static etc. out of restart-server.
(imported from commit 763af1c8b1937cda860acc635d9d87c12d66a938)
2013-04-12 11:54:49 -04:00
Leo Franchi 9130f6722f Show latest 5 subjects in sidebar when narrowed to a stream
This is a V1 of this feature. For now, the only way to expand is by narrowing
to the stream---future revisions may add a manual toggle if it is found to be
useful.

Additionally, showing per-subject unread counts will be coming in a future revision
as well.

(imported from commit fb5df0d27e928fa3b0f32b9ff2c1c508202cf7e5)
2013-04-12 11:51:09 -04:00
Keegan McAllister d6aafa260f JSLint: Allow typeof x === 'undefined' for testing if a variable exists
(imported from commit c6429911f65f05ba7ec11c43950d338cfc97b793)
2013-04-10 18:05:00 -04:00
Keegan McAllister 07bb220194 Add a password strength check on the signup page
(imported from commit a44101485e49fd7a7951bda05ba10a021b6d3ee0)
2013-04-10 18:05:00 -04:00
Luke Faraone 2fd4525531 Add process-mailchimp-signups-command-line so we can fire and forget this daemon.
(imported from commit 7a966199da51ec22ae62386d6382ebf05d151f31)
2013-04-05 10:22:27 -07:00
Tim Abbott c65f37c910 do-destroy-rebuild-database: Fix migration with AUTH_USER_MODEL.
Django's South migrations support for setting up a new database
doesn't properly handle AUTH_USER_MODEL changing over time.  Fix this
by having the initial migration be run with AUTH_USER_MODEL set to the
default value.

(imported from commit c373db9edc61f26527c486c741f8e870614600e3)
2013-04-04 17:39:01 -04:00
Tim Abbott a1aae4a39f [South] [schema] Add an index on Userprofile.email.
We accidentally lost this when we did the User/UserProfile merge (this
commit also deletes the old code to add the auth_user index in
do-destroy-rebuild-database).

This below is mostly just notes for future reference, but when
deploying this change to staging, we should consider running the
following instead of using the migration directly:

CREATE UNIQUE INDEX CONCURRENTLY zephyr_userprofile_email_uniq ON zephyr_userprofile(email);
ALTER TABLE zephyr_userprofile ADD CONSTRAINT zephyr_userprofile_email_uniq UNIQUE USING INDEX zephyr_userprofile_email_uniq;
CREATE INDEX CONCURRENTLY zephyr_userprofile_email ON zephyr_userprofile(email);

But I think it might be the case that it's fine to just run it
directly, since the ALTER TABLE part seems to hang if there's an open
transaction working on a UserProfile object anyway.

(imported from commit 1bf34ce242de51e97c91c8bab86b6b273e17fb43)
2013-04-04 15:45:42 -04:00
Zev Benjamin de1f4b0be2 Remove all inline event handlers
This allows blueslip to catch exceptions from the event handlers on
these elements in addition to the other benefits that not using
inline handlers provide.

(imported from commit 2bdcb2496c6c08fa7228a20ce6164b527cf64e41)
2013-04-04 11:34:32 -04:00
Tim Abbott 39e79271e2 test-all: Run frontend tests after backend tests.
When the backend is failing, the frontend often fails in much less
clear ways (e.g. timing out), so it's generally more useful to run the
backend tests first.

(imported from commit 36ac862ad1dbb21e32c0f44ba135c3c29bbea2f5)
2013-04-02 16:27:13 -04:00
Tim Abbott a095666770 test-backend: Don't pass --skip-generate to testing system by default.
It doesn't save much time (maybe 0.5s out of 12+s).

I'm leaving the option in because I think it is still useful for
iteratively testing a single test case.

(imported from commit a0ac43f4c48eec101f05d731740394b30a15773b)
2013-04-02 16:27:12 -04:00
Keegan McAllister 9dd987be7e Precompile Handlebars templates in production
Fixes #908.

(imported from commit 30458e9bea8117d1fa15dc962bb1a495f22672cc)
2013-04-02 14:43:59 -04:00
Keegan McAllister 17d5406b55 [manual] Fetch Handlebars templates using Ajax
...rather than embedding them into index.html.

This is only acceptable for dev, but the next commit adds an alternative
mechanism for prod.

There isn't actually a manual deployment step here.  However, this commit won't
work on staging / prod without the next one (since we don't serve
zephyr/static/templates in prod).

(imported from commit dce7ddfe89e07afc3a96699bb972fd124335aa05)
2013-04-02 14:43:58 -04:00
Keegan McAllister c375de29ad check-all: Ignore node_modules
Which we add in the next commit.

(imported from commit 8b55ec7ac5a62657d9ff28bee39c43d01158f982)
2013-04-02 14:43:58 -04:00
Jessica McKellar 3df47f2025 Do not try to recenter if you were already moving in the right direction.
Before this commit, if you try to arrow around when the selected
message is outside the pointer threshold for recentering, you get a
big jump, even if you are arrowing towards the center of the viewport.

(imported from commit 5c15d5ccccdf027a8bfa8b79bf519fccbfa971d8)
2013-03-28 17:08:25 -04:00
Zev Benjamin 401fa6063e [manual] Add get_events URL routing
The new nginx configuration file needs to be copied to
/etc/nginx/humbug-include and nginx needs to be restarted when this
commit is deployed.

(imported from commit 6c43f3c2c7a6acee6a852c672c96a38bda01dd0d)
2013-03-28 16:48:52 -04:00
Luke Faraone 3738d8215d Update run-dev to prefix match messages/latest.
This means all GET parameters were chopped off previously in local testing.

Nginx does pattern matching so this is not a problem on staging.

(imported from commit 25a28155b70d168228ca793fc0122b2ebea408e9)
2013-03-28 12:53:42 -07:00
Keegan McAllister aa3c446665 Generate source maps from Closure Compiler
(imported from commit 0e4de860b1dba85aa43b60a2c819ac44403186c5)
2013-03-28 12:11:23 -04:00
Luke Faraone 0d51e59fd5 Implement URLs for API redesign.
(imported from commit 2020491a737ec4c1e99a63f84eb6cfc594a2dd56)
2013-03-28 07:57:38 -07:00
Zev Benjamin 878646542f deploy-branch: Check out original ref by name if possible
(imported from commit eefc68574f1d1a94f1284670df18f59ef2aa1aa5)
2013-03-27 14:15:03 -04:00
Leo Franchi dbb2157457 Make home view unread count only count messages newer than the pointer
(imported from commit 0f699ed23f59380b04606bd30600373956f89ae4)
2013-03-26 18:34:16 -04:00
Jessica McKellar eaa2cc702e Autoscroll when you are at the bottom of your message feed.
(imported from commit 7ca92b13c874346f846aea8200a638a7914fe7d6)
2013-03-26 14:05:45 -04:00
Keegan McAllister 6d9aca5f1a Move "page parameters" (email, enter_sends, etc) into a single object
(imported from commit 842b2371bf6364982f1358f1cd2d91118c7fb2bf)
2013-03-26 13:50:03 -04:00
Keegan McAllister a5979f9e6a check-all: Restore failure on pyflakes fatal errors
(imported from commit 28db869c2b184d466e07373cb7ac8b11630780d0)
2013-03-26 13:50:03 -04:00
Keegan McAllister ae45217671 run-dev: Clean repo first
Makes sense because test-all has the same behavior.

(imported from commit 4c4e5ed539bf36fbb5f298abc40f4718dd9a93f1)
2013-03-26 13:50:03 -04:00
Leo Franchi 59228f7458 Run clean-repo before tests in test-all
(imported from commit 49bd072f6f60a742ea9fb7f55c479b8eb8ceb8aa)
2013-03-22 16:22:49 -04:00
Leo Franchi 6263c9ba1e Unify calculation of unread-count for notifications and use it in the title bar
Fixes trac #1004

(imported from commit 6f04d1d3ded198b46cc2ff1733b94b5c17beb581)
2013-03-20 10:09:40 -04:00
Keegan McAllister e8aec9d009 post-receive: Don't actually update servers on push to test-post-receive
Fixes #924.

(imported from commit 85789b39ef2665901c8a7c9560ef072d80d5e24d)
2013-03-18 17:21:13 -04:00
Leo Franchi 79dfe57840 Mark all messages between start of scroll and end of scroll as read
If the user scrolls super fast, our scroll handler might not catch
the user  passing by some messages.

(imported from commit 14cebffcd1321f02443971ac5e1c922db19648ab)
2013-03-15 10:43:17 -04:00
Tim Abbott c0d65124f8 restart-server: Add some output on what's happening as we go.
restart-server has been relatively slow recently, and it'd be nice to
know what it is spending its time doing when it hangs for a few
seconds.

(imported from commit a411c951f5a3f2a1366b6d5d3a40d0660ebec11b)
2013-03-14 15:07:42 -04:00
Tim Abbott 60c3cf826d restart-server: Fill memcached caches after clearing the cache.
Our previous code could in theory end up clearing the caches it had
just filled, if Tornado's cache filling work happened to be faster
than the memcached flush.

(imported from commit 48174aadad398fb7a7c917a1df765c1261b12a55)
2013-03-14 15:07:41 -04:00
Leo Franchi 7510f87eac Select first unread when narrowing by clicking on stream in sidebar
(imported from commit 557751f44e3fee61b6a55f8f8328e2f97e6adc04)
2013-03-14 15:01:13 -04:00
Leo Franchi ff42774551 Refactor unread client handling to use 'read' flags per message
(imported from commit ca48745396e7fbac456e5eb2e7dbe4adc62b3492)
2013-03-13 14:14:45 -04:00
Leo Franchi 0df3d5f2aa Give create db permissions to humbug postgres user
(imported from commit 85775d1885efcd8790593e6841ce9d56f027eea7)
2013-03-12 12:51:12 -04:00
Waseem Daher 33dc3a2fb7 Properly start tutorial on first run, even if you have new messages.
We were previously having an issue where the tutorial could
be pre-empted if you got a few messages while you were first
logging in.

I have some reservations about this being slightly fragile, and a
better approach might be to just have a bit that we use to determine
whether or not you've already seen a tutorial. (Or potentially that
checks whether or not you've ever sent a message.)

(imported from commit f8858f64a36bcd25887b76314caff283929f340c)
2013-03-12 09:56:57 -04:00
Zev Benjamin dc0913077a Add a new frontend error-reporting system
The new system, called blueslip, makes errors fatal when in debug
mode and only output a message when running in production.  In the
future, it could also send user errors back to us automatically.

(imported from commit 1232607c0311e885c8b5a5e8a45ffb28822426e0)
2013-03-11 13:22:12 -04:00
Tim Abbott d679a72952 [manual] Cache results of the Twitter API in the database.
This should substantially improve the repeat-rendering time for pages
with large numbers of tweets since we don't need to go all the way to
twitter.com, which can take like a second, to render tweets properly.

To deploy this commit properly, one needs to run

./manage.py createcachetable third_party_api_results

(imported from commit 01b528e61f9dde2ee718bdec0490088907b6017e)
2013-03-11 13:15:55 -04:00
Zev Benjamin d05ac105fe Move clear_table into MessageList
(imported from commit 138c3103920413580f86fede115843ecfddc0691)
2013-03-05 12:48:32 -05:00
Zev Benjamin f6ba728a24 Move message rendering into the MessageList
(imported from commit c1e16b1d2fafe5c079991e7ae96a013e25bc8618)
2013-03-05 12:48:32 -05:00
Zev Benjamin 95309539bc Move same_{stream_and_subject,recipient,sender} into the util module
(imported from commit 0d79bc3ae29be16eba59acea8bc5fda2aba1d4de)
2013-03-05 12:45:12 -05:00