Commit Graph

255 Commits

Author SHA1 Message Date
Tim Abbott 0b5b1dd14e zephyr_mirror: Fix unicode decoding issues.
(imported from commit b8c15fca2f691d23260ec025ad471815a7ab41b0)
2012-10-29 17:30:06 -04:00
Tim Abbott c5367bc21d Fix auto-restart functionality with new paths.
(imported from commit cbaf31a194c92a3683249f38f2949259d05d0921)
2012-10-29 17:30:06 -04:00
Tim Abbott b423d07a84 Add tabbott/extra to the tabbott-stamp users.
(imported from commit 378fa53fa8d2f237c8366969ff8a3efb0dee961a)
2012-10-29 14:34:28 -04:00
Tim Abbott 42097b377b zephyr_mirror: Clean up sys.path computations.
(imported from commit 7a58c4aae017b67b8b03ba1f4a0286d29381a5b1)
2012-10-29 14:34:28 -04:00
Tim Abbott 13f342a8fa Change the location where stamp files are looked for.
(imported from commit 15aec12195f5650df0b603ebe8ad9f38fc29d8e1)
2012-10-29 14:13:13 -04:00
Tim Abbott d03cdd2a1d zephyr_mirror: Suppress help for options users shouldn't use.
(imported from commit 62dc96147f2d4a706ff2570653ce3ad727d56967)
2012-10-29 14:13:13 -04:00
Tim Abbott 955f7ac9d8 Hardcode logging path for zephyrs.
(imported from commit c40fc9b67cae201cd2e94033257fb5f43602a5f2)
2012-10-29 14:13:13 -04:00
Tim Abbott 11cd128725 zephyr_mirror: Stop importing mit_subs_list.py.
(imported from commit 15e1eb1eabfa8db335f99b067dc4f4eecc00f639)
2012-10-29 13:58:05 -04:00
Tim Abbott ba08d06cb8 zephyr_mirror: Add option to just sync subscriptions.
(imported from commit 56951bb2bb62a8549593d2a33e883e66147d59a9)
2012-10-29 13:19:41 -04:00
Keegan McAllister c1171c9832 Change default site in API clients
(imported from commit 185cf8e27cb6ecd1cd8ccca834d30ca0de2236b8)
2012-10-27 11:38:15 -04:00
Tim Abbott 7c03f03557 trac-bot: Show summary in tickets.
(imported from commit fdf48c0e6cd0c7a94d7ddb1f982d2398381e310a)
2012-10-26 14:15:27 -04:00
Tim Abbott e3a63937fb feedbact-bot: send feedback messages sent by non-MIT users too.
(imported from commit 00eb1f99af751665d036d25ea31da3dbfdf327a4)
2012-10-26 10:42:54 -04:00
Tim Abbott 5b4816eb55 Report failures count in API queries.
(imported from commit afb01272db6e0aa1ba10d60d651a97ce924e8cb9)
2012-10-25 17:53:23 -04:00
Tim Abbott 6dbd689f91 Kill duplicate zephyr mirror processes on startup.
(imported from commit 52db0c911e5d60a54eb43c5c075709c02e75da63)
2012-10-25 17:41:08 -04:00
Keegan McAllister eef027560a Remove unused imports
(imported from commit eb576627ff72e57fee0e3a4c357f51ad74cd6c86)
2012-10-25 15:22:18 -04:00
Keegan McAllister f8540dcdae Wrap some other extremely long lines
(imported from commit e7d55f318c8865ca953bf4520d1b07f7e84a4aeb)
2012-10-25 15:22:18 -04:00
Tim Abbott 6e1ec1a2ec Move our various bots into api/bots/.
(imported from commit f5803441b9b84872b942dff8e1c0ad1100788bcd)
2012-10-25 13:53:34 -04:00
Tim Abbott b92ac0ffa1 Add feedback@humbughq.com forwarding bot.
(imported from commit 219909bd06025e3778f162321628781e2e3e2c94)
2012-10-25 13:53:33 -04:00
Tim Abbott f94a482342 humbug_trac: Use block quotes for displaying comments.
(imported from commit 0ac08177804340b1ff49d4f7c95813784d7ebcae)
2012-10-24 18:20:34 -04:00
Tim Abbott 57993eb1d8 humbug_trac: Clean up some unused imports/dummy class name.
(imported from commit 58ef3263c1a4f94c7affa94acd63f272b8749266)
2012-10-24 18:20:17 -04:00
Tim Abbott 03f82139ec humbug_trac: Update display of field changes.
(imported from commit 20253fb28273d80a5d8f69b1fd60545c2fb545bb)
2012-10-24 18:18:44 -04:00
Tim Abbott b62d37c151 Add a few more explanatory comments for modifying the trac plugin.
(imported from commit 9995e51bcfdbe46d8211e54b692b0c4f4215f282)
2012-10-24 18:04:05 -04:00
Tim Abbott 89d3f8c2f4 Add Humbug trac plugin.
(imported from commit 4f08a4be6d2dfdb749a9084fb13be86fb406ab5b)
2012-10-24 18:00:40 -04:00
Keegan McAllister 03a02ff439 zephyr_mirror: Un-linewrap messages coming in from Zephyr
Reinstated from 65d00bf911231cb15d3a6713e64ed8dff28a613a .  The server's
Markdown parser now treats newlines as line breaks, so we need this again.

(imported from commit 242ed53b7f1308f21a6e6a194e24c176545a079b)
2012-10-23 11:26:40 -04:00
Tim Abbott 6f4b0de057 Set a client name for the mirroring Nagios check.
(imported from commit e90bf0277479c856dcb975c9b5a3a1178abf1379)
2012-10-23 11:08:27 -04:00
Tim Abbott de5d48f51f Make the client name a global property of the Humbug client.
(imported from commit 3401686986a2670b3636e99fb11761c07a934bca)
2012-10-23 11:08:27 -04:00
Tim Abbott 93616039bc Use the new client data model to deduplicate mirroring.
(imported from commit 6ac38534aea11b1e7f8f332e76251f9501f9ab3e)
2012-10-22 18:31:36 -04:00
Tim Abbott 2374b6e16f API: Update error handling.
(imported from commit 2084975c5476a4792a633bf70469be26082da8c3)
2012-10-22 18:18:00 -04:00
Keegan McAllister ae7c4b302b Add a bot to send yourself reminders of Google Calendar events
Run ./api/gcal-bot with no arguments for usage information.

(imported from commit cdc160aeffc16f54072b64370868aca3acc6ad67)
2012-10-21 18:21:12 -04:00
Tim Abbott 7b3b4362dd [schema] Add a Client model keeping track of the sending client.
(imported from commit 31a430b1de14ce973addafd5d13ace049a8f8091)
2012-10-20 18:41:54 -04:00
Tim Abbott 5a51f7385a check-mirroring: Enable authentic sending.
(imported from commit dc71ac6d8c7b7b3a6a380eb3ea4c9e177ecfb691)
2012-10-19 13:53:14 -04:00
Tim Abbott b62bb021e7 zephyr_mirror: Support empty zsigs.
(imported from commit 6a9fd78d928ebbc9442b3f99d2730f09309556bb)
2012-10-19 13:17:10 -04:00
Tim Abbott 8a2e1d6480 check-mirroring: pretty-print humbugs.
(imported from commit 603da610993a915f1bef7f6c03ccf62414545931)
2012-10-19 13:17:09 -04:00
Tim Abbott 9543975172 Add a tool to check whether zephyr mirroring is working correctly.
(imported from commit aba418bd50fc8e86afb80aa97a3a8e8af007f223)
2012-10-19 12:25:54 -04:00
Tim Abbott 43ac770fb1 Add print-next-message API example.
(imported from commit 73880275d2665e75d11def7447051c2b0c3b798b)
2012-10-19 11:37:51 -04:00
Tim Abbott f1a7bd87d2 zephyr_mirror: Add option to specify user used for mirroring.
(imported from commit c9dfe4f8d12f2e234c85d96ba7ca59e0a59c1bd4)
2012-10-19 11:37:06 -04:00
Tim Abbott da9babd347 Fix typo in API tool usage.
(imported from commit 235eca10897b8f62bf2a7d8a7299b8b1f6906ec6)
2012-10-19 11:36:00 -04:00
Tim Abbott 3051b34bb0 Fix issues with trailing slashes in API examples URLs.
(imported from commit f557a65e36aefcdcd9e072e9144f3ec69f518192)
2012-10-18 11:32:58 -04:00
Tim Abbott d49d675128 Fix mit_sync_bots for personals only.
(imported from commit 9fd7ac87d2cdc32413edefbde8870bbe59b67380)
2012-10-18 11:14:03 -04:00
Tim Abbott be8404e101 zephyr_mirror: Read in API keys from a file in your MIT homedir.
(imported from commit eb0fcf032b26388da1785d41bd182218559bfd06)
2012-10-18 10:37:41 -04:00
Keegan McAllister f7400fc8b4 api: Drop HTTP Digest authentication
(imported from commit 6867528cbd51a9e4a7cdacb181befcd034b90d59)
2012-10-17 18:24:15 -04:00
Keegan McAllister 18f1efc6a2 curl-examples: Check cert
(imported from commit 5496142cbb1ef737ea7fc0063722a578fb7df437)
2012-10-17 18:24:15 -04:00
Tim Abbott 3c45e76f6b Forward instanced zephyr personals to Humbug.
(imported from commit eee338e89e9f875a37c5e56682ea32b919fa37d0)
2012-10-17 11:21:11 -04:00
Tim Abbott 4844d7eb02 Fix stupid bug mirroring personals to zephyr.
(imported from commit 42508db8b06cb16e8156ef2da9db5df8a706a029)
2012-10-16 20:56:29 -04:00
Tim Abbott 3a784cd0b2 Sync messages on Zephyr instances to corresponding humbug stream intelligently.
(imported from commit 182cab9442f6444c0a710699420524e82542d9cc)
2012-10-16 14:57:46 -04:00
Tim Abbott 2cb9589fd1 zephyr_mirror.py: Clean up duplicated lower-casing code.
(imported from commit 2357202a4d8e0780cda3329f2e86d25b7596afbf)
2012-10-16 14:57:46 -04:00
Keegan McAllister bc43613a10 Some import cleanup
(imported from commit 265cebb011309b9a880035ccd587a5e51554803a)
2012-10-15 16:16:10 -04:00
Keegan McAllister 52bd41bff8 api: Verify certs for real
Now that we have a CA-signed cert for the app.

(imported from commit a2d8e95ea581d9af0ba6071b222e06ca82f0612c)
2012-10-15 15:31:12 -04:00
Keegan McAllister 002e3a5a61 api: Check against the self-signed cert
(imported from commit f0444f1af206e5d7ee1c79f7486e9fe17daea0f7)
2012-10-15 13:29:47 -04:00
Tim Abbott bb9c6c4e4a zephyr_mirror: Fix --forward-class-messages always being on.
(imported from commit 8f284a8d8b8f9e1e3fdc8bd60d0ca073cd42e56c)
2012-10-15 13:13:57 -04:00
Tim Abbott c4d2f98496 zephyr_mirror: Improve verbosity defaults.
(imported from commit 6754b992a72f4ed844eed3eab2a114bd5c73a713)
2012-10-12 17:47:43 -04:00
Tim Abbott 367f6c0a56 zephyr_mirror: Run both processes within a single application.
(imported from commit 8f379a682ede7076ddcbe046dee5be6592a5bbd9)
2012-10-12 17:35:14 -04:00
Tim Abbott 437b25fe44 zephyr-mirror: Deconfuse the --forward-from-humbug option.
(imported from commit 526b9253c550dbbe41881f5c6709ce2f09cbe241)
2012-10-12 17:35:14 -04:00
Tim Abbott 06a163a30e zephyr_mirror: Avoid printing Hesiod errors to stderr.
(imported from commit 2f0016b196d764027e4e53a937167d04b3e96f49)
2012-10-12 17:35:14 -04:00
Tim Abbott d783ccde8c zephyr-mirror: Include timestamp and direction in all print statements.
(imported from commit b0e500ab1f168e618abaae139ce8a9dd5f0dc639)
2012-10-12 17:35:14 -04:00
Tim Abbott 7cfc6db542 Add a different stamp for auto-restarting just tabbott.
(imported from commit 8f0b1f0bf655d64329a42100eec3dbef1393ded0)
2012-10-12 17:35:14 -04:00
Tim Abbott cb9ad456e7 zephyr-mirror: Clean up hardcoded path names.
(imported from commit 42338d94deb94312c2dee43851bc3c04e3ab373c)
2012-10-12 17:35:14 -04:00
Tim Abbott 959a69f700 Make the restart tool try again if it fails to restart.
(imported from commit 216dcdcaa096c26e26b385029d62d0310349a6c9)
2012-10-12 17:35:13 -04:00
Tim Abbott 78ad6a03f2 Restart the zephyr mirroring script for new versions.
(imported from commit 860b0e120308cf190dbde2a0182e99951404cbce)
2012-10-12 15:03:42 -04:00
Tim Abbott fc6c62e84d Clean up process_loop's structure.
(imported from commit 62e427bf22d56960286b237f54660e74fb2866d8)
2012-10-12 14:53:21 -04:00
Tim Abbott 01e2b264da zephyr_mirror: Split out the main loop into its own function.
(imported from commit 4c5639b3679f7ef0188e622bf7721bd3ee71bddc)
2012-10-12 14:52:39 -04:00
Tim Abbott dc9f80c2a3 zephyr_mirror: Forward mail zephyrs.
(imported from commit 5b56c8d171aeb49728590411ee6b53d7a29fbd15)
2012-10-12 14:35:36 -04:00
Tim Abbott e4d92dc1c7 zephyr-mirror: Clean up very long lines of code.
(imported from commit 1d40a1f4dee41531b621828648be32ecec6a9669)
2012-10-12 14:35:36 -04:00
Tim Abbott 27d66cb987 Clean up fullname detection for special domains.
(imported from commit 92450b37b8749d52a5322306e9475e8189ccfd89)
2012-10-12 14:35:36 -04:00
Tim Abbott a4683aa763 Fix s/LTS.ORG/1TS.ORG/.
(imported from commit 0e0a608f86e4117f24829b8f13c7236a31d556a4)
2012-10-12 14:35:36 -04:00
Tim Abbott 01f4aabe63 Rework algorithm for computing fullnames for crossrealm zephyr users.
(imported from commit 5cc49e2565e8a10d8f34ac16886e1603f190fece)
2012-10-12 12:21:21 -04:00
Zev Benjamin c4d35280ea Make Message's display_recipient field be an object with consistent names for both personals and huddles.
(imported from commit 8b00f16b036ed3fb3f7d56e7393271ec1d458ea5)
2012-10-12 11:34:42 -04:00
Tim Abbott 0a0283cba7 Revert "zephyr_mirror: Truncate stream names to 30 characters."
This reverts commit 9973168227896dc8f1dc061b7970a503565856bf.

In theory, we should never be subscribed to receive such messages
anyway.

(imported from commit ff52eaa3285283750b4d7dc3b3a12c2d766514ac)
2012-10-12 10:49:24 -04:00
Tim Abbott f9713d5541 Mark more API examples as executable.
(imported from commit 1d21e05af00e9ae37ef38d6e6d56c88e0d764f82)
2012-10-12 10:40:12 -04:00
Tim Abbott e12f006ad6 zephyr_mirror: Truncate stream names to 30 characters.
(imported from commit 9973168227896dc8f1dc061b7970a503565856bf)
2012-10-12 10:38:01 -04:00
Tim Abbott 486aa99234 zephyr_mirror: Fix case where we're not forwarding class messages.
(imported from commit c40ae12522dcf3a7c3b02d92dbc230c8b4c582ac)
2012-10-12 10:16:20 -04:00
Tim Abbott b1cafb2761 zephyr_mirror: Automatically subscribe to streams in ~/.zephyr.subs.
(imported from commit b28b28a81416c52813975c2cdbf65d282deec3df)
2012-10-11 16:28:51 -04:00
Tim Abbott 9f499fd364 Fix descriptions of some API examples.
(imported from commit 105211905b27d03906506af41522854cbb53479a)
2012-10-11 16:20:45 -04:00
Tim Abbott fc99d2983a Add an API call to subscribe to a list of streams.
(imported from commit 0a5d46d5f54fb4c8ebfad8c9adb777c0b4938dfa)
2012-10-11 16:20:45 -04:00
Keegan McAllister 58e8560ca9 zephyr_mirror: Don't un-HTML-escape messages forwarded to MIT
The messages coming in from the API should no longer contain these entities,
unless the user typed them.

(imported from commit d6b6aa300557d4603c68ffc3b5966115a5787aae)
2012-10-11 15:01:54 -04:00
Tim Abbott 4715d2144c zephyr_mirror: Get new classes to subscribe to from the humbug server.
(imported from commit 7cf321cdc97cf10719ca89b4ee1e7c2e8d979e40)
2012-10-11 14:49:04 -04:00
Tim Abbott 83f494b1a4 Add API queries to show public streams and the user's subscriptions.
(imported from commit 5f24e35a9bdd1e40406e2acb0c3713a6517d139b)
2012-10-11 14:43:23 -04:00
Tim Abbott beb5dc4a70 zephyr_mirror: Forward instances longer than 30 characters.
(imported from commit af0b2fbbcc8dee13dd70084d4f81a841193bd812)
2012-10-11 11:53:57 -04:00
Tim Abbott ac3f4393ff Rename instance to subject.
(imported from commit 6b4693da03f106448c137cf81cf9801cac44f2b8)
2012-10-10 18:01:39 -04:00
Tim Abbott 08e832e093 Change send_message to accept a stream, not a class.
(imported from commit 0f58de2502bec227f5f33e44692d03f2f28d6f63)
2012-10-10 17:48:17 -04:00
Tim Abbott 44e9e4cebf Rename Recipient.CLASS to Recipient.STREAM.
(imported from commit a530194163f7260c73921137fa1ff671f14516f6)
2012-10-10 17:47:13 -04:00
Tim Abbott dce84c401e zephyr_mirror: Print out the message before logging it.
This should make debugging easier.

(imported from commit 101bab269b98ee5c2f56780d97e6b94c0887a306)
2012-10-10 16:33:23 -04:00
Tim Abbott d2e0a564e1 api: Cast message ids to int before trying to compute the maximum.
(imported from commit 1723c48758711b9ace3db95d82ad91c76512ffa3)
2012-10-10 16:29:05 -04:00
Tim Abbott 54c420a15e Make instance names lower case when mirroring zephys.
(imported from commit 7e55f2339bb242ae29a7ee4db5c5f2bd654e8f7e)
2012-10-09 10:55:42 -04:00
Tim Abbott cfc78d6631 api: Clean up code duplication and add automatic retries on 503s.
(imported from commit 5c0654d1048a97a0f451c560544266a4261d9426)
2012-10-04 18:08:20 -04:00
Tim Abbott 33a5157afd Rewrite API to use the Python requests library.
(imported from commit 314cf906eb25ea46f580ca70852b9d3478531229)
2012-10-04 17:25:58 -04:00
Tim Abbott 6895ae7c7a Forward messages with non-null non-ping opcodes.
(imported from commit 4b1a8749f05624891f4d9996188e9597eeb234f1)
2012-10-04 17:25:58 -04:00
Tim Abbott 2a79ff0cc8 Rename 'zephyrs' => 'messages' when formatting a message list to send to clients.
(imported from commit bfbb556f2444aca8277f54c363eccb678b6bf2dc)
2012-10-04 14:42:38 -04:00
Tim Abbott abd97578c0 Fix zephyr mirror unicode issues, hopefully once and for all.
This code successfully sends every message in our corpus of past
zephyrs.

(imported from commit 14d42ca9288e2a218eaad880691d6bd213a045ce)
2012-10-03 17:55:14 -04:00
Tim Abbott 8542dd26a8 API: Disable history in the mechanize browser.
(imported from commit 8907f3af6283ab3ac72a22e936952757af56d1c3)
2012-10-03 17:21:26 -04:00
Tim Abbott e249df896f api: Cut down a bit on the error handling verbosity.
(imported from commit b665b939f8474f0d631125ecd7c3d300e338ff3c)
2012-10-03 17:14:50 -04:00
Tim Abbott a79d67b3d7 Slightly increase the leniency for forwarding 'old' messages.
There are non-buggy situations when it can be higher than 5 seconds.

(imported from commit cc63c0bdb10a201cc30c17854e5a506bac7e68d7)
2012-10-03 17:08:32 -04:00
Tim Abbott 9223f7932c Convert zephyr_mirror humbug sending to use the API.
(imported from commit 948a12a1dca903c47b7427248688f2079c7eecdb)
2012-10-03 16:50:29 -04:00
Tim Abbott d5d3694451 Update post-receive hook to send messages via the API.
(imported from commit 81f4c9e55c44f19208c42d9a8e8db33ce44b02ac)
2012-10-03 14:32:05 -04:00
Tim Abbott e01c0de102 zephyr_mirror: Drop PING messages earlier.
This simplified debugging.

(imported from commit 4571901a5349d5ec1ec9246c94edb65e016160ac)
2012-10-03 13:48:29 -04:00
Tim Abbott 8152619ce7 zephyr_mirror: Fix bug computing recipients when sending huddles.
(imported from commit c6a7eadfa9cd007945d423e4e93f088857897e26)
2012-10-03 13:48:29 -04:00
Tim Abbott 828e0d4afb Rename forge_zephyr to forge_message.
(imported from commit aa2dc6e24a9c1bd6be09bfa26241663ae143cef9)
2012-10-03 12:27:34 -04:00
Tim Abbott 2f3aa23e7e Fix new_zephyr => content conversion for zephyr mirror script.
(imported from commit 2bcc46749efce5c0ee693abfb13cf460b31f99d7)
2012-10-02 17:52:41 -04:00
Tim Abbott e79805847b Rename the 'new_zephyr' argument to the more descriptive 'content'.
(imported from commit b47e2c4823bbfbf2f94cbafb24ed5d78dfbe841b)
2012-10-02 17:29:55 -04:00
Tim Abbott 1356bd336a zephyr_mirror: Rewrite to use the API.
(imported from commit 6d3bce15eb045f28897abb6ddcdbea8e10629a7d)
2012-10-02 17:19:42 -04:00
Tim Abbott 5a5b5de650 Rename /api/v1/get_updates to /api/v1/get_messages.
(imported from commit f856637158cf9fda64ba333b532a5941de8fcbab)
2012-10-02 16:29:34 -04:00
Tim Abbott 8319a938e1 Refactor how the API handles options.
(imported from commit caff4a0b8b2d88e5e60fe3a7727b6d4ac5f63bd0)
2012-10-02 16:21:34 -04:00
Keegan McAllister b8236b5a60 Remove unused imports
(imported from commit 3f9c19a73028b86d386df90c0ffafa33168482e1)
2012-10-02 16:14:42 -04:00
Tim Abbott 18a3888373 [schema] Add an API for sending/receiving messages.
(imported from commit 209d525dc5892fc4c392a8ced1588c838cbb17c4)
2012-10-02 15:49:25 -04:00
Tim Abbott 60cb2daab7 zephyr_mirror: Move to the API subdirectory.
(imported from commit cea9809770e66ceb7baf63c444715e01ed97aa8c)
2012-10-02 15:49:25 -04:00