Commit Graph

331 Commits

Author SHA1 Message Date
Tim Abbott bf52fcff8a humbug_trac: Make notifications for comments configurable.
(imported from commit 8eeea4051194d0038b039befd9b9a0ee4099a30c)
2013-02-14 11:14:48 -05:00
Tim Abbott 818bf4d6e9 humbug_trac: Make which field changes cause notifications customizable.
(imported from commit 91b138a0eaf3c3773752ae3a4c4599bd5c095497)
2013-02-13 16:30:30 -05:00
Tim Abbott be57fa8a76 Split out Trac plugin configuration (and de-duplicate the plugin).
(imported from commit aa3cd2c5a376315a463bf564ba57d751e36431d6)
2013-02-13 16:30:30 -05:00
Tim Abbott bedf1dd563 api: Make call_on_each_message restart if 'last' is too old.
This should fix the symptoms of the problem we've been having where a
few API clients using the MIT Zephyr mirroring system sometimes seem
to end up with a too-old value of last.

(imported from commit 9f2426fa6a7e8365e8d3443bfd2cce3238cc9510)
2013-02-13 08:14:09 -05:00
Zev Benjamin ae97854d17 Bump API version number for addition of integrations/ directory
(imported from commit c5990ef963b5e7b7919fdef9f461a75e82015113)
2013-02-12 16:11:20 -05:00
Jessica McKellar 73331f1e18 api: Add a list-members example script for the /get_members query.
(imported from commit 2fc213b746eb032b98d86f933ce69e7cbe9822d1)
2013-02-11 13:45:47 -05:00
Jessica McKellar 8bbb88fc29 api: Add get_members to the Python bindings.
(imported from commit 446453e0cd355f37876a2233bbfa024a96f3a6a8)
2013-02-11 13:45:46 -05:00
Waseem Daher 2660db7e18 api: Move integrations into their own subdirectory.
(imported from commit e1a64fbbc64e64e7a2c2fdda4cc9bc77ff3bc852)
2013-02-07 14:15:44 -05:00
Waseem Daher 8f573fac4c Simplify the Trac integration plugin options slightly.
(imported from commit 4588d70f4e7664a9ba85be7003e17d4e8f55a333)
2013-02-06 17:37:44 -05:00
Zev Benjamin b0b304e58b Add a copy of our Trac integration (with example constants) to the API examples
(imported from commit 4e7bfaf92842ae0bb24c28ae1187d83ca5c44b0e)
2013-02-06 11:45:43 -05:00
Luke Faraone 71e98baad4 We no longer require requests<<1
(imported from commit 2ddfca4f969a4f0cba3851c8123b1a3427f63509)
2013-02-05 16:35:45 -05:00
Luke Faraone 61d8183a71 Be more explicit as to where .humbugrc goes
(imported from commit 3e229d61ebfef64e29ca45cc57eca04ec207ae86)
2013-02-05 16:35:45 -05:00
Luke Faraone fc7b6e9fb0 Invert check for .json() vs .json in requests.
dd74cadb incorrectly used .json when it should have used .json(), and
vice-versa.

(imported from commit 2a1d0bbaece77e6765c430ddf3e8de5d987194ae)
2013-02-05 16:34:16 -05:00
Tim Abbott a5f2bec873 api: Fix running with requests 1.0.x.
I would prefer to be testing the attribute itself rather than the
version, but it's not easy to access without an actual request object,
and I'd prefer to compute this once-and-for-all on startup, rather
than on each request, since the latter just seems fragile.

(imported from commit dd74cadb1b2359faeb3e1b482faeee4003dfad77)
2013-02-05 16:08:46 -05:00
Jessica McKellar d30c8b857e Only include send_message-related examples in API release.
(imported from commit 058a121b4b3c6b2829396c3c7a1007656a9e09da)
2013-02-05 14:09:29 -05:00
Luke Faraone 8e0ed8eb07 Update README to document new layout and installation instructions.
(imported from commit ba4d8c4db31ef572b53f49b6792b926236bea553)
2013-02-01 15:52:28 -05:00
Luke Faraone 0e4f1b6d24 Basic setup.py script for API
Refer to the API version via an import.

(imported from commit ef28f4edc0d519b4c6a49ef414279685a3d38202)
2013-02-01 15:52:28 -05:00
Luke Faraone 57e0d37249 Move files around in the API.
Bots are not part of what we distribute, so put them in the repo root.

We also updated some of the bots to use relative path names.

