Skip to content

Comments

Show alert if there are failed/pending deliveries#5403

Merged
Cloud11PL merged 17 commits intomainfrom
PROD-99-sidebar-apps-alert
Feb 19, 2025
Merged

Show alert if there are failed/pending deliveries#5403
Cloud11PL merged 17 commits intomainfrom
PROD-99-sidebar-apps-alert

Conversation

@Cloud11PL
Copy link
Contributor

Scope of the change

CleanShot 2025-02-12 at 13 54 54

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2025

🦋 Changeset detected

Latest commit: 420dd0d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Patch

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

@Cloud11PL Cloud11PL added the run pw-e2e Run e2e (basic suite from PR automation) label Feb 12, 2025
@github-actions github-actions bot temporarily deployed to pr-5403 February 12, 2025 13:08 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2025

merge-reports: Run #4363

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 5m19s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5403 February 12, 2025 14:36 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5403 February 12, 2025 15:11 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5403 February 12, 2025 15:20 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2025

merge-reports: Run #4370

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 7m4s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@Cloud11PL Cloud11PL marked this pull request as ready for review February 12, 2025 15:34
@Cloud11PL Cloud11PL requested a review from a team February 12, 2025 15:34
@Cloud11PL Cloud11PL changed the title Ahow alert if there are failed/pending deliveries Show alert if there are failed/pending deliveries Feb 12, 2025
@Cloud11PL Cloud11PL marked this pull request as draft February 12, 2025 15:53
@github-actions github-actions bot temporarily deployed to pr-5403 February 13, 2025 08:27 Destroyed
@Cloud11PL Cloud11PL marked this pull request as ready for review February 13, 2025 08:53
Copy link
Contributor

@andrzejewsky andrzejewsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment + please add the feature flag, we can't merge uncompleted functionality

}

if (pendingDelivers && pendingDelivers.edges?.length > 0) {
webhookInfo.hasPending = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions github-actions bot temporarily deployed to pr-5403 February 13, 2025 11:09 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2025

merge-reports: Run #4383

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 5m16s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5403 February 13, 2025 11:23 Destroyed
@codecov
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 71.64179% with 19 lines in your changes missing coverage. Please review.

Project coverage is 61.75%. Comparing base (31f9085) to head (420dd0d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/apps/components/AppAlerts/SidebarAppAlert.tsx 55.00% 8 Missing and 1 partial ⚠️
src/apps/components/AppAlerts/useAppsAlert.ts 42.85% 4 Missing ⚠️
src/components/Sidebar/menu/SingleItem.tsx 0.00% 2 Missing ⚠️
...components/Sidebar/menu/hooks/useMenuStructure.tsx 50.00% 2 Missing ⚠️
src/icons/ExclamationIcon.tsx 50.00% 1 Missing ⚠️
src/icons/ExclamationIconFilled.tsx 50.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot temporarily deployed to pr-5403 February 13, 2025 12:16 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5403 February 13, 2025 12:20 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2025

merge-reports: Run #4395

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 4m41s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5403 February 13, 2025 13:52 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5403 February 13, 2025 14:00 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5403 February 17, 2025 07:58 Destroyed
poulch
poulch previously approved these changes Feb 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2025

merge-reports: Run #4486

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 5m27s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5403 February 18, 2025 09:48 Destroyed
andrzejewsky
andrzejewsky previously approved these changes Feb 18, 2025
@Cloud11PL Cloud11PL requested a review from poulch February 19, 2025 08:12
@github-actions github-actions bot temporarily deployed to pr-5403 February 19, 2025 08:14 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2025

merge-reports: Run #4504

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 5m13s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5403 February 19, 2025 08:29 Destroyed
poulch
poulch previously approved these changes Feb 19, 2025
@Cloud11PL Cloud11PL dismissed stale reviews from poulch and andrzejewsky via 4db334c February 19, 2025 08:52
poulch
poulch previously approved these changes Feb 19, 2025
@github-actions github-actions bot temporarily deployed to pr-5403 February 19, 2025 08:54 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5403 February 19, 2025 09:03 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2025

merge-reports: Run #4509

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 4m47s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

Comment on lines 20 to 36
pendingDelivers: eventDeliveries(
first: 1
filter: { status: PENDING }
sortBy: { field: CREATED_AT, direction: DESC }
) {
edges {
node {
id
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: I don't think we need to show pending deliveries, we should care only about failed ones

Copy link
Contributor Author

@Cloud11PL Cloud11PL Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Cloud11PL Cloud11PL merged commit 9629076 into main Feb 19, 2025
17 checks passed
@Cloud11PL Cloud11PL deleted the PROD-99-sidebar-apps-alert branch February 19, 2025 11:16
Cloud11PL added a commit that referenced this pull request Mar 6, 2025
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run pw-e2e Run e2e (basic suite from PR automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants