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 backend logic for dynamic default email sender settings #4820

Merged

Conversation

NyanKiyoshi
Copy link
Member

@NyanKiyoshi NyanKiyoshi commented Oct 7, 2019

Closes #4815

Definition of Done

  • Mutations and types are implemented
  • Dashboard 1.0 is implemented
  • We ensure one cannot inject headers
  • The expected header value is tested
  • It is tested one cannot inject a header even if the validation is bypassed (send_mail's own double check)
  • Changes are implemented into the email tasks

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. GraphQL schema and type definitions are up to date.
  8. Changes are mentioned in the changelog.

@NyanKiyoshi NyanKiyoshi self-assigned this Oct 7, 2019
@NyanKiyoshi NyanKiyoshi force-pushed the dynamic-settings/email-sender branch 2 times, most recently from 9535980 to c9916b7 Compare October 7, 2019 15:43
Copy link

django-queries commented Oct 7, 2019

Here is the report for d3be77b (NyanKiyoshi/saleor @ dynamic-settings/email-sender)
Base comparison is b0cb24d.

No differences were found. (click me)

# api.benchmark checkout
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  add billing address to checkout            	         34	         34	             20
  add shipping to checkout                   	          7	          7	              0
  checkout payment charge                    	         14	         14	              0
  complete checkout                          	          6	          6	              0
  create checkout                            	         48	         48	             24

# api.benchmark homepage
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  retrieve main menu                         	          5	          5	              0
  retrieve product list                      	          4	          4	              0
  retrieve secondary menu                    	          5	          5	              0
  retrieve shop                              	          2	          2	              0

# api.benchmark product
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  product details                            	         15	         15	              3
  retrieve product attributes                	         13	         13	              2

# api.benchmark variant
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  product variant bulk create                	         51	         51	              3
  retrieve variant list                      	         15	         15	              6

# api product sorting attributes
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  sort product not having attribute data     	         21	         21	              0

@codecov
Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #4820 into master will decrease coverage by 0.22%.
The diff coverage is 93.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4820      +/-   ##
==========================================
- Coverage   91.49%   91.27%   -0.23%     
==========================================
  Files         347      345       -2     
  Lines       20746    20646     -100     
  Branches     1971     1958      -13     
==========================================
- Hits        18982    18844     -138     
- Misses       1220     1264      +44     
+ Partials      544      538       -6
Impacted Files Coverage Δ
saleor/dashboard/sites/forms.py 100% <ø> (ø) ⬆️
saleor/graphql/shop/types.py 96.1% <100%> (+0.21%) ⬆️
saleor/site/error_codes.py 100% <100%> (ø)
saleor/graphql/shop/mutations.py 95.59% <100%> (+0.05%) ⬆️
saleor/site/models.py 92.85% <87.5%> (-1.59%) ⬇️
saleor/payment/gateways/braintree/plugin.py 0% <0%> (-65.16%) ⬇️
saleor/dashboard/forms.py 83.47% <0%> (-1.91%) ⬇️
saleor/account/models.py 90.32% <0%> (-1.3%) ⬇️
saleor/extensions/manager.py 89.23% <0%> (-0.67%) ⬇️
... and 31 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 a3b5c7d...2f27d39. Read the comment docs.

saleor/core/emails.py Outdated Show resolved Hide resolved
saleor/graphql/shop/mutations.py Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Oct 14, 2019

Codecov Report

Merging #4820 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4820      +/-   ##
==========================================
+ Coverage   91.48%   91.53%   +0.04%     
==========================================
  Files         348      349       +1     
  Lines       20878    20911      +33     
  Branches     1993     1995       +2     
==========================================
+ Hits        19101    19141      +40     
+ Misses       1229     1222       -7     
  Partials      548      548
Impacted Files Coverage Δ
saleor/dashboard/sites/forms.py 100% <ø> (ø) ⬆️
saleor/core/emails.py 100% <100%> (ø) ⬆️
saleor/graphql/shop/mutations.py 95.59% <100%> (+0.05%) ⬆️
saleor/account/emails.py 100% <100%> (+15.9%) ⬆️
saleor/graphql/shop/types.py 96.07% <100%> (+0.21%) ⬆️
saleor/dashboard/emails.py 100% <100%> (ø) ⬆️
saleor/site/error_codes.py 100% <100%> (ø)
saleor/order/emails.py 100% <100%> (ø) ⬆️
saleor/site/models.py 96% <100%> (+1.55%) ⬆️
... and 1 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 b0cb24d...d3be77b. Read the comment docs.

saleor/site/models.py Outdated Show resolved Hide resolved
saleor/graphql/shop/types.py Outdated Show resolved Hide resolved
Copy link
Member Author

@NyanKiyoshi NyanKiyoshi left a comment

Choose a reason for hiding this comment

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

GitHub said I needed to write something here. So... Hello!! Wish you all a great day!

@NyanKiyoshi NyanKiyoshi force-pushed the dynamic-settings/email-sender branch 5 times, most recently from e486d0e to ad13b35 Compare October 21, 2019 07:51
@maarcingebala maarcingebala merged commit 4e71565 into saleor:master Oct 21, 2019
@NyanKiyoshi NyanKiyoshi deleted the dynamic-settings/email-sender branch October 21, 2019 08:16
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.

Dynamic configuration for DEFAULT_FROM_EMAIL setting
4 participants