(imported from commit 0471d863450712fd0cdb651f39f32e9041df52ba)
2013-02-01 15:52:28 -05:00
Leo Franchi 6e9b8d895c Add munin plugin for send-receive timing
(imported from commit e2ae0775379ce59ab43213e68ade4d3f88b578e6)
2013-01-31 13:02:57 -05:00
Leo Franchi 6e3e6f00bd Add a proof of concept polling twitter bot
(imported from commit ededca33bc74404075de343aad1ec3358f07fe92)
2013-01-31 13:02:29 -05:00
Leo Franchi 6a755c2126 Convert to []-style list comprehensions to quiet pyflakes
(imported from commit d81ec98552846d8af71394c7c530aadc53f77127)
2013-01-30 15:24:49 -05:00
Luke Faraone 6b9f688ba4 Require requests version to be >= 0.12.1.
My previous commit (fbdc092029bbafea716e27fbb99fec58a6f24392)
incorrectly specified that you must have a version of python-requests
greater than 0.12.1, when it should be a >= relation since 0.12.1 is
sufficient.

(imported from commit 9f716af6dfe0ce17d982fc22d507f144e9543bec)
2013-01-17 13:54:41 -05:00
Luke Faraone ca8c759bef Document more specific dependency for humbug API on python-requests
(imported from commit fbdc092029bbafea716e27fbb99fec58a6f24392)
2013-01-16 16:57:38 -05:00
Luke Faraone 4463f267b3 Move the API into a subdirectory for ease of imports.
Previously, if users of our code put the API folder in their pyshared
they would have to import it as "humbug.humbug". By moving Humbug's API
into a directory named "humbug" and moving the API into __init__, you
can just "import humbug".

(imported from commit 1d2654ae57f8ecbbfe76559de267ec4889708ee8)
2013-01-16 16:55:22 -05:00
Luke Faraone e2429199ad Switch humbug-send to use "humbug" as the module.
The old-style api.humbug is deprecated, so we rewrite the path for things
to work correctly.

(imported from commit 360282b70fab1ad9d9d517157fc4fe06f9acd6a2)
2013-01-16 16:55:22 -05:00
Keegan McAllister 6ddbcf4799 gcal-bot: Handle all-day events
(imported from commit 7395f2cdd2003b24ce59a1dbdf6f6ae24b6eae6c)
2013-01-16 15:23:36 -05:00
Reid Barton 3c1f08c394 Add --stream option to print-messages, print-next-message API examples
(imported from commit aeaf8a111759de59ba87fc7014be86bd13810271)
2013-01-16 14:19:05 -05:00
Tim Abbott 5601086575 populate_db: Remove obsolete mit_subs_list.
(imported from commit 601cde1ae95d3e262be8444ded48f1fdca489f7b)
2013-01-08 17:23:22 -05:00
Jessica McKellar 5cf5bcaed5 Add logging for the feedback bot.
(imported from commit 4beb3ec69330baf0305ff0509900a5039145f4f4)
2013-01-08 10:53:33 -05:00
Tim Abbott f039623f2c zmirror: Fix running on 32 bit systems.
(This also needs pyzephyr to be compiled for 32 bit).

(imported from commit 06e33e17be517483213d402dd75ec2ac168395d1)
2013-01-02 14:20:24 -05:00
Tim Abbott bc2a5bad0b zephyr_mirror: Use modern default_format that discourages displaying it.
(imported from commit bfb2ffbf4ca7d424ffe54c4b2752378f4854db25)
2013-01-02 14:10:21 -05:00
Tim Abbott 429daf3c44 zmirror: Fix use of print rather than logging.foo in send_zephyr.
(imported from commit 7188f5364a864f2f144fb630d7a8c85d69219c42)
2013-01-02 14:10:21 -05:00
Tim Abbott ce3d0d3491 zmirror: Add another Zephyr class we can't subscribe to.
(imported from commit 6d43c901ecfd01574149efc06c782a49c5d64c9e)
2013-01-02 14:10:21 -05:00
Tim Abbott 7b35e72df4 zmirror: Use shorter default_format string.
This was causing about 10% of the time, personals being forwarded by
tabbott/extra@ATHENA.MIT.EDU to get this error:

zwrite: Field too long for buffer while sending notice to
tabbott/extra@ATHENA.MIT.EDU

We don't fully understand the cause of the problem, but this fixes it.

(imported from commit 22c39a1061cde9ad6973ef07aee7227623a3d47d)
2013-01-02 14:10:21 -05:00
Tim Abbott efd13505e1 zmirror: Attempt to receive zephyrs as we send them.
Sometimes the very first message we send isn't received by
python-zephyr; this could be because of our growing a 17-message queue
of zephyrs to service, so let's not do that.

(imported from commit 281bf1807442b6335b05c803b1a47e0a162bef4e)
2013-01-02 14:10:21 -05:00
Tim Abbott 08e1dda50f zmirror: Fix buggy retries on subscribe failures.
(imported from commit 786cb63be5aa5889283a4cbbecafe58690ad4ac9)
2013-01-02 14:10:18 -05:00
Tim Abbott 06cc9bad6c send-nagios-notification: Use a codeblock rather than a block quote.
This ensures that Humbug receives the verbatim text of the Nagios
body, rather than a slightly modified version.  Tested by running
manually.

(imported from commit 7e0eea0b230fd8c5552860acfb7372099598f036)
2013-01-02 10:24:35 -05:00
Tim Abbott 54bdd6fa45 zmirror: Fix printing of list of stream failures.
(imported from commit 0d573b412809263dbbacdf1b475adac440dae352)
2013-01-02 10:22:08 -05:00
Tim Abbott 927b0d7e44 zephyr_mirror: Cancel Zephyr subscriptions on graceful restart.
(imported from commit 39737bbf7ea76181ab25a0eaacf230906cba3d87)
2012-12-21 12:44:19 -05:00
Tim Abbott 5a8220ff2c zephyr_mirror: Fix killing duplicate zephyr_mirror processes.
The refactoring that we did a couple weeks ago to make the zephyr
mirror script restart itself automatically (by splitting it into
zephyr_mirror.py and zephyr_mirror_backend.py) had a poor interaction
with our code for killing old zephyr_mirror processes (to prevent
double-mirroring).  If you manually ran two copies of the outer
mirroring script (zephyr_mirror.py), then the second one would on
startup kill the first one's zephyr_mirror_backend.py children (for
being duplicate zephyr_mirror_backend.py processes that would result
in double-mirroring).  However, importantly, it did not kill the first
mirroring script's zephyr_mirror.py parent process, so the first
mirroring script would then proceed to startup up new children.  The
process then repeats, with the two scripts' roles reversed.

This issue didn't affect the sharded mirroring case, where I had been
doing the testing of the kill code with that refactoring, because we
don't have a version of the outer zephyr_mirror.py loop for that
situation (a consequence of it being hard to restart the threads
properly with the run_parallel API that we're using to spawn all the
children).

(imported from commit d4886ac77312a6b0ebd0d612f6fb084970bf23a2)
2012-12-21 12:44:19 -05:00
Tim Abbott 470ff676e6 zephyr_mirror: Fix insecure temporary file for log.
This is probably a lot more annoying to use, in that e.g. there are
separate log files for the two directions of the mirror, but we
haven't used these logs for much, so whatever.

(imported from commit d3bc407d90099214d242526c01cd3d3cd9d9d9bd)
2012-12-20 14:30:20 -05:00
Tim Abbott 6173ed509c zephyr_mirror: Add a few more restricted-access classes.
(imported from commit 6690e5dcd6a313ac4e4ef2351e300306ca7fb3c5)
2012-12-19 08:49:14 -05:00
Tim Abbott 09c53ccf38 check-mirroring: Fix spurious double-sent messages due to ACK failures.
(imported from commit 9010bd08779ce3bf9ce1dca761910be504b6463a)
2012-12-18 13:13:43 -05:00
Waseem Daher 1cf4bcfb3b Don't consider hyphens to be an acceptable place to wordwrap.
Otherwise, URLs like this one from catherio:
  http://www.sadiemagazine.com/issue-no-11/arts-letters/comic/i-think-i-am-in-friend-love-with-you
don't go to zephyr as one line, which makes them really
annoying to click on barnowl, etc.

(imported from commit d14f0af7d24a6cb8bc7cb0582f60116308f59923)
2012-12-18 11:03:18 -05:00
Tim Abbott 6b85b76de9 check-mirroring: Fix hardcoded logging path.
(imported from commit 93b0d27285f79ecd7286cc07bc7727f754bc8012)
2012-12-14 17:34:37 -05:00
Tim Abbott cefd4baae9 check_mirroring: Fix sharded stream names and add test for them.
The original ones were incorrectly computed with a trailing newline
character.

(imported from commit 8f4e4e436104aec33e858fa7a65583a1dbc2eaff)
2012-12-14 17:34:37 -05:00
Tim Abbott bf95839e27 check-mirroring: Try receiving zephyrs multiple times to avoid large queues.
(imported from commit 08c08df46794cd89db19748c3d5adfa4097de4cb)
2012-12-14 17:34:37 -05:00
Reid Barton f48e875d13 api: Pass along --site in init_from_options
(imported from commit a893c098b92690214a90a572ab54504d93da29e6)
2012-12-14 16:15:39 -05:00
Luke Faraone f76ea63b77 Document humbug-send and humbugrc in README for API users
(imported from commit 9ca282d4d768f2d2a474da1209621f03147954fe)
2012-12-12 16:48:00 -05:00
Luke Faraone 2da0a2275c Switch to the option group pattern for API examples.
(imported from commit 67d0164df822a56f06d5f959297cc2efa9706001)
2012-12-12 16:48:00 -05:00