Netflix / dispatch

All of the ad-hoc things you're doing to manage incidents today, done for you, and much more!
Apache License 2.0
5.15k stars 515 forks source link

Paging on-call does not work when using / commands from private channel #2513

Closed rivlinpereira closed 2 years ago

rivlinpereira commented 2 years ago

Describe the bug See the following error when I try to engage the on-call person from a private channel that dispatch creates

Sorry, we've run into an unexpected error. For help please reach out to your Dispatch admins and provide them with the following token: xxxxxxxxx

To Reproduce Steps to reproduce the behavior:

  1. Create incident
  2. Go to the private channel that dispatch creates
  3. Try to use /dispatch-engage-oncall
  4. Choose the service
  5. You will see the error above

Expected behavior The /dispatch-engage-oncall should work

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

mvilanova commented 2 years ago

@rivlinpereira is there an error in the server logs that you can share? Did you configure the pagerduty or opsgenie plugins?

rivlinpereira commented 2 years ago

@rivlinpereira is there an error in the server logs that you can share? Did you configure the pagerduty or opsgenie plugins?

Using pagerduty plugin configured via UI. The only logs i see from the slack container are -

ERROR:slack_sdk.socket_mode.aiohttp:Failed to run a request listener: 'email', session: s_xxxxxxxx
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/slack_sdk/socket_mode/async_client.py", line 156, in run_message_listeners
    await listener(self, request)  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/dispatch/plugins/dispatch_slack/socket_mode.py", line 36, in process
    response = await handle_slack_event(
  File "/usr/local/lib/python3.9/site-packages/dispatch/plugins/dispatch_slack/events.py", line 133, in handle_slack_event
    user_email = await dispatch_slack_service.get_user_email_async(client, user_id)
  File "/usr/local/lib/python3.9/site-packages/dispatch/plugins/dispatch_slack/service.py", line 202, in get_user_email_async
    return user_info["profile"]["email"]
KeyError: 'email'
mvilanova commented 2 years ago

Sounds like you were able to resolve it based on this discussion? Feel free to close the issue if so.

rivlinpereira commented 2 years ago

Sounds like you were able to resolve it based on this discussion? Feel free to close the issue if so.

yes but now facing another issue. closing this one