-
Notifications
You must be signed in to change notification settings - Fork 299
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
optimize GET /schedules internal API endpoint #1169
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- update types in ical_utils.py - document user_is_authorized function
iskhakov
approved these changes
Jan 20, 2023
joeyorlando
added
the
pr:no public docs
Added to a PR that does not require public documentation updates
label
Jan 20, 2023
joeyorlando
changed the title
reduce # of SQL queries for GET /schedules endpoints by >90%
optimize GET /schedules internal API endpoint
Jan 24, 2023
kudos to @vadimkerr for helping out big time with this PR |
…m:grafana/oncall into jorlando/optimize-get-schedules-endpoints
oncall_slack_user_identities method + test
joeyorlando
commented
Jan 25, 2023
vstpme
approved these changes
Jan 25, 2023
2 tasks
vstpme
added a commit
that referenced
this pull request
Feb 6, 2023
# What this PR does Fixes a bug when current on-call users for web UI and Slack user group are incorrect. This happens when both conditions below are true: - Using an ICal schedule - Email of a user in Grafana has a different case than an event in ICal (e.g. `User@gmail.com` in Grafana, `user@gmail.com` in ICal event) The bug was introduced by #1169 ## Which issue(s) this PR fixes #1296 ## Checklist - [x] Tests updated - [x] `CHANGELOG.md` updated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:The responses which show ~76 queries were run on the latest
dev
branch. Responses w/ ~26 queries were run on this branch.Additionally:
apps/schedules/ical_utils.py
apps/api/permissions/__init__.py:user_is_authorized
functionWhich issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/1552
Checklist
CHANGELOG.md
updated