Merge lp:~michael.nelson/conn-check/configs-no-assume-publisher-type into lp:~ubuntuone-hackers/conn-check/configs

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: 30
Merged at revision: 30
Proposed branch: lp:~michael.nelson/conn-check/configs-no-assume-publisher-type
Merge into: lp:~ubuntuone-hackers/conn-check/configs
Diff against target: 12 lines (+1/-1)
1 file modified
conn_check_configs/django.py (+1/-1)
To merge this branch: bzr merge lp:~michael.nelson/conn-check/configs-no-assume-publisher-type
Reviewer Review Type Date Requested Status
Kelvin Li (community) Approve
Review via email: mp+279719@code.launchpad.net

Commit message

Don't assume an oops publisher has a type key (additionally need to check for fallback_chain, but this is smallest unblocking change)

Description of the change

This is the smallest change I could manage to unblock our deployment CI, which is currently failing because I switched to use an oops fallback_chain instead of a list of publishers.

Here's the error which CI hits: https://pastebin.canonical.com/145554/

As per the docs, the issue is that we can no-longer assume an item in the publishers list is a single publisher with a 'type' key:

http://bazaar.launchpad.net/~canonical-ca-hackers/python-oops-dictconfig/trunk/view/head:/README#L97

This will unblock our deployment, but we still need a further change to iterate through the fallback_chain list of publishers, I assume.

To post a comment you must log in.
Revision history for this message
Kelvin Li (kelvin.li) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'conn_check_configs/django.py'
--- conn_check_configs/django.py 2015-10-21 09:33:24 +0000
+++ conn_check_configs/django.py 2015-12-07 03:54:49 +0000
@@ -82,7 +82,7 @@
8282
83 publishers = oopses.get('publishers', [])83 publishers = oopses.get('publishers', [])
84 for publisher in publishers:84 for publisher in publishers:
85 if publisher['type'] == 'amqp':85 if publisher.get('type') == 'amqp':
86 if ':' in publisher['host']:86 if ':' in publisher['host']:
87 host, port = publisher['host'].split(':')87 host, port = publisher['host'].split(':')
88 else:88 else:

Subscribers

People subscribed via source and target branches