-
Notifications
You must be signed in to change notification settings - Fork 309
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
fake-data generation script + fixes for django-silk and django-debug-toolbar #1128
Conversation
@@ -23,7 +23,7 @@ recurring-ical-events==0.1.16b0 | |||
slack-export-viewer==1.0.0 | |||
beautifulsoup4==4.8.1 | |||
social-auth-app-django==3.1.0 | |||
cryptography==39.0.0 | |||
cryptography==38.0.4 # version 39.0.0 introduced an issue - https://stackoverflow.com/a/75053968/3902555 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version 39.0.0
does not work on Apple silicon Macs, version 38.0.4
does
# the below two lines make it possible to use django-debug-toolbar inside of docker locally | ||
# https://knasmueller.net/fix-djangos-debug-toolbar-not-showing-inside-docker | ||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname()) | ||
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows the django-debug-toolbar
to work when running the backend inside of docker-compose
- [distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1](#distutilserrorscompileerror-command-usrbinclang-failed-with-exit-code-1) | ||
- [symbol not found in flat namespace '\_EVP_DigestSignUpdate'](#symbol-not-found-in-flat-namespace-_evp_digestsignupdate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these were the two issues I was experiencing when running make run-backend-celery
locally on an Apple Silicon Mac
a4b120d
to
96d0580
Compare
9be5db2
to
d327f7f
Compare
don't call response.json() if there is no response body (ex. in the case of a response for a HEAD call)
local grafana docker-compose container
when trying to run the server/celery worker outside of docker on an M1 Mac
bump django-silk version to v5.0.3 (latest version)
- creating Grafana teams/users - creating calendar schedules with three 8h oncall shifts
6982986
to
eaac9a7
Compare
# 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: - 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 grafana/oncall-private#1552 ## Checklist - [ ] Tests updated - [ ] Documentation added - [ ] `CHANGELOG.md` updated Co-authored-by: Vadim Stepanov <[email protected]>
What this PR does
Main stuff
django-debug-toolbar
when being run indocker-compose
locallyOther stuff
docker-compose
container provisioning configurationdocker-compose
, on an Apple silicon Macgrafana_plugin.helpers.client.APIClient.call_api
where it would callresponse.json()
for all requests, regardless of whether or not the response actually contained data or notengine/settings/dev.py
, properly setupdjango-silk
and document the steps to use it locallyDEV_DEBUG_VIEW_SQL_QUERIES
env var, rather than having to uncomment out a section ofsettings/dev.py
Which issue(s) this PR fixes
django-silk
anddjango-debug-toolbar
Checklist
CHANGELOG.md
updated (N/A)