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

Revert "feat: add doNotUseFetch helper to the test utils" #5801

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

galargh
Copy link
Member

@galargh galargh commented Oct 3, 2024

Reverts #5789

This can be reverted because we should not use fetch directly anyway. We should use request from utils instead which uses undici internally.

We can explore the ability to disable net connect for undici globally in a follow-up PR. The rough idea that we could explore would be to use setGlobalDispatcher/getGlobalDispatcher to control the global dispatcher/agent set for tests.

See #5774 (comment) for details.

@galargh galargh requested a review from alcuadrado October 3, 2024 12:28
Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 0:28am

Copy link

changeset-bot bot commented Oct 3, 2024

⚠️ No Changeset found

Latest commit: 540300a

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

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Oct 3, 2024
@schaable
Copy link
Member

schaable commented Oct 3, 2024

Hey @galargh, I have some experience on mocking requests with undici, let me know if you need a hand. You can also check out v-next/hardhat/test/internal/builtin-plugins/network-manager/http-provider.ts for an example.

@galargh
Copy link
Member Author

galargh commented Oct 3, 2024

Hey @galargh, I have some experience on mocking requests with undici, let me know if you need a hand. You can also check out v-next/hardhat/test/internal/builtin-plugins/network-manager/http-provider.ts for an example.

Thanks! Temporarily, I decided just not to worry about it. I looked at initializeTestDispatcher for potential inspiration for the future. We'll ping you when/if we have to revisit this.

@galargh galargh added this pull request to the merge queue Oct 3, 2024
Merged via the queue into v-next with commit 7f6eb44 Oct 3, 2024
57 checks passed
@galargh galargh deleted the revert-5789-galargh/do-not-use-fetch branch October 3, 2024 15:25
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready This issue is ready to be worked on
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants