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

Add ENABLE_DEBUG_TOOLBAR to settings #3983

Merged
merged 4 commits into from Apr 18, 2019
Merged

Conversation

koradon
Copy link
Contributor

@koradon koradon commented Apr 17, 2019

I want to merge this change because...
#3978

Pull Request Checklist

  1. Privileged views and APIs are guarded by proper permission checks.
  2. All visible strings are translated with proper context.
  3. All data-formatting is locale-aware (dates, numbers, and so on).
  4. Database queries are optimized and the number of queries is constant.
  5. Database migration files are up to date.
  6. The changes are tested.
  7. The code is documented (docstrings, project documentation).
  8. GraphQL schema and type definitions are up to date.
  9. Changes are mentioned in the changelog.

@koradon koradon self-assigned this Apr 17, 2019
@codecov
Copy link

codecov bot commented Apr 17, 2019

Codecov Report

Merging #3983 into master will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3983      +/-   ##
==========================================
+ Coverage   91.22%   91.28%   +0.06%     
==========================================
  Files         267      267              
  Lines       14443    14534      +91     
  Branches     1391     1387       -4     
==========================================
+ Hits        13176    13268      +92     
  Misses        897      897              
+ Partials      370      369       -1
Impacted Files Coverage Δ
saleor/graphql/core/mutations.py 93.72% <0%> (-0.5%) ⬇️
saleor/graphql/product/bulk_mutations/products.py 100% <0%> (ø) ⬆️
saleor/graphql/shipping/bulk_mutations.py 100% <0%> (ø) ⬆️
saleor/graphql/menu/bulk_mutations.py 100% <0%> (ø) ⬆️
saleor/graphql/account/bulk_mutations.py 100% <0%> (ø) ⬆️
saleor/graphql/page/bulk_mutations.py 100% <0%> (ø) ⬆️
saleor/graphql/translations/mutations.py 100% <0%> (ø) ⬆️
...aleor/graphql/order/bulk_mutations/draft_orders.py 100% <0%> (ø) ⬆️
saleor/graphql/page/mutations.py 100% <0%> (ø) ⬆️
saleor/graphql/discount/bulk_mutations.py 100% <0%> (ø) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd34981...d39363d. Read the comment docs.

@NyanKiyoshi
Copy link
Member

Since it's a PR for the debug toolbar, could you take a minute to bump django-debug-toolbar-request-history to 0.0.10? I made a minor change to the toolbar's request history, it now shows the requests methods, which is quite useful for backend developers.

@@ -250,7 +250,9 @@ def get_bool_from_env(name, default_value):
'phonenumber_field',
'captcha']

if DEBUG:

ENABLE_DEBUG_TOOLBAR = get_bool_from_env('ENABLE_DEBUG_TOOLBAR', False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really disable it by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't want the next line
if DEBUG and ENABLE_DEBUG_TOOLBAR: then yes. Otherwise, it will be added on production servers by default and we for sure don't want that.

saleor/settings.py Outdated Show resolved Hide resolved
@koradon
Copy link
Contributor Author

koradon commented Apr 18, 2019

@NyanKiyoshi lets bump dependencies in another PR

Copy link
Member

@krzysztofwolski krzysztofwolski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly believe that DDT time has passed. Both storefront and dashboard use gql api + js front, and in this configuration DDT provides no feedback. Silk is in this area a much better choice.
Keeping that in mind I think that change default to have it disabled is a good choice.

@maarcingebala maarcingebala merged commit 5660f9e into master Apr 18, 2019
@maarcingebala maarcingebala deleted the fix/settings/debug_toolbar branch April 18, 2019 10:18
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

Successfully merging this pull request may close these issues.

None yet

5 participants