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

Strawberry debug toolbar must not be enabled in non-debug mode #17410

Closed
abhi1693 opened this issue Sep 8, 2024 · 2 comments · Fixed by #17417
Closed

Strawberry debug toolbar must not be enabled in non-debug mode #17410

abhi1693 opened this issue Sep 8, 2024 · 2 comments · Fixed by #17417
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@abhi1693
Copy link
Member

abhi1693 commented Sep 8, 2024

Deployment Type

Self-hosted

NetBox Version

v4.1.0

Python Version

3.12

Steps to Reproduce

Go to settings.py and notice that strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware is in the middleware always enabled

Expected Behavior

strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware must only be enabled in debug mode

Observed Behavior

strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware is called during every request to netbox

@abhi1693 abhi1693 added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Sep 8, 2024
@arthanson arthanson added status: accepted This issue has been accepted for implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Sep 9, 2024
@arthanson arthanson self-assigned this Sep 9, 2024
@arthanson
Copy link
Collaborator

@abhi1693 were you actually seeing this causing issues? The debug toolbar (non strawberry) can be installed by default as it checks internally if DEBUG is set. Curious what issues strawberry one is causing in non debug mode?

@abhi1693
Copy link
Member Author

abhi1693 commented Sep 9, 2024

Even when the requests are from the rest API endpoint, our APM data shows it originated from strawberry django which makes it difficult to troubleshoot as we don't even use graphql in our integrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants