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
Refactor fulfillments quantity fulfilled #8062
Refactor fulfillments quantity fulfilled #8062
Conversation
Here is the report for 4a34fb4 (mirumee:refactor-fulfillments-quantity-fulfilled) No differences were found.
# saleor.graphql.accountbenchmark account
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
customers query 48 48 0
delete staff members 34 34 0
query staff user 18 18 3
staff create 23 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.appbenchmarks app extensions
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
app extensions 14 14 0
app extensions with filter[filter0] 13 13 0
app extensions with filter[filter1] 13 13 0
app extensions with filter[filter2] 9 9 0
app extensions with filter[filter3] 11 11 0
app extensions with filter[filter4] 11 11 0
app extensions with filter[filter5] 5 5 0
app extensions with filter[filter6] 9 9 0
# saleor.graphql.attributebenchmark attribute
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
attribute translation 5 5 0
attribute value translation 26 26 0
query attribute 6 6 0
query attributes 8 8 0
# saleor.graphql.checkoutbenchmark checkout mutations
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
add billing address to checkout 51 51 5
add checkout lines 47 47 3
add delivery to checkout 61 61 7
add shipping to checkout 66 66 8
checkout email update 24 24 0
checkout payment charge 46 46 17
checkout shipping address update 69 69 11
checkout voucher code 75 75 13
complete checkout 119 119 13
complete checkout with out of stock webhook 121 121 13
complete checkout with single line 121 121 13
create checkout 73 73 12
create checkout for cc 64 64 10
customer complete checkout 165 165 42
customer complete checkout for cc 164 164 43
update checkout lines 48 48 3
# saleor.graphql.checkoutbenchmark homepage
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
user checkout details 41 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.giftcardbenchmark gift card mutations
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
create never expiry gift card 14 14 4
update gift card 15 15 3
# saleor.graphql.giftcardbenchmark gift card queries
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
filter gift cards by tag 10 10 3
query gift card details 11 11 3
query gift cards 10 10 3
# saleor.graphql.orderbenchmark fulfillment refund and return products
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
fulfillment refund products order lines 56 56 2
fulfillment return products order lines 108 108 14
# saleor.graphql.orderbenchmark order
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
staff multiple draft orders 400 400 306
staff multiple orders 150 150 74
staff order details 44 44 5
user order details 40 40 5
# saleor.graphql.pagebenchmark page type
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
query page type 19 19 7
query page types 25 25 12
# saleor.graphql.productbenchmark category
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
categories children 3 3 0
category delete 108 108 27
category view 25 25 1
# saleor.graphql.productbenchmark collection
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
collection add products 44 44 10
collection bulk delete 51 51 10
collection view 6 6 0
create collection 47 47 12
delete collection 46 46 11
remove products from collection 41 41 10
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 9 9 0
filter products by boolean attributes 19 19 0
filter products by numeric attributes 18 18 0
product create 70 70 3
product details 30 30 0
product translations 5 5 0
retrieve channel listings 17 17 0
retrieve product attributes 9 9 0
retrieve product images 4 4 0
retrieve product media 4 4 0
retrive products with product types and attributes 7 7 0
update product 46 46 4
# saleor.graphql.productbenchmark product variant channel listing update
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
variant channel listing update 50 50 5
# saleor.graphql.productbenchmark variant
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
product variant bulk create 63 63 2
product variant create 75 75 6
retrieve variant list 26 26 2
update product variant 79 79 12
# saleor.graphql.productbenchmark variant stocks
test name left count right count duplicate count
------------------------------------------------------------------------ ----------- ----------- ---------------
product variants stocks create 27 27 5
product variants stocks create with single webhook called 25 25 5
product variants stocks delete 26 26 5
product variants stocks delete with out of stock webhook many calls 22 22 3
product variants stocks update 29 29 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 Report
@@ Coverage Diff @@
## master #8062 +/- ##
==========================================
+ Coverage 93.07% 93.13% +0.05%
==========================================
Files 488 488
Lines 37234 37194 -40
Branches 3972 3957 -15
==========================================
- Hits 34657 34639 -18
+ Misses 1764 1745 -19
+ Partials 813 810 -3
Continue to review full report at Codecov.
|
@@ -350,6 +350,14 @@ def cancel_waiting_fulfillment( | |||
events.fulfillment_canceled_event( | |||
order=fulfillment.order, user=user, app=app, fulfillment=None | |||
) | |||
|
|||
order_lines = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure that allocations are correctly returned
saleor/order/actions.py
Outdated
line = line_info.line | ||
line.quantity_fulfilled += line_info.quantity | ||
order_lines.append(line) | ||
if decrease_stocks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need theese ifs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomaszszymanski129 What about migrating existing fulfillments to a new approach? I believe we should move them, right?
@korycins good point! I will prepare data migration. |
I want to merge this change because it refactor waiting fulfillments quantity logic.
🚫 Previous logic:
✅ Refactored:
Impact
Pull Request Checklist