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

test: Use explicit ipv4 address instead of localhost when waiting on URLs #763

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

askoufis
Copy link
Contributor

@askoufis askoufis commented Apr 11, 2023

All our fixture tests use localhost in URLs. Some tests were failing locally for me because of this. This has to do with node 17+ preferring ipv6 over ipv4. See jeffbski/wait-on#133 for more info. We're pinning node 16 in sku though, so it's odd that this is even an issue.

Ideally we'd make webpack dev server listen on both ipv4 localhost and ipv6 localhost, but I'm not sure how to configure that. Others are welcome to try. https://webpack.js.org/configuration/dev-server/#devserverhost

@askoufis askoufis requested a review from a team as a code owner April 11, 2023 01:54
@changeset-bot
Copy link

changeset-bot bot commented Apr 11, 2023

⚠️ No Changeset found

Latest commit: 5d1cff0

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

@askoufis askoufis changed the title Use explicit ipv4 address isntead of localhost when waiting on URLs Use explicit ipv4 address instead of localhost when waiting on URLs Apr 11, 2023
@askoufis askoufis changed the title Use explicit ipv4 address instead of localhost when waiting on URLs test: Use explicit ipv4 address instead of localhost when waiting on URLs Apr 11, 2023
@askoufis askoufis enabled auto-merge (squash) April 11, 2023 01:59
@askoufis askoufis merged commit 65fd88b into master Apr 11, 2023
@askoufis askoufis deleted the explicit-ipv4 branch April 11, 2023 02:02
.replace(/http(s?)\:/, 'http$1-get:')
// As of node 17, ipv6 is preferred, so explicitly use ipv4
// See https://github.com/jeffbski/wait-on/issues/133
.replace(/localhost/, '127.0.0.1'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it work with this?

Suggested change
.replace(/localhost/, '127.0.0.1'),
.replace(/localhost/, '0.0.0.0'),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in #764

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