Commit Graph

7762 Commits

Author SHA1 Message Date
Jessica McKellar ebe3acf408 Generalize elide_subject in case the max topic length changes.
(imported from commit 6ffdd42d39580149a83869d6aff88bad8940fe02)
2013-11-22 11:28:19 -05:00
Jessica McKellar 5b01dadfd3 rss-bot: handle feeds that don't have a title.
(imported from commit 2d95ee0cd85ac25a7c0241ce1747509e2f9c6be6)
2013-11-22 11:28:19 -05:00
Tim Abbott c0e951f843 Add user_activity_test worker that does nothing.
This should help us debug the source of our memory leak problems.

(imported from commit 1bdc7ee2f72bdebb1cdc94601247834a434614d6)
2013-11-22 11:24:48 -05:00
Tim Abbott 9ba820703a Call reset_queries in our queue workers.
This fixes a small memory leak in our queue workers, where we don't
reset the accumulated times contained in our query logging data.

Longer-term, we may want to make something mergable for mainline where
we only store on the connection object the totals; that would be a
fixed amount of emmory per connection and thus not have this problem.

(imported from commit 914fa13acfb576f73c5f35e0f64c2f4d8a56b111)
2013-11-22 11:24:48 -05:00
Steve Howell 837b066f49 Turn on huddle list for everybody.
(imported from commit 812106231b192d8b0c0ab7b0e54e25677df56245)
2013-11-22 10:35:35 -05:00
Jessica McKellar ff800cdec3 Set unique client strings for our webhooks.
(imported from commit 48d8a2ec46399104d4f5de30722e65043572c69e)
2013-11-21 22:15:48 -05:00
Steve Howell 8f636bccf6 Triple-quote string in test_dangerous_block() for readability.
(imported from commit f8fdbff9cc992310907957ca0632bb646c726b9f)
2013-11-21 18:10:33 -05:00
Jessica McKellar f8435cde82 Truncate long Freshdesk subjects.
We're getting errors on prod for subjects that are too long.

(imported from commit 742d92745be543d4b33d0888c6653bbee3f86c25)
2013-11-21 17:45:02 -05:00
Jessica McKellar 10c5517414 In Safari, have shift-tab on edit message buttons do the right thing.
Safari doesn't let you (shift-)tab to buttons, so we have to support
this ourselves in several cases.

(imported from commit 1b8ae28d6950fd9686b442948d71ab300c7328dd)
2013-11-21 17:40:04 -05:00
Steve Howell ace12bcab6 Support arbitrarily nested fenced quote/code blocks.
Now we can nest fenced code/quote blocks inside of quote
blocks down to arbitrary depths.  Code blocks are always leafs.
Fenced blocks start with at least three tildes or backticks,
and the clump of punctuation then becomes the terminator for
the block.  If the user ends their message without terminators,
all blocks are automatically closed.

When inside a quote block, you can start another fenced block
with any header that doesn't match the end-string of the outer
block.  (If you don't want to specify a language, then you
can change the number of backticks/tildes to avoid amiguity.)

Most of the heavy lifting happens in FencedBlockPreprocessor.run().
The parser works by pushing handlers on to a stack and popping
them off when the ends of blocks are encountered. Parents communicate
with their children by passing in a simple Python list of strings
for the child to append to.  Handlers also maintain their own
lists for their own content, and when their done() method is called,
they render their data as needed.

The handlers are objects returned by functions, and the handler
functions close on variables push, pop, and processor.  The closure
style here makes the handlers pretty tightly coupled to the outer
run() method.  If we wanted to move to a class-based style, the
tradeoff would be that the class instances would have to marshall
push/pop/processor etc., but we could test the components more
easily in isolation.

Dealing with blank lines is very fiddly inside of bugdown.

The new functionality here is captured in the test
BugdownTest.test_complexly_nested_quote().

(imported from commit 53886c8de74bdf2bbd3cef8be9de25f05bddb93c)
2013-11-21 17:13:17 -05:00
Zev Benjamin 9b2aa657be Revert "restart-server: Use 'all' instead of specifying the supervisor jobs to operate on explicitly"
This reverts commit acef4c0027b77053497ef6e9f7aa4b61703205c3.

Despite the lower total downtime, this caused more user-facing downtime.

(imported from commit 5cce032bb20abe83853a65ee72bf0bb28af403cc)
2013-11-21 15:14:38 -05:00
Allen Rabinovich e10549a310 Lighten the message controls and show them on hover
(imported from commit 09953116ebef779ea99327ff7c76428e908e2e31)
2013-11-21 11:05:07 -08:00
Tim Abbott 654b384980 Disable use_socket for now.
(imported from commit e5b40075b3a418a17ad23e538400db0ccdeebf3f)
2013-11-21 13:50:54 -05:00
Jessica McKellar ae2202caad Update bankruptcy unread count to not include muted topics or read messages.
This should address user reports of huge bankruptcy counts even when
they are relatively caught up. The root issue is that we sometimes
don't mark messages as read for some reason.

