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

fix(builder): Error passthrough on rpc errors #1324

Merged
merged 2 commits into from
Sep 2, 2024
Merged

Conversation

FuzzB0t
Copy link
Contributor

@FuzzB0t FuzzB0t commented Aug 28, 2024

Any errors that happen while trying to communicate with the RPC during read operations on optimism were being skipped, which is why the fallback registry would try mainnet even though it may result in fetching the wrong package info.

Adding a throw statement resulted in the RPC error being thrown when a read operation fails due to an RPC issue.

fixes https://linear.app/usecannon/issue/CAN-470/differentiate-errors-better-on-the-fallback-registry

Examples:

Package only on Ethereum mainnet throws rpc error if there is one:
https://www.loom.com/share/bfea17e267f4436395dcdac94e2afd9d

Package only on Ethereum mainnet throws rpc error if there is one:
https://www.loom.com/share/393264be32cd44bcbb499e800521d0aa

Package on both networks does not fall back to eth mainnet if theres an rpc error:
https://www.loom.com/share/e064960836264851aa8ffe63f1ab3dd2

Ive confirmed that all the packages are resolved correctly and the fallback behaviour now works ONLY if the package is not found (aka returns empty string)

Copy link

changeset-bot bot commented Aug 28, 2024

⚠️ No Changeset found

Latest commit: 6a0c083

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

nx-cloud bot commented Aug 28, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 6a0c083. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@FuzzB0t FuzzB0t requested a review from a team August 28, 2024 23:21
@mjlescano mjlescano requested a review from dbeal-eth September 2, 2024 12:28
@mjlescano mjlescano merged commit 3e907a4 into main Sep 2, 2024
9 of 11 checks passed
@mjlescano mjlescano deleted the fix-fallback-behavior branch September 2, 2024 17:38
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