Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web errors #224

Closed
gazzerman2 opened this issue Apr 15, 2020 · 46 comments
Closed

Web errors #224

gazzerman2 opened this issue Apr 15, 2020 · 46 comments

Comments

@gazzerman2
Copy link

gazzerman2 commented Apr 15, 2020

Unable to submit an incident, web container is throwing this, any help much appreciated.

Failed to load plugin zoom_conference. Reason: "Config 'ZOOM_API_USER_ID' is missing, and has no default."
WARNING:  Unable to import fbprophet, some metrics will not be usable.
WARNING:  Failed to load plugin zoom_conference. Reason: "Config 'ZOOM_API_USER_ID' is missing, and has no default."
INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     9.211.132.131:56970 - "GET / HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/css/app.95d8a627.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56971 - "GET /static/css/chunk-vendors.54ed3ea1.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56972 - "GET /static/js/chunk-vendors.f9f651a8.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/js/app.1cedeeb4.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56974 - "GET /static/css/definition-table.ebaaeb9b.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56975 - "GET /static/css/definition-table~incident-dashboard~incident-table~incidents-report~incidents-status~individual-tabl~653abfa5.343268aa.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56976 - "GET /static/css/definition-table~incident-table~incidents-status~individual-table~knowledge-table~policy-table~routi~95f9995b.548fe094.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56974 - "GET /static/css/error-403.5125a358.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56976 - "GET /static/css/errors-404.de8a6bb5.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56975 - "GET /static/css/errors-500.bbf8b0ec.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56974 - "GET /static/css/incident-dashboard~incident-table.b315c2ce.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56976 - "GET /static/css/incident-table.641f6b2c.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/css/incidents-report.9d21c0d7.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56975 - "GET /static/css/individual-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56974 - "GET /static/css/knowledge-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56976 - "GET /static/css/policy-table.9d21c0d7.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/css/routing-table~service-table.1d27bab4.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56975 - "GET /static/css/tag-table.9d21c0d7.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56974 - "GET /static/css/team-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.211.132.131:56976 - "GET /static/js/definition-table.a05461b5.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/js/definition-table~incident-dashboard~incident-table~incidents-report~incidents-status~individual-tabl~653abfa5.c90c4de1.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56975 - "GET /static/js/definition-table~incident-table~incidents-report~individual-table~knowledge-table~routing-table~serv~9c57d9df.7546f311.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56974 - "GET /static/js/definition-table~incident-table~incidents-status~individual-table~knowledge-table~policy-table~routi~95f9995b.bd2967ff.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56972 - "GET /static/js/error-403.8c1e8dbb.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56971 - "GET /static/js/errors-404.c705045c.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/js/errors-500.f59c3e98.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56976 - "GET /static/js/incident-dashboard.d1db1531.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56971 - "GET /static/js/incidents-report.1147d598.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/js/incident-dashboard~incident-table.fae29dec.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56975 - "GET /static/js/incident-table.9ff946a3.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56974 - "GET /static/js/incidents-status.7b1e502b.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56971 - "GET /static/js/individual-table.86a83a39.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56972 - "GET /static/js/knowledge-table.0d010175.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/js/policy-table.1ecce372.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56974 - "GET /static/js/routing-table.3c4ab2f4.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56971 - "GET /static/js/routing-table~service-table.efa19ce9.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56972 - "GET /static/js/search-result-list.f64f2c7c.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/js/service-table.4d71d004.js HTTP/1.1" 200 OK
INFO:     9.211.132.131:56975 - "GET /static/js/tag-table.05994c1a.js HTTP/1.1" 200 OK
ERROR:    Unable to find slug:  in self.all version 1: <generator object PluginManager.all at 0x7ff2d6813740> or version 2: <generator object PluginManager.all at 0x7ff2d6813740>
INFO:     9.211.132.131:56974 - "GET /api/v1/incident_types/?itemsPerPage=50&sortBy[]=name&descending[]=false HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in __call__
    response = await self.dispatch_func(request, self.call_next)
  File "/usr/local/lib/python3.8/site-packages/dispatch/main.py", line 103, in dispatch
    metric_provider.timer("server.call.elapsed", value=elapsed_time, tags=tags)
  File "/usr/local/lib/python3.8/site-packages/dispatch/metrics.py", line 40, in timer
    p = plugins.get(provider)
  File "/usr/local/lib/python3.8/site-packages/dispatch/plugins/base/manager.py", line 43, in get
    raise KeyError(slug)
KeyError: ''
INFO:     9.211.132.131:56972 - "GET /static/fonts/Roboto-Regular.73f0a88b.woff2 HTTP/1.1" 200 OK
INFO:     9.211.132.131:56970 - "GET /static/fonts/materialdesignicons-webfont.7fb0e378.woff2 HTTP/1.1" 200 OK
INFO:     9.211.132.131:56971 - "GET /static/fonts/Roboto-Medium.90d16760.woff2 HTTP/1.1" 200 OK
ERROR:    Unable to find slug:  in self.all version 1: <generator object PluginManager.all at 0x7ff2d47787b0> or version 2: <generator object PluginManager.all at 0x7ff2d47787b0>
INFO:     9.211.132.131:56975 - "GET /api/v1/incident_priorities/?sortBy[]=view_order&descending[]=false HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in __call__
    response = await self.dispatch_func(request, self.call_next)
  File "/usr/local/lib/python3.8/site-packages/dispatch/main.py", line 103, in dispatch
    metric_provider.timer("server.call.elapsed", value=elapsed_time, tags=tags)
  File "/usr/local/lib/python3.8/site-packages/dispatch/metrics.py", line 40, in timer
    p = plugins.get(provider)
  File "/usr/local/lib/python3.8/site-packages/dispatch/plugins/base/manager.py", line 43, in get
    raise KeyError(slug)
