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

Change the way of creating refund/return fulfillments #7320

Merged

Conversation

korycins
Copy link
Member

I want to merge this change because it changes the way of handling refund/return fulfillments.
Previously we had a single fulfillment for each, when staff user proceeds 2nd or 3th refund/return we append the lines to existing refund/return fulfillment. This approach complicates any integration responsible for handling refunds/returns.
New way creates the fulfillment object for each refund/returns action.

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

@korycins korycins requested a review from a team May 11, 2021 06:48
@korycins korycins self-assigned this May 11, 2021
@db-queries
Copy link

db-queries bot commented May 11, 2021

Here is the report for 45f6d0b (mirumee:fix/create_refund-and-return-events-for-each-action)
Base comparison is 0017441.

Found 2 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	         22	              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	         49	              5
  add shipping to checkout                                   	         63	         63	              9
  checkout email update                                      	         23	         23	              0
  checkout payment charge                                    	         39	         39	             14
  checkout shipping address update                           	         68	         68	             12
  checkout voucher code                                      	         67	         67	             10
  complete checkout                                          	        108	        108	             13
  complete checkout with single line                         	        110	        110	             13
  create checkout                                            	         71	         71	             11
  customer complete checkout                                 	        153	        153	             41
  update checkout lines                                      	         82	         82	             14

# saleor.graphql.checkoutbenchmark homepage
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  user checkout details                                      	         39	         39	              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	         50	              2
+ fulfillment return products order lines                    	        104	         96	             11

# saleor.graphql.orderbenchmark order
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  staff multiple draft orders                                	         18	         18	              1
  staff multiple orders                                      	         35	         35	              0
  staff order details                                        	         78	         78	             44
  user order details                                         	         34	         34	              4

# 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	         83	             14
  category view                                              	         25	         25	              1

# saleor.graphql.productbenchmark collection
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  collection add products                                    	         32	         32	              5
  collection bulk delete                                     	         39	         39	              5
  collection view                                            	          6	          6	              0
  create collection                                          	         32	         32	              5
  delete collection                                          	         34	         34	              6
  remove products from collection                            	         29	         29	              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	          8	              0
  filter products by numeric attributes                      	         17	         17	              0
  product create                                             	         68	         68	              3
  product details                                            	         30	         30	              0
  retrieve channel listings                                  	         18	         18	              0
  retrieve product attributes                                	          8	          8	              0
  retrieve product images                                    	          3	          3	              0
  retrieve product media                                     	          3	          3	              0
  retrive products with product types and attributes         	          6	          6	              0
  update product                                             	         33	         33	              3

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

# saleor.graphql.productbenchmark variant
  test name                                                  	left count 	right count	duplicate count
  -----------------------------------------------------------	-----------	-----------	---------------
  product variant bulk create                                	         62	         62	              2
  product variant create                                     	         74	         74	              6
  retrieve variant list                                      	         24	         24	              0
  update product variant                                     	         76	         76	             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

@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #7320 (45f6d0b) into master (a79a8b7) will decrease coverage by 0.04%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7320      +/-   ##
==========================================
- Coverage   93.37%   93.33%   -0.05%     
==========================================
  Files         456      456              
  Lines       33673    33665       -8     
  Branches     3434     3433       -1     
==========================================
- Hits        31442    31420      -22     
- Misses       1547     1557      +10     
- Partials      684      688       +4     
Impacted Files Coverage Δ
saleor/graphql/order/mutations/fulfillments.py 96.38% <ø> (ø)
saleor/order/actions.py 92.16% <84.61%> (-3.41%) ⬇️

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 a79a8b7...45f6d0b. Read the comment docs.

@fowczarek fowczarek requested a review from a team May 11, 2021 06:58
@korycins korycins added the test deployment Deploy test environment for pull request label May 11, 2021
@github-actions github-actions bot temporarily deployed to fix-create-refund-and-return-events-for-each-action May 11, 2021 07:10 Inactive
@patrys
Copy link
Member

patrys commented May 11, 2021

@korycins korycins merged commit 1448e2a into master May 11, 2021
@korycins korycins deleted the fix/create_refund-and-return-events-for-each-action branch May 11, 2021 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test deployment Deploy test environment for pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants