Skip to content

Conversation

@rotarur
Copy link
Contributor

@rotarur rotarur commented May 9, 2025

This PR changes the hardcoded DEFAULT_MAX_ATTEMPTS to a configurable env var GRAPH_NODE_IPFS_MAX_ATTEMPTS to avoid spamming the IPFS on deterministic errors

@rotarur rotarur force-pushed the ipfs-max-attempts branch from 348af22 to 8c6ed35 Compare May 9, 2025 17:44
@rotarur rotarur force-pushed the ipfs-max-attempts branch from 8c6ed35 to d02a0f2 Compare May 9, 2025 17:45
@fordN
Copy link
Contributor

fordN commented May 9, 2025

Is this really just for deterministic errors? I don't see anything that is classifying the errors as deterministic and only hitting max for those.

Copy link
Contributor

@sirenko sirenko left a comment

Choose a reason for hiding this comment

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

LGTM

- `GRAPH_IPFS_REQUEST_LIMIT`: Limits the number of requests per second to IPFS for file data sources.
- `GRAPH_IPFS_MAX_ATTEMPTS`: Safety mechanism to prevent infinite spamming
of IPFS servers in the event of logical or unhandled deterministic
error (default: 100 000)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The description should explain what this variable does, not why you would want to use it. Also the next line seems to belong to GRAPH_IPFS_REQUEST_LIMIT

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, will fix that and add a better description

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@rotarur rotarur requested a review from lutter May 12, 2025 14:08
@rotarur rotarur merged commit e50cbda into master May 12, 2025
6 checks passed
@Theodus Theodus deleted the ipfs-max-attempts branch May 12, 2025 23:39
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.

6 participants