monzo / response

Monzo's real-time incident response and reporting tool ⚡️
MIT License
1.53k stars 165 forks source link

Make Demo Work #45

Closed time-less-ness closed 5 years ago

time-less-ness commented 5 years ago

I set up the Demo. Trying to create an incident, I get these errors:

response    |  ERROR - signals    - 'Critical'
response    | Traceback (most recent call last):
response    |   File "/app/slack/signals.py", line 21, in update_headline_after_incident_save
response    |     incident=instance
response    |   File "/usr/local/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
response    |     return getattr(self.get_queryset(), name)(*args, **kwargs)
response    |   File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
response    |     self.model._meta.object_name
response    | slack.models.headline_post.HeadlinePost.DoesNotExist: HeadlinePost matching query does not exist.

and

...(more traceback ommitted)...
response    |     msg.add_block(Section(block_id="severity", text=Text(f"{self.incident.severity_emoji()} Severity: {severity_text}")))
response    |   File "/app/core/models/incident.py", line 88, in severity_emoji
response    |     }[self.severity]
response    | KeyError: 'Critical'

I tried logging into the Web UI (...ngrok.../admin as admin/admin) which although not-documented, did work. Still, just poking around the UI a little bit I ran out of ngrok API calls. So I really can't fix this myself in a demo mode.

Thanks for what's here. Looks pretty promising!

time-less-ness commented 5 years ago

Update: I can poke at the UI as long as I go in slow motion... ;) If I try to update the incident severity in the UI, I get another error:

Request Method: | POST
-- | --
http://....ngrok.io/admin/core/incident/1/change/
2.2.2
KeyError
'ts'
/app/slack/models/headline_post.py in update_in_slack, line 87
/usr/local/bin/python3
3.7.3
['/app',  '/usr/local/lib/python37.zip',  '/usr/local/lib/python3.7',  '/usr/local/lib/python3.7/lib-dynload',  '/usr/local/lib/python3.7/site-packages']
Tue, 2 Jul 2019 15:39:02 +0000

Perhaps there've been a few commits since last the demo worked? Would it help if I get this working and submit a PR? I'm guessing it's just the default schema you apply to the database is missing some tables.

time-less-ness commented 5 years ago

I saw the other issue where they were hitting the ts problem. I created the #incidents channel. No luck. I invited the bot into the channel. That worked, but still get errors of whatever severity I choose when attempting to create incident from Slack.

AshleyPoole commented 5 years ago

Hey @philovivero, I pulled down the latest monzo-master, and was able to successfully declare an incident, assigned a lead and close the incident -- normally i work of our (Protolabs) own fork.

Normally those type of errors are Slack permission related. It might be worth double checking the Slack permissions and re-installing the app within Slack. Also, worth checking there isn't an "#" symbol in front of the channel name in the .env config.

Something worth noting, when I've re-installed the app in the past, i've found Response/bot then cannot update previous headline posts, so recommend testing with a new incident. Hope some of this helps!

evnsio commented 5 years ago

Hey @philovivero 👋 You're absolutely right, this was a bug that got introduced a little while ago. I've just merged a PR which should fix this: https://github.com/monzo/response/pull/53

Thanks for flagging - appreciate you taking the time.