(imported from commit 8799305a8665f9ee239575e6e95f603f89c1d427)
2013-11-21 13:01:01 -05:00
Tim Abbott 272e1c2d92 Revert "Don't send heartbeat events to clients that don't request them."
This reverts commit 1147814b22fb9737a807057ddbdbe0e9554086e0.

This seems to with some probability screw up our Zephyr mirroring
script.

(imported from commit 4f82452f1b0ca98e6b895db020e071d2daa325e4)
2013-11-21 12:53:26 -05:00
Tim Abbott c31dbba9cc [puppet] Update pg_hba.conf to include staging's public IP.
This is for the interval while staging is running in VPC and postgres
is not; we can clean up these changes once that's no longer the case.

This also updates test1's IP, which apparently someone forgot to
commit previously.

We're currently running this on prod.

(imported from commit 3feced750f643bb218d4240e9a3d5cd7116963ee)
2013-11-21 11:27:16 -05:00
Tim Abbott d385b35547 Improve copy for new webathena error.
(imported from commit 497f19220d1ab460b6bc0fa4f6bad2dd72733098)
2013-11-21 11:21:10 -05:00
Waseem Daher ce29c4dd34 Prefill the existing topic when editing a message topic.
This is a behavior that basically only administrators can trigger
today, with the exception of the fact that anyone can edit a no-topic
message.

(imported from commit d50eded79ddf3438d87e3dc6a8641fbfb034d50c)
2013-11-21 10:38:36 -05:00
Tim Abbott 8bfbaab1d5 Fix typo in puppet directories for zulip_internal.
(imported from commit 52627a9e71dfc28bedd6c955069da46d3ef56e83)
2013-11-21 10:06:40 -05:00
Leo Franchi c6b862d26d Add desktop sso puppet folder dependencies
(imported from commit 63d8cad722cf015a5925a28ab860431be31175be)
2013-11-20 19:12:53 -05:00
Tim Abbott bfd01454f8 Don't allow Zephyr users to send messages when not linked to webathena.
(imported from commit 03362a52e958aa1913ffb8bfa22ba57fa1697d7c)
2013-11-20 18:54:26 -05:00
Tim Abbott f0c6b63526 [puppet] Add cron job to restart our workers daily.
This is to ensure that if we have an interval where we're not doing
prod deploys, we don't have to worry about worker memory leaks killing
us.

(imported from commit 0b0180b0751f6c618d877b9c9ffc2b8287254e4d)
2013-11-20 18:34:16 -05:00
Tim Abbott 511856eba2 Cleanup event queues when browser windows reload.
(imported from commit ec06517ecc64af1724115bc94a0996a2822e2292)
2013-11-20 18:34:16 -05:00
Tim Abbott 630cfd72f1 Deregister event queues when done in our Nagios scripts.
(imported from commit a1f73403163323e1dd9eda2f5269e94c60abdd1a)
2013-11-20 18:34:16 -05:00
Tim Abbott ca8225cf47 [manual] Add endpoint to cleanup a finished events queue.
This requires a puppet apply on each of staging and prod0 to update
the nginx configuration to support the new URL when it is deployed.

(imported from commit a35a71a563fd1daca0d3ea4ec6874c5719a8564f)
2013-11-20 18:34:15 -05:00
acrefoot 5973f20b69 fix use of EXTERNAL_URL to EXTERNAL_HOST, and some typos
(imported from commit 3e6e0f337671b289202bc86c6224854b6ee623c5)
2013-11-20 17:39:07 -05:00
Zev Benjamin d2d695dcb6 Add an in-memory Client object cache
Client objects are immutable and there are very few of them, so caching them in
memory is cheap and saves a trip to memcached.

(imported from commit 300b9b402f4e509f86a7fd86b5f898dc3f43738f)
2013-11-20 16:55:10 -05:00
Steve Howell 792e0c5976 Add FencedBlockPreprocessorTest.
(imported from commit a7f73f04408288192b33f688bd5baadd362f9458)
2013-11-20 16:06:54 -05:00
Steve Howell 0d920dae87 Extract FencedBlockPreprocessor.placeholder().
(imported from commit cf6dab74ae97a57498e1e1807c7c4f272f3f448b)
2013-11-20 16:06:53 -05:00
Tim Abbott 6c7489ed88 logging: Log management commands that are run.
This could potentially help with debugging exactly what happened with
some issue down the line.

(imported from commit cc7321d742875b644d4727a084b462dcd01dcf10)
2013-11-20 14:31:08 -05:00
Steve Howell 2955cac47e Extract vars in FencedBlockPreprocessor.process_fence().
(imported from commit 092a8e5f7479f1d918219cae058b6a867743c7f9)
2013-11-20 14:30:56 -05:00
Steve Howell b3344c2f49 Move langclass var into FencedBlockPreprocessor.format_code().
(imported from commit e468a8b6a12494facb0dfa97eff90e02cd14f169)
2013-11-20 14:30:55 -05:00
Steve Howell 46838ec6d0 Simplify FencedBlockPreprocessor.format_fence().
(imported from commit 741f4f0640756d545019b6fe6850af3198b351ba)
2013-11-20 14:30:55 -05:00
Steve Howell c0f312ec29 DRY up m.group('code') in FencedBlockPreprocessor.
(imported from commit b23caae1ab63a9adb80025b628bc1a7c6a988ce0)
2013-11-20 14:30:55 -05:00
Steve Howell 6bc25d3d7b DRY up m.group('lang') in FencedBlockPreprocessor.
(imported from commit 9f9ab5604b7df711a3a369247def1277880b0b5f)
2013-11-20 14:30:55 -05:00
Steve Howell 7bb30a96ac Extract FencedBlockPreprocessor.format_fence().
(imported from commit 8a35de7df9ad956496263c82668b118910edd6b3)
2013-11-20 14:30:55 -05:00
Steve Howell 64410fae5e Extract FencedBlockPreprocessor.format_quote().
(imported from commit 59db5415d624402b37ade7fe5547b16f58ae565f)
2013-11-20 14:30:55 -05:00
Steve Howell 9d4b6d0684 Extract FencedBlockPreprocessor.format_code().
(imported from commit 3c98b9a7391a71e9c55a7b5c97abd0ee74178b44)
2013-11-20 14:30:54 -05:00
Zev Benjamin 25c63f08de Use ujson instead of pickle for serializing event queues
(imported from commit 2d90574ae97cc973c9686c2bd557cc199d4b0850)
2013-11-20 14:25:36 -05:00
Zev Benjamin 69e5e2c3d2 Remove old migration code
(imported from commit 5366411706ef296dc14d0d0dd9e2566cb8abb8b7)
2013-11-20 14:25:36 -05:00
Zev Benjamin 06ee83b531 Construct EventQueues externally from ClientDescriptors
(imported from commit 7ef882074ed1c3663939da199d54e4959df8f127)
2013-11-20 14:25:36 -05:00
Tim Abbott 968c393826 Use the new !avatar syntax in our git integration.
(imported from commit e00bc63f6fb1944ed206b3ede5431ac2b1ae1ac2)
2013-11-20 13:10:43 -05:00
Tim Abbott 83e2ba1208 Update signup/invite emails to use the support message for enterprise.
(imported from commit bdec3cb5f6332fdde704c54dfb02f90492329568)
2013-11-20 11:03:38 -05:00
Tim Abbott 3caee45cf4 Fix missing support email address in signup notifications.
(imported from commit f1a4fbe5fbc68292080f87960f038fe530ba87e2)
2013-11-20 11:01:11 -05:00
Tim Abbott 8806ec698a puppet: Increase nginx worker connections limit to match open files.
I want these limits to be at least 40x our current scale.

(imported from commit f22fc40d45292788666e5079ca79bcae683de510)
2013-11-20 10:13:07 -05:00
Tim Abbott ec23996538 puppet: Increase our nginx open file limit.
(imported from commit a002e1df484dcdab8cdbfb2f37ca2281d6f4eecd)
2013-11-20 10:13:07 -05:00
Zev Benjamin 0ad0e18c49 socket: Correctly reference the socket object inside event handlers
(imported from commit d5954007764f5e5e30b15d1af8e9b3c43a3ebde9)
2013-11-19 18:19:15 -05:00
Waseem Daher d78511c933 Convert customer3 page to be about EVENT2.
(imported from commit 6ff4dafb84710fe3a4bb927ed3b8bc0f9ad9fb83)
2013-11-19 18:09:52 -05:00
Jessica McKellar 7b7dd7d8ca Give notifying on sends not in view to everyone.
(imported from commit cae30d82e3647c3b710c568e47cc217457d3ab03)
2013-11-19 17:19:27 -05:00
Jessica McKellar 657e1f1f9a Don't show the out of view banner for messages further down.
This makes the notification slightly more conservative as we do our
initial roll out. In particular, it avoids cases like being notified
when you are almost at the bottom of your feed for a message in your
narrow.

(imported from commit 9c834b1c344d8c429de92fb3512f32494fc02379)
2013-11-19 17:17:33 -05:00