KeyError: ''

What's the keyerror?

@mvilanova
Copy link
Contributor

@gazzerman2 Dispatch's plugin manager is trying to find the plugin for metrics using a slug, but it can't because it's not defined and the default is "" (see https://github.com/Netflix/dispatch/blob/develop/src/dispatch/config.py#L100). We don't have an open source one yet. We will add a test one as soon as we can to get you going. Or if you have time, you can submit a PR for it. Examples here: https://github.com/Netflix/dispatch/tree/develop/src/dispatch/plugins/dispatch_test

@mvilanova
Copy link
Contributor

Also, looks like you haven't set a value for ZOOM_API_USER_ID.

@mvilanova
Copy link
Contributor

Will #223 allow people to disable the metric plugin, @kevgliss?

@kevgliss
Copy link
Contributor

kevgliss commented Apr 15, 2020

Eventually yes, but with metrics specifically it shouldn't be an issue today:

https://github.com/Netflix/dispatch/blob/develop/src/dispatch/metrics.py#L14

@gazzerman2 do you have anything in your config for METRIC_PROVIDERS? If so I would remove it and try again.

@gazzerman2
Copy link
Author

Thanks guys, I didn't have METRIC_PROVIDERS in my config, let me try that and rebuild, appreciate the help here.

@gazzerman2
Copy link
Author

gazzerman2 commented Apr 16, 2020

Added in METRIC_PROVIDERS and set it to " " in my config, rebuilt and its still throwing. the KeyError?

ERROR:    Unable to find slug:  in self.all version 1: <generator object PluginManager.all at 0x7fcd362426d0> or version 2: <generator object PluginManager.all at 0x7fcd362426d0>
INFO:     9.211.152.10:59278 - "GET /api/v1/incidents/metric/forecast/all HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in __call__
    response = await self.dispatch_func(request, self.call_next)
  File "/usr/local/lib/python3.8/site-packages/dispatch/main.py", line 103, in dispatch
    metric_provider.timer("server.call.elapsed", value=elapsed_time, tags=tags)
  File "/usr/local/lib/python3.8/site-packages/dispatch/metrics.py", line 40, in timer
    p = plugins.get(provider)
  File "/usr/local/lib/python3.8/site-packages/dispatch/plugins/base/manager.py", line 43, in get
    raise KeyError(slug)
KeyError: ''

@gazzerman2
Copy link
Author

gazzerman2 commented Apr 16, 2020

The Web is also throwing a 500 against this API
http://MYSERVERNAME/api/v1/incidents/?itemsPerPage=-1&sortBy[]=reported_at&fields[]=reported_at&fields[]=reported_at&ops[]=%3C%3D&ops[]=%3E%3D&values[]=2020-04-16T10:56:09%2B01:00&values[]=2019-10-16T10:56:09%2B01:00&descending[]=true

Screenshot 2020-04-16 at 12 15 20

The second 500 as you can see is the metrics one we have an issue with.

@kevgliss
Copy link
Contributor

Ah, forecast metric won't work unless you have fbprophet dependency installed (we're working on removing it as its terrible to install).

Regarding the first error, I wouldn't expect you to set anything for METRIC_PROVIDERS

I would ask you add a print here:
https://github.com/Netflix/dispatch/blob/develop/src/dispatch/metrics.py#L14
To see the value of METRIC_PROVIDERS it should be [] if nothing is configured and thus not throw a key error because that code path shouldn't be executed.

@gazzerman2
Copy link
Author

If I exec into the web container and run a set this is what its set to, not sure why its single and double quoted?

LINES=44
MACHTYPE=x86_64-pc-linux-gnu
MAILCHECK=60
METRIC_PROVIDERS='""'
OPTERR=1
OPTIND=1

@mvilanova
Copy link
Contributor

@gazzerman2 I set the value to "" in my .env file and the server started fine. You should see the following message in the console: No metric providers specified metrics will not be sent..

@kevgliss
Copy link
Contributor

@gazzerman2 I would try to unset that envvar entirely, my guess is thatsince you have double quoting that the value is being set to [' "" '].

@gazzerman2
Copy link
Author

Will try that and get back, thanks for the help @kevgliss

@gazzerman2
Copy link
Author

gazzerman2 commented Apr 21, 2020

OK these are now fixed, now onto my next web issue

Incidents won't load due to a 401 auth issue

Screenshot 2020-04-21 at 16 21 46

Screenshot 2020-04-21 at 16 17 44

Data is present

root@095f99b362fa:/# echo 'select * from public.service;select * from public.application;'| psql -h dispatch_postgres_1 -d dispatch -U $POSTGRES_USER  -w
 id | is_active |     name     |       type       | external_id |  search_vector   |         created_at         |        updated_at
----+-----------+--------------+------------------+-------------+------------------+----------------------------+--------------------------
  2 | t         | SomeService1 | pagerduty-oncall | serviceID1  | 'someservice1':1 | 2020-03-22 17:55:03.755493 | 2020-03-22 17:55:03.7555
(1 row)
 id |     name     |       description        |               uri                |              source              |  search_vector   |         created_at         |         updated_at
----+--------------+--------------------------+----------------------------------+----------------------------------+------------------+----------------------------+----------------------------
  1 | Application1 | Application1 description | https://example.com/application1 | https://example.com/application1 | 'application1':1 | 2020-03-23 11:08:50.406011 | 2020-03-23 11:08:50.406002
(1 row)

Do I need to have Authentication enabled just to look at incidents? @kevgliss

@gazzerman2
Copy link
Author

@mvilanova have you any idea on the above? Thanks!

@mvilanova
Copy link
Contributor

@gazzerman2 you can disable auth by setting DISPATCH_AUTHENTICATION_PROVIDER="". See auth docs here: https://hawkins.gitbook.io/dispatch/configuration/app#authentication. Try again and let us know!

@gazzerman2
Copy link
Author

Same with DISPATCH_AUTHENTICATION_PROVIDER="" @mvilanova

Screenshot 2020-04-22 at 17 55 28

@mvilanova
Copy link
Contributor

@kevgliss can confirm, but I think his ongoing PR (#241) should fix these problems.

@kevgliss
Copy link
Contributor

@gazzerman2 I think this should be fixed by #250

@gazzerman2
Copy link
Author

gazzerman2 commented Apr 23, 2020

Unfortunately not POST /api/v1/incidents/ HTTP/1.1" 401 Unauthorized
Also I had to hack/modify ./lib/python3.8/site-packages/dispatch/api.py and change it to use unauthenticated routes to remove the 401 from them which is not right

authenticated_api_router.include_router(document_router, prefix="/documents", tags=["documents"])
authenticated_api_router.include_router(tag_router, prefix="/tags", tags=["Tags"])
authenticated_api_router.include_router(service_router, prefix="/services", tags=["services"])
authenticated_api_router.include_router(team_contact_router, prefix="/teams", tags=["teams"])
authenticated_api_router.include_router(
    individual_contact_router, prefix="/individuals", tags=["individuals"]
)
authenticated_api_router.include_router(route_router, prefix="/route", tags=["route"])
authenticated_api_router.include_router(policy_router, prefix="/policies", tags=["policies"])
authenticated_api_router.include_router(
    definition_router, prefix="/definitions", tags=["definitions"]
)
authenticated_api_router.include_router(team_router, prefix="/terms", tags=["terms"])
authenticated_api_router.include_router(task_router, prefix="/tasks", tags=["tags"])
authenticated_api_router.include_router(search_router, prefix="/search", tags=["search"])
authenticated_api_router.include_router(incident_router, prefix="/incidents", tags=["incidents"])
authenticated_api_router.include_router(
    incident_type_router, prefix="/incident_types", tags=["incident_types"]
)
authenticated_api_router.include_router(
    incident_priority_router, prefix="/incident_priorities", tags=["incident_priorities"]

@gazzerman2
Copy link
Author

@kevgliss and @mvilanova
I pulled the latest code this morning thinking since #224 was merged now it would fix my issue:

Steps done:

  1. Removed all containers, volumes and images
  2. Ran ./insatll.sh again
  3. Dropped the DB
  4. Ran the dispatch database restore --dump-file dispatch-sample-data.dump
  5. Ran dispatch database init
  6. Ran dispatch database upgrade
  7. Checked I had data loaded
root@WEBCONTAINER:/# echo 'select * from public.service;select * from public.application;'| psql -h dispatch_postgres_1 -d dispatch -U $POSTGRES_USER  -w
 id | is_active |     name     |       type       | external_id |  search_vector   |         created_at         |        updated_at
----+-----------+--------------+------------------+-------------+------------------+----------------------------+--------------------------
  2 | t         | SomeService1 | pagerduty-oncall | serviceID1  | 'someservice1':1 | 2020-03-22 17:55:03.755493 | 2020-03-22 17:55:03.7555
(1 row)

 id |     name     |       description        |               uri                |              source              |  search_vector   |         created_at         |         updated_at
----+--------------+--------------------------+----------------------------------+----------------------------------+------------------+----------------------------+----------------------------
  1 | Application1 | Application1 description | https://example.com/application1 | https://example.com/application1 | 'application1':1 | 2020-03-23 11:08:50.406011 | 2020-03-23 11:08:50.406002
(1 row)
  1. Opened http://myservername/dashboard
    9.Checked the browser console for errors
    Screenshot 2020-04-24 at 10 40 39
    19.Clicked on Incident Types
    Screenshot 2020-04-24 at 10 45 18

You get the picture, 401's everywhere still
.env settings for auth

# Authentication
DISPATCH_AUTHENTICATION_PROVIDER_PKCE_JWKS=""
DISPATCH_AUTHENTICATION_PROVIDER=""

# Frontend
VUE_APP_DISPATCH_AUTHENTICATION_PROVIDER_PKCE_OPEN_ID_CONNECT_URL=""
VUE_APP_DISPATCH_AUTHENTICATION_PROVIDER_PKCE_CLIENT_ID=""

Any tips is much appreciated. Thanks!

@kevgliss
Copy link
Contributor

I think you are setting the wrong var in your env.

You have:
DISPATCH_AUTHENTICATION_PROVIDER

It should be:
DISPATCH_AUTHENTICATION_PROVIDER_SLUG

See here:
https://hawkins.gitbook.io/dispatch/configuration/app#dispatch_authentication_provider_slug-default-dispatch-auth-provider-basic

If you found the other string somewhere in the documentation let us know and we'll get that fixed.

@gazzerman2
Copy link
Author

Thanks a lot, I got it from @mvilanova ;-)

@gazzerman2 you can disable auth by setting DISPATCH_AUTHENTICATION_PROVIDER="". See auth docs here: https://hawkins.gitbook.io/dispatch/configuration/app#authentication. Try again and let us know!

@gazzerman2
Copy link
Author

gazzerman2 commented Apr 27, 2020

OK so I modified the .env file today to fix DISPATCH_AUTHENTICATION_PROVIDER_SLUG

  1. I replaced DISPATCH_AUTHENTICATION_PROVIDER with DISPATCH_AUTHENTICATION_PROVIDER_SLUG and set it to = ""
  2. Rebuilt and tested it
NFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     9.141.86.208:59820 - "GET /incidents HTTP/1.1" 200 OK
INFO:     9.141.86.208:59821 - "GET /static/css/chunk-vendors.54ed3ea1.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59820 - "GET /static/css/app.95d8a627.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59822 - "GET /static/js/app.071d3175.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59820 - "GET /static/js/chunk-vendors.f9f651a8.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59823 - "GET /static/css/definition-table.ebaaeb9b.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59824 - "GET /static/css/definition-table~incident-dashboard~incident-table~incidents-report~incidents-status~individual-tabl~653abfa5.343268aa.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59825 - "GET /static/css/definition-table~incident-table~incidents-status~individual-table~knowledge-table~policy-table~routi~95f9995b.548fe094.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59823 - "GET /static/css/error-403.5125a358.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59825 - "GET /static/css/errors-404.de8a6bb5.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59822 - "GET /static/css/errors-500.bbf8b0ec.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59823 - "GET /static/css/incident-dashboard~incident-table.b315c2ce.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59824 - "GET /static/css/incident-table.3ec489a6.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59825 - "GET /static/css/incidents-report.9d21c0d7.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59822 - "GET /static/css/individual-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59825 - "GET /static/css/knowledge-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59823 - "GET /static/css/policy-table.9d21c0d7.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59822 - "GET /static/css/routing-table~service-table.1d27bab4.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59825 - "GET /static/css/team-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59824 - "GET /static/css/tag-table.9d21c0d7.css HTTP/1.1" 200 OK
INFO:     9.141.86.208:59823 - "GET /static/js/definition-table.a05461b5.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59825 - "GET /static/js/definition-table~incident-table~incidents-status~individual-table~knowledge-table~policy-table~routi~95f9995b.bd2967ff.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59822 - "GET /static/js/definition-table~incident-table~incidents-report~individual-table~knowledge-table~routing-table~serv~9c57d9df.7546f311.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59824 - "GET /static/js/definition-table~incident-dashboard~incident-table~incidents-report~incidents-status~individual-tabl~653abfa5.c90c4de1.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59821 - "GET /static/js/error-403.8c1e8dbb.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59823 - "GET /static/js/errors-404.c705045c.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59822 - "GET /static/js/errors-500.f59c3e98.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59824 - "GET /static/js/incident-dashboard.d1db1531.js HTTP/1.1" 200 OK
INFO:     9.141.86.208:59821 - "GET /static/js/incident-dashboard~incident-table.fae29dec.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59825 - "GET /static/js/incidents-report.1147d598.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59823 - "GET /static/js/incident-table.e33391e3.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59822 - "GET /static/js/incidents-status.7b1e502b.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59821 - "GET /static/js/individual-table.86a83a39.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59820 - "GET /static/js/knowledge-table.0d010175.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59825 - "GET /static/js/policy-table.1ecce372.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59822 - "GET /static/js/routing-table.3c4ab2f4.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59821 - "GET /static/js/chunk-vendors.f9f651a8.js.map HTTP/1.1" 200 OK
INFO:     9.141.86.108:59820 - "GET /static/js/app.071d3175.js.map HTTP/1.1" 200 OK
INFO:     9.141.86.108:59825 - "GET /static/js/routing-table~service-table.efa19ce9.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59823 - "GET /static/js/definition-table~incident-dashboard~incident-table~incidents-report~incidents-status~individual-tabl~653abfa5.c90c4de1.js.map HTTP/1.1" 200 OK
INFO:     9.141.86.108:59822 - "GET /static/js/definition-table~incident-table~incidents-status~individual-table~knowledge-table~policy-table~routi~95f9995b.bd2967ff.js.map HTTP/1.1" 200 OK
INFO:     9.141.86.108:59825 - "GET /static/js/definition-table~incident-table~incidents-report~individual-table~knowledge-table~routing-table~serv~9c57d9df.7546f311.js.map HTTP/1.1" 200 OK
INFO:     9.141.86.208:59823 - "GET /static/js/incident-dashboard~incident-table.fae29dec.js.map HTTP/1.1" 200 OK
INFO:     9.141.86.108:59820 - "GET /static/js/service-table.4d71d004.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59822 - "GET /static/js/tag-table.05994c1a.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59823 - "GET /static/js/team-table.f8e94cba.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59824 - "GET /static/js/search-result-list.f64f2c7c.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:59820 - "GET /static/js/incident-table.e33391e3.js.map HTTP/1.1" 200 OK
ERROR:    Unable to find slug: "" in self.all version 1: <generator object PluginManager.all at 0x7f0a1e3b1ac0> or version 2: <generator object PluginManager.all at 0x7f0a1e3b1ac0>
INFO:     9.141.86.108:59825 - "GET /api/v1/incident_types/?itemsPerPage=50&sortBy[]=name&descending[]=false HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 22, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 19, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 376, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 149, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 186, in app
    solved_result = await solve_dependencies(
  File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 510, in solve_dependencies
    solved = await run_in_threadpool(call, **sub_values)
  File "/usr/local/lib/python3.8/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
    return await loop.run_in_executor(None, func, *args)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/dispatch/auth/service.py", line 22, in get_current_user
    auth_plugin = plugins.get(DISPATCH_AUTHENTICATION_PROVIDER_SLUG)
  File "/usr/local/lib/python3.8/site-packages/dispatch/plugins/base/manager.py", line 43, in get
    raise KeyError(slug)
KeyError: '""'

Having seen that I then said, OK it didn't like nothing set so I will set it to the default from here

if DISPATCH_AUTHENTICATION_PROVIDER_SLUG == "dispatch-auth-provider-basic":

So i set DISPATCH_AUTHENTICATION_PROVIDER_SLUG=dispatch-auth-provider-basic and rebuilt but I got

INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     9.141.86.108:53774 - "GET /incidents HTTP/1.1" 200 OK
INFO:     9.141.86.108:53774 - "GET /static/css/app.95d8a627.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53775 - "GET /static/css/chunk-vendors.54ed3ea1.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/js/app.071d3175.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53774 - "GET /static/js/chunk-vendors.f9f651a8.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/css/definition-table.ebaaeb9b.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/css/definition-table~incident-dashboard~incident-table~incidents-report~incidents-status~individual-tabl~653abfa5.343268aa.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53779 - "GET /static/css/definition-table~incident-table~incidents-status~individual-table~knowledge-table~policy-table~routi~95f9995b.548fe094.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/css/error-403.5125a358.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53779 - "GET /static/css/errors-404.de8a6bb5.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/css/errors-500.bbf8b0ec.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/css/incident-dashboard~incident-table.b315c2ce.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/css/individual-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/css/knowledge-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/css/policy-table.9d21c0d7.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53779 - "GET /static/css/routing-table~service-table.1d27bab4.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/css/tag-table.9d21c0d7.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/css/team-table.d5fecaa8.css HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/js/definition-table.a05461b5.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53779 - "GET /static/js/definition-table~incident-dashboard~incident-table~incidents-report~incidents-status~individual-tabl~653abfa5.c90c4de1.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/js/definition-table~incident-table~incidents-report~individual-table~knowledge-table~routing-table~serv~9c57d9df.7546f311.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/js/definition-table~incident-table~incidents-status~individual-table~knowledge-table~policy-table~routi~95f9995b.bd2967ff.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53779 - "GET /static/js/error-403.8c1e8dbb.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/js/errors-404.c705045c.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/js/errors-500.f59c3e98.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53779 - "GET /static/js/incident-dashboard.d1db1531.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/js/incident-dashboard~incident-table.fae29dec.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/js/incident-table.e33391e3.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/js/incidents-report.1147d598.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/js/incidents-status.7b1e502b.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/js/individual-table.86a83a39.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/js/knowledge-table.0d010175.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/js/policy-table.1ecce372.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/js/routing-table.3c4ab2f4.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/js/routing-table~service-table.efa19ce9.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53775 - "GET /static/js/service-table.4d71d004.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/js/search-result-list.f64f2c7c.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/js/tag-table.05994c1a.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/js/team-table.f8e94cba.js HTTP/1.1" 200 OK
INFO:     9.141.86.108:53774 - "GET /static/fonts/materialdesignicons-webfont.7fb0e378.woff2 HTTP/1.1" 200 OK
INFO:     9.141.86.108:53778 - "GET /static/fonts/Roboto-Medium.90d16760.woff2 HTTP/1.1" 200 OK
INFO:     9.141.86.108:53776 - "GET /static/fonts/Roboto-Regular.73f0a88b.woff2 HTTP/1.1" 200 OK
INFO:     9.141.86.108:53777 - "GET /static/fonts/Roboto-Bold.b52fac2b.woff2 HTTP/1.1" 200 OK
ERROR:    Unable to find slug: dispatch-auth-provider-basic in self.all version 1: <generator object PluginManager.all at 0x7f534c234900> or version 2: <generator object PluginManager.all at 0x7f534c234900>
ERROR:    Unable to find slug: dispatch-auth-provider-basic in self.all version 1: <generator object PluginManager.all at 0x7f534c234a50> or version 2: <generator object PluginManager.all at 0x7f534c234a50>
INFO:     9.141.86.108:53775 - "GET /api/v1/incident_types/?itemsPerPage=50&sortBy[]=name&descending[]=false HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 22, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 19, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 376, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 149, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 186, in app
    solved_result = await solve_dependencies(
  File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 510, in solve_dependencies
    solved = await run_in_threadpool(call, **sub_values)
  File "/usr/local/lib/python3.8/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
    return await loop.run_in_executor(None, func, *args)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/dispatch/auth/service.py", line 22, in get_current_user
    auth_plugin = plugins.get(DISPATCH_AUTHENTICATION_PROVIDER_SLUG)
  File "/usr/local/lib/python3.8/site-packages/dispatch/plugins/base/manager.py", line 43, in get
    raise KeyError(slug)
KeyError: 'dispatch-auth-provider-basic'
INFO:     9.141.86.108:53779 - "GET /api/v1/incident_priorities/?sortBy[]=view_order&descending[]=false HTTP/1.1" 500 Internal Server Error

@kevgliss FYI. I am still blocked from doing anything on the webUI so I can test this out

@kevgliss
Copy link
Contributor

When is the last time you ran pip install on the project?

It can't find the basic auth plugin:

ERROR: Unable to find slug: dispatch-auth-provider-basic in self.all version 1: <generator object PluginManager.all at 0x7f534c234900> or version 2: <generator object PluginManager.all at 0x7f534c234900>

I would make sure you re-install the application every time there is new code (which on the develop branch is daily).

@gazzerman2
Copy link
Author

Hi @kevgliss

I was under the impression the install.sh pulls and builds the latest docker images, I assumed the dockerfile would do any pip installs of packages it needed?

Daily, I clear all containers, volumes and images, and run the install.sh
https://github.com/Netflix/dispatch-docker/blob/master/install.sh

I also git pull dispatch-docker when it changes.

So are you saying I need to then update the python packages manually?

OR

Does the install.sh actually not pull the /develop branch and only the /master one so I am not getting the latest code until it promoted as in
https://github.com/Netflix/dispatch-docker/blob/master/docker-compose.yml#L20

@kevgliss
Copy link
Contributor

kevgliss commented Apr 27, 2020

It will automatically pull from the master branch, but the master branch does not have the basic dispatch-auth-provider-basic plugin merged in yet which leads to me that you are somehow getting the develop branch.

I'm a bit of a loss as to how you're getting code from the develop branch; if you do truly have the newest version of dispatch docker I would double-check this line:
https://github.com/Netflix/dispatch-docker/blob/master/docker-compose.yml#L20
To make sure it is indeed set to master.

I just walked through a clean install (no prior containers, get pull on dispatch-docker master) and did not run into your issue, here is the env I used:

# For configuration details, see: https://hawkins.gitbook.io/dispatch/configuration/app

# General
COMPOSE_PROJECT_NAME=dispatch
DISPATCH_HELP_EMAIL=help@example.com
DISPATCH_HELP_SLACK_CHANNEL=#general
DISPATCH_UI_URL=https://example.com
DISPATCH_AUTHENTICATION_PROVIDER_SLUG=

# Database
DATABASE_CREDENTIALS=dispatch:dispatch
DATABASE_HOSTNAME=postgres
DATABASE_NAME=dispatch
DATABASE_PORT=5432

# Used by postgres docker
POSTGRES_DB=dispatch
POSTGRES_PASSWORD=dispatch
POSTGRES_USER=dispatch

# Cost
ANNUAL_COST_EMPLOYEE=50000
BUSINESS_HOURS_YEAR=2080

# Incident configuration
INCIDENT_CONVERSATION_COMMANDS_REFERENCE_DOCUMENT_ID="INCIDENT_CONVERSATION_COMMANDS_REFERENCE_DOCUMENT_ID"
INCIDENT_DAILY_SUMMARY_ONCALL_SERVICE_ID=None
INCIDENT_DOCUMENT_INVESTIGATION_SHEET_ID=""
INCIDENT_DOCUMENT_INVESTIGATION_SHEET_ID="INCIDENT_DOCUMENT_INVESTIGATION_SHEET_ID"
INCIDENT_FAQ_DOCUMENT_ID=""
INCIDENT_FAQ_DOCUMENT_ID="INCIDENT_FAQ_DOCUMENT_ID"
INCIDENT_NOTIFICATION_CONVERSATIONS=""
INCIDENT_NOTIFICATION_CONVERSATIONS=""
INCIDENT_NOTIFICATION_DISTRIBUTION_LISTS=""
INCIDENT_NOTIFICATION_DISTRIBUTION_LISTS=""
INCIDENT_RESOURCE_CONVERSATION_COMMANDS_REFERENCE_DOCUMENT="google-docs-conversation-commands-reference-document"
INCIDENT_RESOURCE_FAQ_DOCUMENT="google-docs-faq-document"
INCIDENT_RESOURCE_INCIDENT_REVIEW_DOCUMENT="google-docs-incident-review-document"
INCIDENT_RESOURCE_INCIDENT_TASK="google-docs-incident-task"
INCIDENT_RESOURCE_INVESTIGATION_DOCUMENT="google-docs-investigation-document"
INCIDENT_RESOURCE_INVESTIGATION_SHEET="google-docs-investigation-sheet"
INCIDENT_RESOURCE_NOTIFICATIONS_GROUP="google-group-participant-notifications-group"
INCIDENT_RESOURCE_TACTICAL_GROUP="google-group-participant-tactical-group"
INCIDENT_STORAGE_ARCHIVAL_FOLDER_ID=""
INCIDENT_STORAGE_ARCHIVAL_FOLDER_ID=INCIDENT_STORAGE_ARCHIVAL_FOLDER_ID
INCIDENT_STORAGE_DRIVE_ID_SLUG=""
INCIDENT_STORAGE_INCIDENT_REVIEW_FILE_ID=""
INCIDENT_STORAGE_INCIDENT_REVIEW_FILE_ID=INCIDENT_STORAGE_INCIDENT_REVIEW_FILE_ID

# Plugin configuration
INCIDENT_PLUGIN_CONTACT_SLUG="slack-contact"
INCIDENT_PLUGIN_CONVERSATION_SLUG="slack-conversation"
INCIDENT_PLUGIN_DOCUMENT_RESOLVER_SLUG="dispatch-document-resolver"
INCIDENT_PLUGIN_DOCUMENT_SLUG="google-docs-document"
INCIDENT_PLUGIN_EMAIL_SLUG="google-gmail-conversation"
INCIDENT_PLUGIN_GROUP_SLUG="group-participant-group"
INCIDENT_PLUGIN_PARTICIPANT_SLUG="dispatch-participants"
INCIDENT_PLUGIN_STORAGE_SLUG="google-drive-storage"
INCIDENT_PLUGIN_TASK_SLUG="google-drive-task"
INCIDENT_PLUGIN_TICKET_SLUG="jira-ticket"

# Slack
SLACK_APP_USER_SLUG=""
SLACK_API_BOT_TOKEN=""
SLACK_SIGNING_SECRET=""
SLACK_WORKSPACE_NAME=""

# Google
GOOGLE_DEVELOPER_KEY=key
GOOGLE_DOMAIN=site.com
GOOGLE_SERVICE_ACCOUNT_CLIENT_EMAIL=info@example.com
GOOGLE_SERVICE_ACCOUNT_CLIENT_ID=id
GOOGLE_SERVICE_ACCOUNT_DELEGATED_ACCOUNT=account
GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY=key
GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY_ID=id
GOOGLE_SERVICE_ACCOUNT_PROJECT_ID=id

# Jira
JIRA_BROWSER_URL=""
JIRA_API_URL=""
JIRA_PROJECT_KEY=""
JIRA_ISSUE_TYPE_ID=""
JIRA_USERNAME=""
JIRA_PASSWORD=""

# PagerDuty
PAGERDUTY_API_KEY=""
PAGERDUTY_API_FROM_EMAIL=""

@gazzerman2
Copy link
Author

gazzerman2 commented Apr 28, 2020

Thanks @kevgliss I checked that line and I was set to master branch so unsure too why.
Anyway, today its looking better. I can manually create Individuals Teams and Services

It fails to manually create Incident Types with

INFO:     9.144.49.146:50493 - "POST /api/v1/incident_types/ HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 22, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 19, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 376, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 149, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 204, in app
    response_data = await serialize_response(
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 126, in serialize_response
    raise ValidationError(errors, field.type_)
pydantic.error_wrappers.ValidationError: 2 validation errors for IncidentTypeRead
response -> template_document -> weblink
  none is not an allowed value (type=type_error.none.not_allowed)
response -> template_document -> name
  none is not an allowed value (type=type_error.none.not_allowed)

Also Create Incident fails with a 422, the web container logs only throws
INFO: 9.144.59.146:51530 - "POST /api/v1/incidents/ HTTP/1.1" 422 Unprocessable Entity
Screenshot 2020-04-28 at 15 13 07 1

@mvilanova
Copy link
Contributor

@gazzerman2 can you first create a document and then link it to the incident type when you create the incident type, and let us know if you still see the error? We may need to make some code changes, as it seems like things need to be created in a very specific order in order to work.

I think the second error is related to the first one, because you're not providing an incident type when you create the incident.

@gazzerman2
Copy link
Author

Thanks @mvilanova
I tried creating a document and get a 500 for that too
Screenshot 2020-04-28 at 20 50 19

INFO:     9.135.73.16:51566 - "GET /api/v1/documents/?q=&page=1&itemsPerPage=10&sortBy[]=name&descending[]=false HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 22, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 19, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 376, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 149, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 204, in app
    response_data = await serialize_response(
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 126, in serialize_response
    raise ValidationError(errors, field.type_)
pydantic.error_wrappers.ValidationError: 2 validation errors for DocumentPagination
response -> items -> 2 -> weblink
  none is not an allowed value (type=type_error.none.not_allowed)
response -> items -> 2 -> name
  none is not an allowed value (type=type_error.none.not_allowed)

@mvilanova
Copy link
Contributor

@gazzerman2 do you have documents with empty names and weblinks? If so, can you delete them?

@gazzerman2
Copy link
Author

gazzerman2 commented Apr 28, 2020

Nope it was a fresh install so no other documents.
While creating a document I couldn't fill in Incident priorities or Incident Types as none existed as I had issues creating Incident Types too, not sure if that matters/helps.

Thanks for all the help folks.

@mvilanova
Copy link
Contributor

Hmm, ok. I'll try to see if I can repro it locally and get back to you.

@mvilanova
Copy link
Contributor

@gazzerman2 I wasn't able to repro locally. Here's what I did:

  1. Created a service w/o specifying terms, incident types or priorities.
  2. Created a document w/o specifying terms, incident types or priorities.
  3. Created an incident type specifying the service and document created.
  4. Created an incident priority.

Please, try again and let me know!

@gazzerman2
Copy link
Author

gazzerman2 commented Apr 30, 2020

@mvilanova thanks for coming back.

  1. Service created fine.
  2. Document creation failed with
INFO:     1.1.1.1:49738 - "GET /api/v1/documents/?q=&page=1&itemsPerPage=10&sortBy[]=name&descending[]=false HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 22, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/sentry_asgi/middleware.py", line 19, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 26, in __call__
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 197, in __call__
    async for chunk in self.body_iterator:
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 56, in body_stream
    task.result()
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 376, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 149, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc from None
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 204, in app
    response_data = await serialize_response(
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 126, in serialize_response
    raise ValidationError(errors, field.type_)
pydantic.error_wrappers.ValidationError: 2 validation errors for DocumentPagination
response -> items -> 3 -> weblink
  none is not an allowed value (type=type_error.none.not_allowed)
response -> items -> 3 -> name
  none is not an allowed value (type=type_error.none.not_allowed)

image
3. Incident types fails as it doesn't have a document I suspect.
4. Incident Priority creates fine but console throws
image

  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
    raise exception
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1247, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "incident_type_name_key"
DETAIL:  Key (name)=(New Incident) already exists.

[SQL: INSERT INTO incident_type (name, slug, description, visibility, template_document_id, commander_service_id, search_vector) VALUES (%(name)s, %(slug)s, %(description)s, %(visibility)s, %(template_document_id)s, %(commander_service_id)s, %(search_vector)s) RETURNING incident_type.id]
[parameters: {'name': 'New Incident', 'slug': None, 'description': 'sadsa', 'visibility': <Visibility.open: 'Open'>, 'template_document_id': 6, 'commander_service_id': 1, 'search_vector': None}]
(Background on this error at: http://sqlalche.me/e/gkpj)

@mvilanova
Copy link
Contributor

I'm not able to reproduce number 2 locally. The error means that both the weblink and name for one of the documents in the database are None. Can you try with a clean database? Make sure you specify the name, description, weblink, id, and type (e.g. google-docs-investigation-document) when you create the document.

@gazzerman2
Copy link
Author

Pulled a new version, deleted everything and testing now.

@gazzerman2
Copy link
Author

gazzerman2 commented May 5, 2020

@mvilanova - So definitely looking better, thank you!

  1. On load it does throw a 500 but its not impacting.
    image

Env: New everything, docker-dispach also, no DB dump added this time.
Tests:

  1. Created a service w/o specifying terms, incident types or priorities.
  • Works successfully
  1. Created a document w/o specifying terms, incident types or priorities.
  • Works successfully
  1. Created an incident type specifying the service and document created.
  • Works successfully
  1. Created an incident priority.
  • Works successfully
  1. Create an Incident
  • Fails with
WARNING:  No authentication provider has been provided. There is currently no user authentication.
INFO:     9.135.23.99:56024 - "GET /api/v1/terms/ HTTP/1.1" 200 OK
WARNING:  No authentication provider has been provided. There is currently no user authentication.
INFO:     Dispatch Core App: Incident created
ERROR:    Unable to find slug: "slack-contact" in self.all version 1: <generator object PluginManager.all at 0x7f1a777286d0> or version 2: <generator object PluginManager.all at 0x7f1a777286d0>
INFO:     9.135.23.99:56024 - "POST /api/v1/incidents/ HTTP/1.1" 500 Internal Server Error
....
.....
...
File "/usr/local/lib/python3.8/site-packages/dispatch/incident/service.py", line 176, in create
    reporter_participant = participant_flows.add_participant(
  File "/usr/local/lib/python3.8/site-packages/dispatch/participant/flows.py", line 26, in add_participant
    individual = individual_service.get_or_create(db_session=db_session, email=user_email)
  File "/usr/local/lib/python3.8/site-packages/dispatch/individual/service.py", line 46, in get_or_create
    contact_plugin = plugins.get(INCIDENT_PLUGIN_CONTACT_SLUG)
  File "/usr/local/lib/python3.8/site-packages/dispatch/plugins/base/manager.py", line 43, in get
    raise KeyError(slug)
KeyError: '"slack-contact"'

In my .env I have INCIDENT_PLUGIN_CONTACT_SLUG="slack-contact"

@mvilanova
Copy link
Contributor

@gazzerman2 nice, almost there! Can you try setting the env var without wrapping the value with " (INCIDENT_PLUGIN_CONTACT_SLUG=slack-contact) and try again?

@gazzerman2
Copy link
Author

Will do, Thanks a lot, yeah I just spotted it now with single and doubles.

@gazzerman2
Copy link
Author

gazzerman2 commented May 5, 2020

@mvilanova All above works as before but still create Incident fails on a 500

image

WARNING:  No authentication provider has been provided. There is currently no user authentication.
INFO:     Dispatch Core App: Incident created
ERROR:    SlackError. Response: {'ok': False, 'error': 'invalid_auth'} Endpoint: users.lookupByEmail kwargs: {'email': 'dispatch@example.com'}
INFO:     9.132.21.99:52635 - "POST /api/v1/incidents/ HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
.
.
.
.
File "/usr/local/lib/python3.8/site-packages/slack/web/base_client.py", line 171, in api_call
    return self._event_loop.run_until_complete(future)
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.8/site-packages/slack/web/base_client.py", line 226, in _send
    return SlackResponse(**{**data, **res}).validate()
  File "/usr/local/lib/python3.8/site-packages/slack/web/slack_response.py", line 176, in validate
    raise e.SlackApiError(message=msg, response=self)
slack.errors.SlackApiError: The request to the Slack API failed.
The server responded with: {'ok': False, 'error': 'invalid_auth'}
INFO:     9.132.21.99:52643 - "GET /static/css/chunk-vendors.54ed3ea1.css HTTP/1.1" 304 Not Modified
INFO:     9.132.21.99:52646 - "GET /static/css/app.95d8a627.css HTTP/1.1" 304 Not Modified
INFO:     9.132.21.99:52647 - "GET /static/css/definition-table~incident-dashboard~incident-table~incidents-report~incidents-status~individual-tabl~653abfa5.343268aa.css HTTP/1.1" 304 Not Modified

I wonder does it need to have auth enabled to create an incident?

@mvilanova
Copy link
Contributor

Dispatch uses the dispatch-auth-provider-basic auth plugin, if you don't specify one (see https://github.com/Netflix/dispatch/blob/develop/src/dispatch/config.py#L77). Your issue is with Slack: slack.errors.SlackApiError: The request to the Slack API failed. Have you configured the Slack plugin as described here? Please go over the docs and make sure that everything is configured correctly.

@gazzerman2
Copy link
Author

Thanks @mvilanova I have DISPATCH_AUTHENTICATION_PROVIDER_SLUG= so it using dispatch-auth-provider-basic then.

I followed the doc for Slack and have bot which I added in the info below for.
I have removed my secrets but this is the values, I have also removed my workspaces name.

# Slack
SLACK_APP_USER_SLUG="MYBOTSUSERTOKEN"
SLACK_API_BOT_TOKEN="MYBOTSAPITOKEN"
SLACK_SIGNING_SECRET="BOTSSIGNINGSECRET"
SLACK_WORKSPACE_NAME="MYWORKSPACE"
SLACK_USER_ID_OVERRIDE=""
SLACK_COMMAND_STATUS_REPORT_SLUG="/dispatch-status-report"
SLACK_COMMAND_LIST_TASKS_SLUG="/dispatch-list-tasks"
SLACK_COMMAND_LIST_PARTICIPANTS_SLUG="/dispatch-list-participants"
SLACK_COMMAND_ASSIGN_ROLE="/dispatch-assign-role"
SLACK_COMMAND_UPDATE_INCIDENT="/dispatch-update-incident"
SLACK_COMMAND_ENGAGE_ONCALL="/dispatch-engage-oncall"
SLACK_COMMAND_LIST_RESOURCES="/dispatch-list-resources"

@mvilanova
Copy link
Contributor

Does the Slack app have the scopes listed here? Try setting the env vars without "s.

@kevgliss
Copy link
Contributor

kevgliss commented May 5, 2020

Yes, removing the quotes may help.

@gazzerman2
Copy link
Author

@mvilanova I did run through that and set all the scopes but will double check it again tomorrow.
Thanks @kevgliss too, I will also remove the quotes from all env variables and see if that helps.

@gazzerman2
Copy link
Author

I have some config work to do on Slack but given the web issues are now all resolved I will close this out and open a fresh one on Slack related issues as I find them. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants