Skip to content

Conversation

@lidel
Copy link
Member

@lidel lidel commented Sep 1, 2025

This expands on foundations from #1015:

  • add DiagnosticServiceURL config for CID retrievability checks
  • show "Check CID retrievability" button on 504 errors
  • add "Retry" button on all error pages
  • track and display failed peer IDs in timeout messages
  • indicate when timeout occurs on sub-resource vs root CID
  • improve error page styling and button UX
  • show peerids when we discovered them but failed to connect to them because they are offline DHT peer (found peerid but no addrs, or cant connect to them)

Demo

This PR not only shows the PeerID of "offline" peer found as a provider on DHT, but also has two buttons to Refresh or Debug:

image

- add DiagnosticServiceURL config for CID retrievability checks
- show "Check CID retrievability" button on 504 errors
- add "Retry" button on all error pages
- track and display failed peer IDs in timeout messages
- indicate when timeout occurs on sub-resource vs root CID
- improve error page styling and button UX
@codecov
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

❌ Patch coverage is 54.16667% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.50%. Comparing base (9c3214b) to head (f235f1c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
retrieval/state.go 70.58% 14 Missing and 1 partial ⚠️
gateway/errors.go 40.00% 11 Missing and 1 partial ⚠️
gateway/backend_blocks.go 25.00% 5 Missing and 1 partial ⚠️
gateway/backend_car.go 0.00% 4 Missing and 1 partial ⚠️
gateway/gateway.go 37.50% 4 Missing and 1 partial ⚠️
...uting/providerquerymanager/providerquerymanager.go 0.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1023      +/-   ##
==========================================
- Coverage   60.58%   60.50%   -0.09%     
==========================================
  Files         268      268              
  Lines       33409    33487      +78     
==========================================
+ Hits        20241    20261      +20     
- Misses      11495    11546      +51     
- Partials     1673     1680       +7     
Files with missing lines Coverage Δ
gateway/assets/assets.go 77.52% <ø> (ø)
gateway/handler.go 77.62% <100.00%> (+0.10%) ⬆️
...uting/providerquerymanager/providerquerymanager.go 82.12% <0.00%> (-2.99%) ⬇️
gateway/backend_car.go 48.37% <0.00%> (-0.28%) ⬇️
gateway/gateway.go 79.31% <37.50%> (-4.24%) ⬇️
gateway/backend_blocks.go 40.06% <25.00%> (-0.19%) ⬇️
gateway/errors.go 81.87% <40.00%> (-4.14%) ⬇️
retrieval/state.go 81.33% <70.58%> (-10.78%) ⬇️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- add foundProviders tracking to capture all discovered providers
- show peer IDs when providers are unreachable (e.g., offline with no addresses)
- refactor state.go to be more DRY with helper methods
- rename MaxFailedProvidersToTrack to MaxProvidersSampleSize for clarity
- add tests for provider tracking and summary messages

fixes missing peer IDs in gateway timeout errors when providers cannot be reached
- reconcile RetrievalState -> State renaming
- keep addProvider/getProviders helper methods
- maintain GetFoundProviders functionality
lidel and others added 5 commits September 8, 2025 17:22
replace addProvider with appendProviders that follows the idiomatic
append pattern with variadic arguments, as suggested in PR review.
the helper properly limits the sample size to MaxProvidersSampleSize
while maintaining thread safety.

Addresses: #1023 (comment)

Co-authored-by: Andrew Gillis <[email protected]>
- fullfil → fulfill (2 instances)
- backed → backend (1 instance)
validate DiagnosticServiceURL and fall back to empty string if invalid.
log error when invalid URL is provided.

extracted to validateConfig helper for better code organization.
@lidel lidel merged commit 7d24930 into main Sep 8, 2025
15 checks passed
@lidel lidel deleted the feat/504-error-ux-improvements branch September 8, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants