generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 138
feat(gateway): enhance 504 timeout errors with diagnostic UX #1023
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 Report❌ Patch coverage is @@ 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
... and 9 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This was referenced Sep 1, 2025
- 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
This was referenced Sep 1, 2025
Closed
- reconcile RetrievalState -> State renaming - keep addProvider/getProviders helper methods - maintain GetFoundProviders functionality
gammazero
approved these changes
Sep 6, 2025
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This expands on foundations from #1015:
DiagnosticServiceURLconfig for CID retrievability checksDemo
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: