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

Support for webhooks #4731

Merged
merged 30 commits into from
Sep 26, 2019
Merged

Support for webhooks #4731

merged 30 commits into from
Sep 26, 2019

Conversation

korycins
Copy link
Member

@korycins korycins commented Sep 10, 2019

Resolves #2084

It adds support for Webhooks.
It adds mutation for subscribing, deleting and listing Webhook subscription. Service Account can assign to all events but permissions to given resources are required to trigger webhook event. Webhook logic is written as a Saleor's plugin.

@korycins korycins self-assigned this Sep 10, 2019
Copy link

django-queries commented Sep 10, 2019

Here is the report for 1cb2245 (korycins/saleor @ feature/webhooks)
Base comparison is b90b838.

No differences were found. (click me)

# api.benchmark checkout
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  add billing address to checkout            	         38	         38	             20
  add shipping to checkout                   	          7	          7	              0
  checkout payment charge                    	         14	         14	              0
  complete checkout                          	          6	          6	              0
  create checkout                            	         52	         52	             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
  -------------------------------------------	-----------	-----------	---------------
  retrieve variant list                      	         18	         18	              8

# 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 Sep 10, 2019

Codecov Report

Merging #4731 into master will decrease coverage by 0.05%.
The diff coverage is 88.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4731      +/-   ##
==========================================
- Coverage   91.21%   91.15%   -0.06%     
==========================================
  Files         330      343      +13     
  Lines       19906    20371     +465     
  Branches     1888     1930      +42     
==========================================
+ Hits        18157    18569     +412     
- Misses       1228     1264      +36     
- Partials      521      538      +17
Impacted Files Coverage Δ
saleor/core/permissions.py 100% <ø> (ø) ⬆️
saleor/product/utils/__init__.py 94.8% <ø> (-0.49%) ⬇️
saleor/graphql/account/mutations/staff.py 96.89% <0%> (ø) ⬆️
saleor/graphql/webhook/enums.py 100% <100%> (ø)
saleor/graphql/webhook/resolvers.py 100% <100%> (ø)
saleor/graphql/product/mutations/attributes.py 97.42% <100%> (ø) ⬆️
saleor/graphql/api.py 100% <100%> (ø) ⬆️
saleor/extensions/plugins/avatax/plugin.py 69.87% <100%> (ø) ⬆️
saleor/graphql/middleware.py 100% <100%> (ø) ⬆️
saleor/graphql/order/bulk_mutations/orders.py 96.15% <100%> (-0.15%) ⬇️
... 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 b90b838...1cb2245. Read the comment docs.

@korycins korycins marked this pull request as ready for review September 23, 2019 11:50
@korycins
Copy link
Member Author

@salwator @NyanKiyoshi @maarcingebala ready for review

tests/api/test_fulfillment.py Outdated Show resolved Hide resolved
tests/test_order_actions.py Outdated Show resolved Hide resolved
saleor/order/actions.py Show resolved Hide resolved
saleor/graphql/webhook/mutations.py Outdated Show resolved Hide resolved
saleor/graphql/webhook/mutations.py Outdated Show resolved Hide resolved
saleor/graphql/webhook/mutations.py Outdated Show resolved Hide resolved
saleor/graphql/webhook/schema.py Outdated Show resolved Hide resolved
saleor/graphql/order/mutations/fulfillments.py Outdated Show resolved Hide resolved
saleor/webhook/models.py Outdated Show resolved Hide resolved
@korycins korycins merged commit 7478b7c into saleor:master Sep 26, 2019
@korycins korycins deleted the feature/webhooks branch September 26, 2019 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webhooks Events Subscription
5 participants