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

Add follow up tests for hook handler lazy loading race conditions #5902

Open
kanej opened this issue Oct 30, 2024 · 2 comments
Open

Add follow up tests for hook handler lazy loading race conditions #5902

kanej opened this issue Oct 30, 2024 · 2 comments
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task

Comments

@kanej
Copy link
Member

kanej commented Oct 30, 2024

We merged in a bug fix for some race conditions in some of our dynamic import patterns: #5899

We need to add integration tests to cover the bug: https://github.com/NomicFoundation/hardhat-v3-alpha-testing/blob/8bf0bf69b6207a979ba16f59a13c8ee9f6c17a35/viem-provider-error/test/Lock.ts#L6

Specifically adding a second describe block that makes a second connection and uses it can cause issues where a race condition means both networks have the same network id (leading to incorrect accessing of cached data by network id).

@kanej kanej added the v-next A Hardhat v3 development task label Oct 30, 2024
@kanej kanej added this to the Private Alpha milestone Oct 30, 2024
@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Oct 30, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Oct 30, 2024
@alcuadrado
Copy link
Member

We may not be able to create a deterministic and stable test. We were a bit lucky with the two describes.

@kanej
Copy link
Member Author

kanej commented Oct 31, 2024

Lets timebox the investigation here to 2hrs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Projects
Status: Backlog
Development

No branches or pull requests

2 participants