Change Humbug => Zulip in text/comments.
(imported from commit 2f9d73431ae40e1b9e9e11bc2f4f62f566ae758a)
This commit is contained in:
parent
42616682d5
commit
4cd4c6897b
29 changed files with 76 additions and 76 deletions
|
@ -60,8 +60,8 @@ logger.addHandler(file_handler)
|
|||
|
||||
# Initialize list of streams to test
|
||||
if options.sharded:
|
||||
# NOTE: Streams in this list must be in humbug_user's Humbug
|
||||
# subscriptions, or we won't receive messages via Humbug.
|
||||
# NOTE: Streams in this list must be in humbug_user's Zulip
|
||||
# subscriptions, or we won't receive messages via Zulip.
|
||||
|
||||
# The sharded stream list has a bunch of pairs
|
||||
# (stream, shard_name), where sha1sum(stream).startswith(shard_name)
|
||||
|
@ -105,7 +105,7 @@ def print_status_and_exit(status):
|
|||
def send_humbug(message):
|
||||
result = humbug_client.send_message(message)
|
||||
if result["result"] != "success":
|
||||
logger.error("Error sending humbug, args were:")
|
||||
logger.error("Error sending zulip, args were:")
|
||||
logger.error(message)
|
||||
logger.error(result)
|
||||
print_status_and_exit(1)
|
||||
|
@ -126,16 +126,16 @@ def send_zephyr(zwrite_args, content):
|
|||
print_status_and_exit(1)
|
||||
return False
|
||||
|
||||
# Subscribe to Humbugs
|
||||
# Subscribe to Zulip
|
||||
try:
|
||||
res = humbug_client.get_profile()
|
||||
max_message_id = res.get('max_message_id')
|
||||
if max_message_id is None:
|
||||
logging.error("Error subscribing to Humbugs!")
|
||||
logging.error("Error subscribing to Zulips!")
|
||||
logging.error(res)
|
||||
print_status_and_exit(1)
|
||||
except Exception:
|
||||
logger.exception("Unexpected error subscribing to Humbugs")
|
||||
logger.exception("Unexpected error subscribing to Zulips")
|
||||
print_status_and_exit(1)
|
||||
|
||||
# Subscribe to Zephyrs
|
||||
|
@ -234,7 +234,7 @@ for key, (stream, test) in zhkeys.items():
|
|||
receive_zephyrs()
|
||||
logger.info("Sent Zephyr messages!")
|
||||
|
||||
# Send Humbugs
|
||||
# Send Zulips
|
||||
for key, (stream, test) in hzkeys.items():
|
||||
if stream == "message":
|
||||
send_humbug({
|
||||
|
@ -251,7 +251,7 @@ for key, (stream, test) in hzkeys.items():
|
|||
})
|
||||
receive_zephyrs()
|
||||
|
||||
logger.info("Sent Humbug messages!")
|
||||
logger.info("Sent Zulip messages!")
|
||||
|
||||
# Normally messages manage to forward through in under 3 seconds, but
|
||||
# sleep 10 to give a safe margin since the messages do need to do 2
|
||||
|
@ -263,9 +263,9 @@ receive_zephyrs()
|
|||
|
||||
logger.info("Starting receiving messages!")
|
||||
|
||||
# receive humbugs
|
||||
# receive zulips
|
||||
messages = humbug_client.get_messages({'last': str(max_message_id)})['messages']
|
||||
logger.info("Finished receiving Humbug messages!")
|
||||
logger.info("Finished receiving Zulip messages!")
|
||||
|
||||
receive_zephyrs()
|
||||
logger.info("Finished receiving Zephyr messages!")
|
||||
|
@ -286,7 +286,7 @@ def process_keys(content_list):
|
|||
success = all(val == 1 for val in key_counts.values())
|
||||
return key_counts, z_missing, h_missing, duplicates, success
|
||||
|
||||
# The h_foo variables are about the messages we _received_ in Humbug
|
||||
# The h_foo variables are about the messages we _received_ in Zulip
|
||||
# The z_foo variables are about the messages we _received_ in Zephyr
|
||||
h_contents = [message["content"] for message in messages]
|
||||
z_contents = [notice.message.split('\0')[1] for notice in notices]
|
||||
|
@ -299,7 +299,7 @@ if z_success and h_success:
|
|||
elif z_success:
|
||||
logger.info("Received everything correctly in Zephyr!")
|
||||
elif h_success:
|
||||
logger.info("Received everything correctly in Humbug!")
|
||||
logger.info("Received everything correctly in Zulip!")
|
||||
|
||||
logger.error("Messages received the wrong number of times:")
|
||||
for key in all_keys:
|
||||
|
@ -311,37 +311,37 @@ for key in all_keys:
|
|||
(key, z_key_counts[key], h_key_counts[key], test, stream))
|
||||
if key in hzkeys:
|
||||
(stream, test) = hzkeys[key]
|
||||
logger.warning("%10s: z got %s. h got %s. Sent via Humbug(%s): class %s" % \
|
||||
logger.warning("%10s: z got %s. h got %s. Sent via Zulip(%s): class %s" % \
|
||||
(key, z_key_counts[key], h_key_counts[key], test, stream))
|
||||
logger.error("")
|
||||
logger.error("Summary of specific problems:")
|
||||
|
||||
if h_duplicates:
|
||||
logger.error("humbug: Received duplicate messages!")
|
||||
logger.error("humbug: This is probably a bug in our message loop detection.")
|
||||
logger.error("humbug: where Humbugs go humbug=>zephyr=>humbug")
|
||||
logger.error("zulip: Received duplicate messages!")
|
||||
logger.error("zulip: This is probably a bug in our message loop detection.")
|
||||
logger.error("zulip: where Zulips go zulip=>zephyr=>zulip")
|
||||
if z_duplicates:
|
||||
logger.error("zephyr: Received duplicate messages!")
|
||||
logger.error("zephyr: This is probably a bug in our message loop detection.")
|
||||
logger.error("zephyr: where Zephyrs go zephyr=>humbug=>zephyr")
|
||||
logger.error("zephyr: where Zephyrs go zephyr=>zulip=>zephyr")
|
||||
|
||||
if z_missing_z:
|
||||
logger.error("zephyr: Didn't receive all the Zephyrs we sent on the Zephyr end!")
|
||||
logger.error("zephyr: This is probably an issue with check-mirroring sending or receiving Zephyrs.")
|
||||
if h_missing_h:
|
||||
logger.error("humbug: Didn't receive all the Humbugs we sent on the Humbug end!")
|
||||
logger.error("humbug: This is probably an issue with check-mirroring sending or receiving Humbugs.")
|
||||
logger.error("zulip: Didn't receive all the Zulips we sent on the Zulip end!")
|
||||
logger.error("zulip: This is probably an issue with check-mirroring sending or receiving Zulips.")
|
||||
if z_missing_h:
|
||||
logger.error("zephyr: Didn't receive all the Humbugs we sent on the Zephyr end!")
|
||||
logger.error("zephyr: Didn't receive all the Zulips we sent on the Zephyr end!")
|
||||
if z_missing_h == h_missing_h:
|
||||
logger.error("zephyr: Including some Humbugs that we did receive on the Humbug end.")
|
||||
logger.error("zephyr: This suggests we have a humbug=>zephyr mirroring problem.")
|
||||
logger.error("zephyr: Including some Zulips that we did receive on the Zulip end.")
|
||||
logger.error("zephyr: This suggests we have a zulip=>zephyr mirroring problem.")
|
||||
logger.error("zephyr: aka the personals mirroring script has issues.")
|
||||
if h_missing_z:
|
||||
logger.error("humbug: Didn't receive all the Zephyrs we sent on the Humbug end!")
|
||||
logger.error("zulip: Didn't receive all the Zephyrs we sent on the Zulip end!")
|
||||
if h_missing_z == z_missing_z:
|
||||
logger.error("humbug: Including some Zephyrs that we did receive on the Zephyr end.")
|
||||
logger.error("humbug: This suggests we have a zephyr=>humbug mirroring problem.")
|
||||
logger.error("humbug: aka the global class mirroring script has issues.")
|
||||
logger.error("zulip: Including some Zephyrs that we did receive on the Zephyr end.")
|
||||
logger.error("zulip: This suggests we have a zephyr=>zulip mirroring problem.")
|
||||
logger.error("zulip: aka the global class mirroring script has issues.")
|
||||
|
||||
print_status_and_exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue