Skip to content
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

Handle temporary web3.storage outages #197

Open
bajtos opened this issue Apr 29, 2024 · 1 comment
Open

Handle temporary web3.storage outages #197

bajtos opened this issue Apr 29, 2024 · 1 comment

Comments

@bajtos
Copy link
Member

bajtos commented Apr 29, 2024

From time to time, when we fetch CID from the web3.storage gateway, we encounter an error like this one:

Error: Invalid block bafkreiateg65hcueh66ytp6yufwaihpnvw4oyy27d3krdhj2hv4wdr2ssu of root bafybeigfpytfzw23e2dj6ebomyhmxbd6eqfuorpknqidizriwxldq6x5xm
    at Object.get (file:///home/runner/work/spark-evaluate/spark-evaluate/lib/preprocess.js:150:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///home/runner/work/spark-evaluate/spark-evaluate/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.js:60:27 {

  [cause]: TypeError: Cannot read properties of undefined (reading 'cid')
      at validateBlock (file:///home/runner/work/spark-evaluate/spark-evaluate/node_modules/@web3-storage/car-block-validator/esm/src/index.js:56:36)
      at Object.get (file:///home/runner/work/spark-evaluate/spark-evaluate/lib/preprocess.js:148:15)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async file:///home/runner/work/spark-evaluate/spark-evaluate/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.js:60:27
}

In #134, we implemented a retry scheme to work around the problem.

However, in recent dry-run evaluations in GitHub Actions (see e.g. #196), I noticed that even 10 retries are not enough to fetch the CAR file.

  • Is this a problem specific to GHA only, or does it happen in production too?
  • What other measures can we implement to avoid failures in this component of our service?
@juliangruber
Copy link
Member

I don't see how this could be specific to GHA only 🤔 Can we just increase the retry count?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants