Tim Abbott
ac86cfcc37
Annotate zephyr_mirror.py.
2016-08-04 15:57:03 -07:00
Tim Abbott
bde3c666a9
zephyr_mirror: Add typing import.
2016-08-04 15:57:03 -07:00
Tim Abbott
552fc06844
jabber_mirror: Add missing annotation.
2016-08-04 15:57:03 -07:00
Taranjeet
a137bf15ed
Wrap some lines with length greater than 120.
...
With some tweaks by tabbott.
2016-07-06 14:35:16 -07:00
Eklavya Sharma
94e4b39112
Replace python2.7 by python everywhere.
2016-05-29 05:03:08 -07:00
Eklavya Sharma
149938d468
Change shebangs from python2.7 to python.
2016-05-29 05:03:08 -07:00
Tim Abbott
2761c012e5
Move rabbitmq consumer checks from bots/ to scripts/nagios/.
2016-05-07 19:37:06 -07:00
Tim Abbott
be6566dc5c
nagios: Move cron_file_helper from bots/ to scripts/lib.
...
This ensures the tool is available in Zulip production deployments.
2016-05-07 19:37:06 -07:00
Tim Abbott
a1b306f9ce
Finish purging 'fromt typing import *' from Zulip codebase.
2016-04-07 14:11:21 -07:00
Tim Abbott
b437fe2924
Add PEP-484 annotations to bots/.
2016-04-03 15:40:23 -07:00
Eklavya Sharma
9e3c3e14f5
Partially apply Python 3 libmodernize.fixes.fix_dict_six.
...
Refer to #256
2016-03-19 15:52:58 -07:00
Eklavya Sharma
b9e792c4e6
Apply Python 3 futurize transform libmodernize.fixes.fix_xrange_six
...
Refer to #256
2016-03-10 22:03:58 -08:00
Eklavya Sharma
d3b63f9a2d
Apply Python 3 futurize transform libmodernize.fixes.fix_file
...
Refer to #256
2016-03-10 22:02:34 -08:00
Eklavya Sharma
c59185e119
Apply Python 3 futurize transform libfuturize.fixes.fix_print_with_import
...
Refer #256
2016-03-10 22:02:17 -08:00
Eklavya Sharma
f3d387e727
Apply Python 3 futurize transform lib2to3.fixes.fix_except
2016-03-10 22:01:50 -08:00
Zev Benjamin
e780f5dab5
Make log2zulip error message more accurate.
...
In particular, in the case of a permissions issue reading the log
file, it would claim the log file doesn't exist.
2016-02-02 23:04:48 -08:00
Tim Abbott
5bacda3662
python3: Fix usage of .keys()/.values() to handle iterators.
...
This fixes the places where we use the result of .keys(), .items(),
and .values() that wouldn't work with an iterator to wrap them with
list().
2016-01-26 21:11:25 -08:00
Tim Abbott
6528b18ad3
Switch all urllib/urlparse usage to six.moves.urllib.
...
This provides Python 2+3 compatibility for our use of urllib.
Also add a test to avoid future regressions.
2016-01-26 21:09:43 -08:00
Tim Abbott
700055c194
Apply modernize transform libmodernize.fixes.fix_file.
...
This replaces use of file() with open() which is python 3 compatible,
and also adds it to our python 3 support test suite.
2016-01-26 21:09:42 -08:00
Tim Abbott
f6f8f1fe36
Use new-style classes consistently for Python 3 support.
...
Also add the fixer for this to our list of fixers we check.
2015-11-04 08:01:52 -08:00
Tim Abbott
f7878a61e1
Apply Python 3 futurize transform libmodernize.fixes.fix_xrange_six.
2015-11-01 09:35:06 -08:00
Tim Abbott
cd6f8e9191
Apply Python 3 futurize transform libmodernize.fixes.fix_map.
2015-11-01 09:35:05 -08:00
Tim Abbott
2ea0663a4a
Apply Python 3 futurize transform libmodernize.fixes.fix_imports_six.
2015-11-01 09:26:16 -08:00
Tim Abbott
b3ac668779
Apply Python 3 futurize transform libmodernize.fixes.fix_filter.
2015-11-01 09:26:16 -08:00
Tim Abbott
f3783fb4a1
Apply Python 3 futurize transform libfuturize.fixes.fix_print_with_import.
2015-11-01 09:26:16 -08:00
Tim Abbott
9c66229456
Apply Python 3 futurize transform libfuturize.fixes.fix_absolute_import.
2015-11-01 09:26:16 -08:00
Steven Oud
d5435fad1d
Consistently use /usr/bin/env python2.7 in shebangs and commands.
2015-10-21 22:58:21 +00:00
Waseem Daher
6bb9b129f7
Update Zulip support email to zulip-devel@googlegroups.com.
...
Ideally some of these templates should really point to the
local installation's support email address, but this is a
good start.
Exceptions:
* Where to report security incidents
* MIT Zephyr-related pages
* zulip.com terms and conditions
2015-09-29 17:59:47 -07:00
Jon Johnson
db51a1c547
Fix typo in jabber mirror error
...
assistence -> assistance
2015-09-26 22:03:00 +00:00
Tim Abbott
80a8725a03
Remove certain hardcoded email addresses in Zephyr mirroring.
...
(imported from commit 9fd492b5463f04741558687f27522d48a5dc795b)
2015-09-20 00:36:12 -07:00
Tim Abbott
b3dfacae19
Change API example usernames to use example.com domain.
...
(imported from commit 41b7be58735df0ea3d3a3daf23bc0f78606abc0d)
2015-09-19 18:12:02 -07:00
Zev Benjamin
db0cec8d70
Update Trac bot config
...
(imported from commit 07e976637882030faedbf2e34448404e7e1de379)
2015-02-05 22:46:30 -08:00
Zev Benjamin
83dafb662a
Update Git bot config
...
(imported from commit 8c189e199178efd8aa054d9762cb26330ab4ae86)
2015-02-05 22:46:30 -08:00
Zev Benjamin
3c76c3fe54
Update Nagio's zuliprc
...
(imported from commit ac06b7cf41b1c0353c2096c4b9befae432fd7c5b)
2015-02-05 22:46:30 -08:00
Jason Michalski
30e4729254
Raise the queue depth limits for missedmessage_emails
...
(imported from commit 73a0da21930d9bc121e07c811483311ec171fe7b)
2014-10-06 15:27:54 -07:00
Jason Michalski
e4db196032
Add an options to set jabber server details
...
--jabber-server-address=JABBER_SERVER_ADDRESS
The hostname of your Jabber server
--jabber-server-port=JABBER_SERVER_PORT
The port of your Jabber server
(imported from commit f6b73ce6a2e3dcdbb100a1b6aba5ad89fc99a457)
2014-07-29 21:46:34 -07:00
Jason Michalski
6b13f4a3c9
Update message events to include is_mirror_dummy
...
This can be used by mirroring scripts to only forward messages to users
who do not zulip accounts.
(imported from commit 200d6bcaaf39238bfb01480a9e906d567d4d9e11)
2014-07-29 21:46:34 -07:00
Zev Benjamin
8e9c019b35
Update user_root path for personal zmirrors
...
The location of the api directory moved.
(imported from commit 408ef7d47e729a0ad2454a5326cfaddcfff9855f)
2014-05-20 17:29:29 -07:00
Zev Benjamin
b5f7ed037c
zephyr_mirror: Specify a z_charset of utf-8
...
andersk reports that we are "incorrectly sending outgoing zephyrs with z_charset
= ZCHARSET_ISO_8859_1, which breaks zwgc (other clients tend to ignore
z_charset). I'm assuming you're shelling out to zwrite; you need to use zwrite
-x UTF-8, or export LC_ALL=en_US.UTF-8."
(imported from commit 8abb28bf8acbe0b5aa99ca13faab24e1e554a031)
2014-05-20 17:29:29 -07:00
Zev Benjamin
5219851de4
zephyr_mirror: Use timeout_success_equivalent in front-end script
...
(imported from commit 2263a371edda74c1c38a377e0fef5372999888b4)
2014-04-23 11:31:04 -07:00
Zev Benjamin
6d43b22ebe
jabber_mirror: Use timeout_success_equivalent in front-end script
...
(imported from commit 6ca8ec5a2c31d20e4e437804c65650c5a98c69f9)
2014-04-23 11:31:04 -07:00
Zev Benjamin
a9e439d9e0
jabber_mirror: Explicitly exit when we encounter an error in the main loop
...
(imported from commit 19b0f29bfd8c01fa300bdb9db2011bba0b55ddd4)
2014-04-23 11:31:04 -07:00
Zev Benjamin
0224fe2db6
jabber_mirror: Don't try to restart on errors caused by initial configuration
...
(imported from commit 5d9e6c88e1a159fe6e5e46c21c483b5c79444223)
2014-04-23 11:31:03 -07:00
Zev Benjamin
7053fd2a24
jabber_mirror: Split out into front-end and back-end processes
...
This adds auto-restarting capability.
(imported from commit 74a01a0272025706f2eb902eeedd9c05ee054272)
2014-04-23 11:31:03 -07:00
Zev Benjamin
7ed182c08f
Move backoff classes to the Zulip API
...
(imported from commit 76c5d499874f0397c505ab3fcda631a1a46847b6)
2014-04-23 11:31:03 -07:00
Jessica McKellar
1c06e37245
[puppet] Change digest email send time by 1 hour for daylight savings.
...
(imported from commit 8ac1747f15e10b850f73ce28ea4579bee62ba1a4)
2014-03-14 20:48:49 -04:00
Zev Benjamin
2090d6ee27
jabber_mirror: Calculate the zulip domain from the client email address
...
We were previously calculating it from the zulip_email option, which might not
be set if it is being specified via the config file.
(imported from commit 76866c239ca63ef90a7967c9a6027aeec9be6390)
2014-03-06 21:59:55 -05:00
Zev Benjamin
30f9fed766
jabber_mirror: Report a useful error message when fetching initial Zulip streams/subscriptions
...
(imported from commit 1133cb0ddb349cda7e16586fba4ba72888e66887)
2014-03-04 23:02:27 -05:00
Zev Benjamin
f495f79c90
jabber_mirror: Fix Zulip error handling
...
(imported from commit 8548576635e5be9b725e059c2d4d9ef9953ec97a)
2014-03-04 23:02:27 -05:00
Zev Benjamin
4721a9093c
jabber_mirror: Add option to append a suffix to Zulip usernames
...
This is needed for the ist.mit.edu realm, where the same email address could be
used for all three of Zulip, Jabber, and Zephyr. To disambiguate Jabber mirror
dummy users from Zephyr mirror dummy users with the same email address (but
which would be in a different realm), we force all email addresses in the
ist.mit.edu realm to have local parts that end in "+ist".
(imported from commit 5ebad2cc8f6c7286b4b9426d57ed75578703fb86)
2014-03-04 23:02:27 -05:00
Zev Benjamin
9f4bc9fb72
jabber_mirror: Remove dead code
...
(imported from commit b67faad6888713554929c7e6a8147d19c489956a)
2014-03-04 23:02:27 -05:00
Zev Benjamin
2a3a98228e
jabber_mirror: Allow the mode to be specified in the config file
...
(imported from commit 8de5006f6935271997204d958c44c03ebf14c403)
2014-03-04 23:02:27 -05:00
Zev Benjamin
d069ad0bc7
jabber_mirror: Remove --openfire option
...
It doesn't actually seem to be necessary to adjust the SSL version in current
versions of Openfire.
(imported from commit 6766d9fd5081cf16f2a5e3e2b008f20e7498caa4)
2014-03-04 23:02:27 -05:00
Zev Benjamin
137f5e5980
jabber_mirror: Allow the MUC nickname to be specified
...
This allows users to run the public mirror as a regular user.
(imported from commit 3512dacf329dadc784d7be492ad290b17082bad4)
2014-03-04 23:02:27 -05:00
Zev Benjamin
11fef6b627
jabber_mirror: Change the default resource to 'zulip'
...
(imported from commit 290dca7fce5230dc94425478ad48fb8b8a0952b6)
2014-03-04 23:02:26 -05:00
Zev Benjamin
6b4fe69227
jabber_mirror: Guess the conference domain when it isn't specified
...
(imported from commit 3fed4bdf5ca73b3b9d58ec42a2031e75e813bbd2)
2014-03-04 23:02:26 -05:00
Zev Benjamin
9b41b30487
jabber_mirror: Use sleekxmpp.JID when manipulating message recipients
...
(imported from commit 57b8384bf79a60abbaf535bd11f222d7f63db251)
2014-03-04 23:02:26 -05:00
Zev Benjamin
868b071eb2
jabber_mirror: Take a JID on the commandline instead of a separate Jabber username and domain
...
We also take the opportunity to use the sleekxmpp JID parsing more instead of
doing string manipulation.
(imported from commit 6e4ba0bd2c241666fcde42333ff68b879d8ab2b7)
2014-03-04 23:02:26 -05:00
Zev Benjamin
28a6644384
jabber_mirror: Allow Jabber options to be specified in the Zulip config file
...
(imported from commit 7911fdd4c8a2e8668c01627697a3cd8a153d4612)
2014-03-03 17:30:58 -05:00
Zev Benjamin
66734d46cf
jabber_mirror: Clean up help text
...
(imported from commit bd9a4682c754423047a993b8914d965c2e12fdf4)
2014-03-03 17:30:58 -05:00
Zev Benjamin
dfed7f0b7e
jabber_mirror: Ignore attempts to join invalid MUCs
...
(imported from commit a82d53af1f581d059b6457a1bf7afe92af5d42d9)
2014-03-03 17:30:58 -05:00
Zev Benjamin
47f96dc2dd
jabber_mirror: Configure rooms after joining
...
(imported from commit d4c6e895dca1c7002ce39db81b671ba1c975d517)
2014-03-03 17:30:58 -05:00
Zev Benjamin
38212f83fc
jabber_mirror: Don't try to mirror messages from rooms themselves
...
These are usually administrative messages.
(imported from commit 58cbbc739fdd47acc586c235aedd2fccc83654fd)
2014-03-03 17:30:58 -05:00
Zev Benjamin
b21dc34eed
jabber_mirror: Change character used for loop detection
...
Previously, we were using U+1B80, which is 'SUNDANESE SIGN PANYECEK' (i.e., an
assigned character). U+1FFFE is a non-character (i.e., free for internal use)
on Plane 1.
(imported from commit f93d2401733afb96b6d717a7f659c011299071df)
2014-03-03 17:30:58 -05:00
Zev Benjamin
9634fccda7
jabber_mirror: Dynamically join and leave MUCs
...
For personal mirrors, this means that the mirror should join all Jabber rooms
corresponding to their Zulip subscriptions. For the public mirror, this means
that the mirror should join all Jabber rooms corresponding to Zulip streams that
end in "/xmpp".
(imported from commit 16ed9e3deee7e02b2ae0dd79925f0ed5c4acd044)
2014-03-03 17:30:58 -05:00
Zev Benjamin
9c52818b93
jabber_mirror: Pull rooms to join from Zulip based on mode
...
(imported from commit 115d4d4732d8ff4f12d336cfc42a056183251d87)
2014-03-03 17:29:53 -05:00
Zev Benjamin
b23dc256e4
jabber_mirror: Document which mode handles which kinds of messages
...
(imported from commit 983224ac58bce724529806f6b8eaa3ea30cc730b)
2014-03-03 17:29:53 -05:00
Zev Benjamin
204e7e7e90
jabber_mirror: Only mirror messages from streams that end in '/xmpp'
...
(imported from commit 5213d40063361ffcf073772580ac0f699228cb3f)
2014-03-03 17:29:53 -05:00
Zev Benjamin
0e3af9b238
jabber_mirror: Mirror Jabber room 'foo' to stream 'foo/xmpp'
...
(imported from commit db771b5b5056cdca5780b90f66924c6f9ae3e84d)
2014-03-03 17:29:53 -05:00
Zev Benjamin
3fbdfeee88
jabber_mirror: Use new-style client name
...
(imported from commit a1bc5b076a9c0384c1abdc2377183b0eac19f450)
2014-03-03 17:29:53 -05:00
Zev Benjamin
8155b8ea04
jabber_mirror: Add --debug option
...
(imported from commit 8d6986ba97f464359a1fe214d5605fa744660a9b)
2014-03-03 17:29:53 -05:00
Zev Benjamin
2850800e48
jabber_mirror: Exit if we fail to connect to the Jabber server
...
(imported from commit f5cc600325a3547412cf0b05239c988410354c10)
2014-03-03 17:29:53 -05:00
Zev Benjamin
0dd209c813
jabber_mirror: Respond to XMPP pings
...
Other clients like Pidgin sends these.
(imported from commit 61c69a080accda939b82ce8701b10ffc6dda672e)
2014-03-03 17:29:53 -05:00
Zev Benjamin
802bd6448c
jabber_mirror: Working PM mirroring
...
(imported from commit 34617f989e83029c6591461adc3ffa18ddea2037)
2014-03-03 17:29:53 -05:00
Zev Benjamin
577d8d33e1
jabber_mirror: Working room/stream mirroring
...
(imported from commit 5d0a33423e90edaee3a1094b1d48fae73cfb54ca)
2014-03-03 17:29:53 -05:00
Zev Benjamin
2ca49c3735
jabber_mirror: Require the --conference-domain option when running in 'public' mode
...
(imported from commit 1dd564a212538e292ffc8b7a52caf7eae66d4475)
2014-03-03 17:29:53 -05:00
Zev Benjamin
40dd0c677e
jabber_mirror: Clarify the two modes the mirror can run in
...
(imported from commit 8084e0552b06c6763f2f13a63c90c9dc73d6bf90)
2014-03-03 17:29:53 -05:00
Zev Benjamin
bf17ea0ee4
zephyr_mirror: Fix comment
...
(imported from commit aed76ecc3b4fd8bb01c299169a8e4eefd35f7cd8)
2014-03-03 17:29:53 -05:00
Zev Benjamin
cd1e07fed3
jabber_mirror: Take the Jabber username as a separate option
...
(imported from commit 86131c7502df7b841c34b09c0e94b071c89b3fde)
2014-03-03 17:29:52 -05:00
Zev Benjamin
e8843be3d0
jabber_mirror: Use zulip.init_from_options
...
(imported from commit 5839c5308a948d2c060d1eb5688b9cf0bd9ed3a2)
2014-03-03 17:29:52 -05:00
Zev Benjamin
8a16ea4cc6
jabber_mirror: Separate Jabber options into their own group
...
(imported from commit 223ecceee956ab30b1647eb0925d11982b2ef37d)
2014-03-03 17:29:52 -05:00
Zev Benjamin
4d47f487cb
jabber_mirror: Use the Zulip API option group
...
(imported from commit 68243e4ebd44cd3b08bf0789c34bb85016d0d1b9)
2014-03-03 17:29:52 -05:00
Zev Benjamin
5ba0b6b633
api: Disambiguate the names of Zulip options
...
(imported from commit 67525764cc2f2a26081640063e2d78852f6229ca)
2014-03-03 17:29:52 -05:00
Zev Benjamin
fbe67f5d84
jabber_mirror: Use consistent casing for commandline arguments
...
(imported from commit e30aedc2f626d64b79a9b36b7f3a0fbee84a8ada)
2014-03-03 17:29:52 -05:00
Zev Benjamin
8bb359d194
jabber_mirror: Remove dead code
...
(imported from commit a8802340e1a624934a92d5bdd4ba8ad26faaadbf)
2014-03-03 17:29:52 -05:00
Zev Benjamin
52d6973191
jabber_mirror: Fix anti-looping
...
(imported from commit 5b0ee18b3ec4fd73912fde83b14083e77940ab6e)
2014-03-03 17:29:52 -05:00
Zev Benjamin
f6cec22e6d
jabber_mirror: Do domain replacement more safely
...
(imported from commit 1a6a3d23120f06d54bc954d4e89d5fccf666332e)
2014-03-03 17:29:52 -05:00
Zev Benjamin
2aeb5dde67
jabber_mirror: Use str.replace instead of re.sub
...
(imported from commit 55798a06951366f0c3d246a243dbb3d41ee5b4f7)
2014-03-03 17:29:52 -05:00
Zev Benjamin
151370277c
jabber_mirror: Use consistent method name casing
...
(imported from commit 0f68b94bab992ba20aa7c185fa40eafeea22f92e)
2014-03-03 17:29:52 -05:00
Zev Benjamin
adcec427b6
jabber_mirror: Factor out jid_to_zulip and use str.rpartition
...
(imported from commit 435f076d7125676b5b964c73ec1e3753496c32af)
2014-03-03 17:29:52 -05:00
Zev Benjamin
f7518ea853
jabber_mirror: Make copyright date clearer
...
(imported from commit a97382d174994be0592fbd98cdef1ed39c1b0400)
2014-03-03 17:29:51 -05:00
Tim Abbott
2ac428ad7d
Add Jabber mirroring bot.
...
(imported from commit a539e1e9322bfbef4d93efce951f058d09fc58fe)
2014-03-03 17:29:51 -05:00
Jessica McKellar
f0c20d8acb
nagios: give digest emails even more processing time before alerting.
...
(imported from commit 057511c22af39d147e4c4c499fee5a3fb7392786)
2014-02-18 16:07:31 -05:00
Jessica McKellar
ec29373f19
nagios: give digest emails more processing time before alerting.
...
(imported from commit ed4c005bc8d0ab2d7ad3ec9e05e3f3110c9fd024)
2014-01-29 14:02:09 -05:00
Jessica McKellar
ee0f569c59
Don't alert on elevated mail queues during digest sends.
...
(imported from commit 2074b08c0f402c147bfdd1f0a4f0663081d5e55d)
2014-01-24 10:07:26 -05:00
Tim Abbott
73a05d52f5
Don't send a Zulip notification about 0 lines.
...
(imported from commit cc8ce4d95978264cd05bc26f77a5d770abdf5add)
2014-01-16 18:36:19 -05:00
Tim Abbott
1835848782
Filter upstream timed out events from log2zulip.
...
(imported from commit 7a18d7f7ea6cc1be90d436c651eb4bb85598cec9)
2014-01-16 16:51:16 -05:00
Steve Howell
a1e7d2123d
Add summarize_stream.py.
...
(imported from commit 061b1ccc6649acb9a9fc40370282fa34c645afed)
2014-01-10 21:39:06 -05:00
Tim Abbott
8dcf7d4cc3
[puppet] Add log2zulip tool for sending log files to Zulip.
...
This tool is a little crude; it runs out of a cron job and will
forward to staging a notice about any new lines in the declared log
files, truncating if there are more than 10 lines.
(imported from commit 6748ddff1def0907b061dc278a3a848bd2e933f1)
2013-12-17 11:02:55 -05:00
Zev Benjamin
0a35ca2ff7
nagios: Reduce the threshold for nagios alerts about the size of rabbitmq queues
...
(imported from commit b3d999913caae5b36892be4ddeee1fdbc84e147b)
2013-12-11 15:10:29 -05:00