Show alert if there are failed/pending deliveries#5403
Conversation
🦋 Changeset detectedLatest commit: 420dd0d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
merge-reports: Run #4363
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
merge-reports: Run #4370
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
| } | ||
|
|
||
| if (pendingDelivers && pendingDelivers.edges?.length > 0) { | ||
| webhookInfo.hasPending = true; |
There was a problem hiding this comment.
You need to fetch attempts as well, here: https://github.com/saleor/saleor-dashboard/pull/5403/files#diff-9f3bbc45c9cc037644ba210310c6e2cb538fa2dfc054166306de7ebd00489e9fR27
webhook that has pending delivers means that they are being sent, not they are failed. You need to show alert ONLY when some of these delivers have FAILED attempt. So here you need to go throughout the attempts array and find some failed elements
merge-reports: Run #4383
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5403 +/- ##
==========================================
+ Coverage 61.72% 61.75% +0.02%
==========================================
Files 1251 1257 +6
Lines 21780 21845 +65
Branches 4544 4557 +13
==========================================
+ Hits 13444 13490 +46
+ Misses 8299 7802 -497
- Partials 37 553 +516 ☔ View full report in Codecov by Sentry. |
merge-reports: Run #4395
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
merge-reports: Run #4486
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
merge-reports: Run #4504
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
merge-reports: Run #4509
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
| pendingDelivers: eventDeliveries( | ||
| first: 1 | ||
| filter: { status: PENDING } | ||
| sortBy: { field: CREATED_AT, direction: DESC } | ||
| ) { | ||
| edges { | ||
| node { | ||
| id | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
issue: I don't think we need to show pending deliveries, we should care only about failed ones
There was a problem hiding this comment.
You're commenting outdated code :D We're fetching attempts of pending deliveries to check if they have failed https://github.com/saleor/saleor-dashboard/pull/5403/files#diff-9f3bbc45c9cc037644ba210310c6e2cb538fa2dfc054166306de7ebd00489e9fR19-R35
* show alert if there are failed/pending deliveries * i18n * useMemo and booleans * get latest failed/pending event * check attempts * add feature flag * cr fixes * fix test * filter by thirdparty * hook refactor * add missing test * generate flag * generate flag * extract colors * remove unused colors
Scope of the change