-
Notifications
You must be signed in to change notification settings - Fork 0
fix: migrate ipfs gateway #3
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
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe updates modify the URL endpoints in the Changes
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
❌ Deploy Preview for kleros-tg-court-notifications failed. Why did it fail? →
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
functions/util/v1/appeal.ts (1)
66-67
: Add error logging in catch block.While the URL update from
ipfs.kleros.io
tocdn.kleros.link
is consistent with the IPFS gateway migration objective, the empty catch block silently swallows errors. Consider logging errors to help with debugging.try { res = await axios.get(`https://cdn.kleros.link/${metaEvidenceUri}`); - } catch (e) {} + } catch (e) { + console.error(`Failed to fetch meta-evidence from CDN: ${e}`); + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
functions/util/v1/appeal.ts
(1 hunks)functions/util/v1/dispute.ts
(1 hunks)
🔇 Additional comments (2)
functions/util/v1/dispute.ts (1)
37-37
:❓ Verification inconclusive
Verify the new CDN endpoint.
The URL update from
ipfs.kleros.io
tocdn.kleros.link
is consistent with the IPFS gateway migration objective. The error handling and fallback mechanism remain intact.Let's verify that the new CDN endpoint is accessible and returns the expected data:
🏁 Script executed:
#!/bin/bash # Description: Verify that the new CDN endpoint is accessible and returns valid JSON. # Test: Fetch a sample policy from the CDN. # Note: Using curl instead of axios as we're in a shell environment. curl -s "https://cdn.kleros.link/QmQjJqbKECzaTHHfDWEpQwRdzZyYQoZMZtGWjzJKNv5pdz" | jq .Length of output: 87
Action Required: Manual Verification of New CDN Endpoint
The update to the URL (
https://cdn.kleros.link
) aligns with the migration objective, but the test command provided did not produce any output, leaving the endpoint’s response unclear. Please manually verify that the endpoint returns the expected JSON data by using a more verbose test—such as appending the-I
flag to inspect HTTP headers or using additional curl verbosity—to ensure proper behavior.
- Re-run the curl test with verbose or header options (e.g.,
curl -s -I https://cdn.kleros.link/...
) to confirm the endpoint is responsive.- Validate that a known policy returns a valid JSON payload.
functions/util/v1/appeal.ts (1)
66-66
:❓ Verification inconclusive
Verify the new CDN endpoint for meta-evidence.
Let's verify that the new CDN endpoint correctly serves meta-evidence data.
🏁 Script executed:
#!/bin/bash # Description: Verify that the new CDN endpoint serves meta-evidence data correctly. # Test: Fetch a sample meta-evidence from the CDN. # Note: Using curl instead of axios as we're in a shell environment. curl -s "https://cdn.kleros.link/QmQtH5RK1qf8NKU2kHgkFqN6tRbwVnTJrKnPvXB7uuXD1B" | jq .Length of output: 87
Action: Manual Verification of CDN Endpoint Required
The automated test for the new CDN endpoint did not return any output. Please manually verify that the endpoint is correctly serving the meta-evidence data. Consider using additional diagnostic checks (e.g., verifying HTTP status codes and response content) to ensure the data is available as expected.
- File:
functions/util/v1/appeal.ts
(line 66)- Issue: The CDN endpoint call (
axios.get
) may not be returning valid meta-evidence data.- Recommendation: Run further tests (e.g., using curl with HTTP status and content checks) to confirm that the endpoint returns a non-empty, valid JSON response.
Summary by CodeRabbit