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

Feature/plugins per channel #7198

Merged
merged 20 commits into from
May 11, 2021
Merged

Feature/plugins per channel #7198

merged 20 commits into from
May 11, 2021

Conversation

korycins
Copy link
Member

I want to merge this change because it adds support for configuring plugins per channel

Impact

  • New migrations
  • New/Updated API fields or mutations
  • Deprecated API fields or mutations
  • Removed API types, fields, or mutations
  • Documentation needs to be updated

Pull Request Checklist

  • Privileged queries and mutations are guarded by proper permission checks
  • Database queries are optimized and the number of queries is constant
  • Database migration files are up to date
  • The changes are tested
  • GraphQL schema and type definitions are up to date
  • Changes are mentioned in the changelog

Maciej Korycinski and others added 4 commits April 14, 2021 10:14
* Extend manager to use channel

* Add missing conftest

* Add tests

* Add draft note to changelog

* use channel slug already assigned to variable
@korycins korycins marked this pull request as draft April 19, 2021 09:16
@korycins korycins self-assigned this Apr 19, 2021
korycins and others added 3 commits April 19, 2021 11:23
* Add migration to add channel to plugin configuration

* Fix migrations which were importing manager

* Change on_delete from null to cascade

* Extend manager to use channel

* Add missing conftest

* Add tests

* Add draft note to changelog

* Refactor code to handle a plugins per channel

* Add more tests for pluginUpdate mutation

* Update changelog

* Feature/extend manager to use channel slug (#7118)

* Extend manager to use channel

* Add missing conftest

* Add tests

* Add draft note to changelog

* use channel slug already assigned to variable

* Apply changes after review
@korycins korycins marked this pull request as ready for review April 19, 2021 09:58
@korycins korycins added feature branch test deployment Deploy test environment for pull request labels Apr 19, 2021
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel April 19, 2021 09:59 Inactive
@db-queries
Copy link

db-queries bot commented Apr 19, 2021

Here is the report for 1be2173 (mirumee:feature/plugins_per_channel)
Base comparison is ef71db9.

Found 40 differences! (click me)

# saleor.graphql.accountbenchmark account
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  delete staff members                                       	         32	         32	              0
  query staff user                                           	         18	         18	              3
- staff create                                               	         22	         23	              3
  staff update groups and permissions                        	         32	         32	              4

# saleor.graphql.accountbenchmark permission group
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  permission group create                                    	         19	         19	              2
  permission group delete                                    	         20	         20	              3
  permission group query                                     	          7	          7	              0
  permission group update                                    	         33	         33	              1
  permission group update remove users with manage staff     	         27	         27	              3

# saleor.graphql.attributebenchmark attribute
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  query attribute                                            	          7	          7	              2
  query attributes                                           	         11	         11	              3

# saleor.graphql.checkoutbenchmark checkout mutations
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
- add billing address to checkout                            	         49	         51	              5
- add shipping to checkout                                   	         63	         64	              9
- checkout email update                                      	         23	         25	              0
- checkout payment charge                                    	         39	         42	             16
- checkout shipping address update                           	         68	         69	             12
- checkout voucher code                                      	         67	         68	             10
- complete checkout                                          	        107	        108	             13
- complete checkout with single line                         	        109	        110	             13
- create checkout                                            	         71	         72	             11
- customer complete checkout                                 	        152	        153	             41
- update checkout lines                                      	         82	         83	             14

# saleor.graphql.checkoutbenchmark homepage
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
- user checkout details                                      	         39	         41	              2

# saleor.graphql.discountbenchmark sales
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  sales query with channel slug                              	         16	         16	              0
  sales query withot channel slug                            	         15	         15	              0

# saleor.graphql.discountbenchmark vouchers
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  vouchers query with channel slug                           	         16	         16	              0
  vouchers query withot channel slug                         	         15	         15	              0

# saleor.graphql.orderbenchmark fulfillment refund and return products
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
- fulfillment refund products order lines                    	         54	         55	              3
- fulfillment return products order lines                    	        104	        106	             14

# saleor.graphql.orderbenchmark order
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  staff multiple orders                                      	         25	         25	              0
- staff order details                                        	         77	         78	             43
- user order details                                         	         33	         34	              3

# saleor.graphql.pagebenchmark page type
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  query page type                                            	         17	         17	              5
  query page types                                           	         19	         19	              5

# saleor.graphql.productbenchmark category
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  categories children                                        	          3	          3	              0
- category delete                                            	         83	         84	             14
- category view                                              	         25	         26	              1

# saleor.graphql.productbenchmark collection
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
- collection add products                                    	         32	         33	              5
- collection bulk delete                                     	         39	         40	              5
- collection view                                            	          6	          7	              0
- create collection                                          	         32	         33	              5
- delete collection                                          	         34	         35	              6
- remove products from collection                            	         29	         30	              5
  retrieve collection channel listings                       	          4	          4	              0

# saleor.graphql.productbenchmark homepage
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  report product sales                                       	         10	         10	              3
  retrieve product list                                      	          4	          4	              0

# saleor.graphql.productbenchmark product
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
- filter products by attributes                              	          8	          9	              0
- filter products by numeric attributes                      	         17	         18	              0
- product create                                             	         68	         69	              3
- product details                                            	         30	         31	              0
- retrieve channel listings                                  	         18	         19	              0
- retrieve product attributes                                	          8	          9	              0
- retrieve product images                                    	          3	          4	              0
- retrieve product media                                     	          3	          4	              0
- retrive products with product types and attributes         	          6	          7	              0
- update product                                             	         33	         34	              3

# saleor.graphql.productbenchmark product variant channel listing update
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
- variant channel listing update                             	         48	         49	              4

# saleor.graphql.productbenchmark variant
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
- product variant bulk create                                	         62	         63	              2
- product variant create                                     	         74	         75	              6
- retrieve variant list                                      	         24	         25	              0
- update product variant                                     	         76	         77	             10

# saleor.graphql.productbenchmark variant stocks
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  product variants stocks create                             	         22	         22	              5
  product variants stocks delete                             	         19	         19	              5
  product variants stocks update                             	         27	         27	              5
  query product variants stocks                              	         14	         14	              4

# saleor.graphql.producttest product sorting attributes
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  sort product not having attribute data                     	         23	         23	              0

# saleor.graphql.shippingbenchmark shipping methods
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  vouchers query with channel slug                           	         10	         10	              0
  vouchers query without channel slug                        	          9	          9	              0

# saleor.graphql.shopbenchmark homepage
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  retrieve shop                                              	          6	          6	              0

@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel April 19, 2021 10:13 Inactive
@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #7198 (1be2173) into master (ef71db9) will increase coverage by 0.00%.
The diff coverage is 94.66%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #7198    +/-   ##
========================================
  Coverage   93.36%   93.36%            
========================================
  Files         456      457     +1     
  Lines       33674    33894   +220     
  Branches     3435     3462    +27     
========================================
+ Hits        31439    31646   +207     
- Misses       1547     1559    +12     
- Partials      688      689     +1     
Impacted Files Coverage Δ
saleor/graphql/account/mutations/staff.py 98.17% <ø> (ø)
saleor/graphql/checkout/types.py 97.84% <ø> (ø)
saleor/payment/gateways/adyen/webhooks.py 85.82% <0.00%> (ø)
saleor/payment/gateways/braintree/plugin.py 0.00% <0.00%> (ø)
saleor/plugins/invoicing/plugin.py 0.00% <0.00%> (ø)
saleor/plugins/avatax/plugin.py 75.07% <71.42%> (-0.09%) ⬇️
saleor/graphql/plugins/sorters.py 78.37% <72.22%> (-9.63%) ⬇️
saleor/graphql/account/mutations/base.py 96.92% <75.00%> (-1.85%) ⬇️
saleor/graphql/payment/mutations.py 95.00% <82.60%> (-2.25%) ⬇️
saleor/payment/gateway.py 93.83% <85.71%> (ø)
... and 46 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 ef71db9...1be2173. Read the comment docs.

Allow to configure user emails plugins per channel
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel April 19, 2021 13:27 Inactive
@korycins korycins marked this pull request as draft April 20, 2021 10:37
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel April 21, 2021 06:46 Inactive
* Update the logic to use filters with multichannels

* Fix tests after changes in plugin filters

* Update changelog with the details related to new way of filtering

* Remove commented code
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel April 26, 2021 12:58 Inactive
* Extend notify method to handle channel slug as an input

* Update a changelog
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel April 27, 2021 07:49 Inactive
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel April 28, 2021 12:14 Inactive
@korycins korycins marked this pull request as ready for review April 28, 2021 15:32
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel May 5, 2021 11:42 Inactive
@korycins korycins added test deployment Deploy test environment for pull request and removed test deployment Deploy test environment for pull request labels May 5, 2021
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel May 5, 2021 12:07 Inactive
@korycins korycins requested a review from a team May 5, 2021 12:48
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel May 5, 2021 14:00 Inactive
saleor/graphql/account/mutations/account.py Outdated Show resolved Hide resolved
saleor/graphql/account/mutations/account.py Outdated Show resolved Hide resolved
saleor/graphql/account/mutations/account.py Outdated Show resolved Hide resolved
saleor/graphql/account/mutations/account.py Outdated Show resolved Hide resolved
saleor/graphql/account/mutations/base.py Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel May 6, 2021 16:09 Inactive
@korycins
Copy link
Member Author

korycins commented May 7, 2021

FYI: We are waiting for small changes in the storefront before we will merge it.

@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel May 7, 2021 14:24 Inactive
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel May 7, 2021 14:56 Inactive
@maarcingebala maarcingebala added the approved-breaking-change PRs with this label have approved breaking changes in the GraphQL schema label May 10, 2021
@korycins korycins added test deployment Deploy test environment for pull request and removed test deployment Deploy test environment for pull request labels May 10, 2021
@github-actions github-actions bot temporarily deployed to feature-plugins-per-channel May 10, 2021 09:31 Inactive
@maarcingebala maarcingebala merged commit c807abd into master May 11, 2021
@maarcingebala maarcingebala deleted the feature/plugins_per_channel branch May 11, 2021 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved-breaking-change PRs with this label have approved breaking changes in the GraphQL schema test deployment Deploy test environment for pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants