oncall-engine/engine/apps/slack/tests
Joey Orlando 3cf2fcf660
optimize GET /schedules internal API endpoint (#1169)
# What this PR does

Fixes slow internal`GET /schedules` endpoints. Using the fake-data
generation script in #1128, I generated 65 calendar schedules in my
local setup. This resulted in the following endpoint performance:
![Screenshot 2023-01-24 at 12 03
16](https://user-images.githubusercontent.com/9406895/214276618-1a9848ba-eb84-49ec-a099-fdd96beac93f.png)

The responses which show ~76 queries were run on the latest `dev`
branch. Responses w/ ~26 queries were run on this branch.

Additionally:
- add typing to a few methods in `apps/schedules/ical_utils.py`
- document `apps/api/permissions/__init__.py:user_is_authorized`
function

## Which issue(s) this PR fixes

https://github.com/grafana/oncall-private/issues/1552

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2023-01-25 11:08:09 +01:00
..
test_scenario_steps Add slack command to trigger direct paging (#1154) 2023-01-20 09:06:27 -03:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
conftest.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
factories.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_create_message_blocks.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_parse_slack_usernames.py Schedules alpha fixes (#541) 2022-09-21 11:19:59 +01:00
test_populate_slack_channels.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
test_reset_slack.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_user_group.py optimize GET /schedules internal API endpoint (#1169) 2023-01-25 11:08:09 +01:00