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 CI failure of e2e tests #151

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Conversation

rabi-siddique
Copy link
Contributor

@rabi-siddique rabi-siddique commented Jun 13, 2024

Recently, the end-to-end (e2e) tests for all dApps have been consistently failing. The underlying infrastructure of GitHub Actions can have different network configurations across different runs. Sometimes, the environment resolves localhost to 127.0.0.1 (IPv4), while other times it resolves to ::1 (IPv6), leading to inconsistencies in the connection check. See this issue for details.

The solution implemented in this PR sets the environment variable NODE_OPTIONS=--dns-result-order=ipv4first to prioritize IPv4 DNS resolution.

@rabi-siddique rabi-siddique changed the title test fix CI failure of e2e tests Jun 13, 2024
Copy link

cloudflare-workers-and-pages bot commented Jun 13, 2024

Deploying dapp-psm with  Cloudflare Pages  Cloudflare Pages

Latest commit: bde01c8
Status: ✅  Deploy successful!
Preview URL: https://1d422753.dapp-psm.pages.dev
Branch Preview URL: https://rs-fix-ci-failure-for-e2e-te.dapp-psm.pages.dev

View logs

Copy link

github-actions bot commented Jun 13, 2024

Cloudflare deployment logs are available here

@rabi-siddique rabi-siddique force-pushed the rs-fix-ci-failure-for-e2e-tests branch 2 times, most recently from 0577f17 to f79324e Compare June 13, 2024 16:08
@rabi-siddique rabi-siddique force-pushed the rs-fix-ci-failure-for-e2e-tests branch from f79324e to dca7c5a Compare June 13, 2024 16:09
@rabi-siddique rabi-siddique requested a review from turadg June 13, 2024 16:15
Dockerfile Outdated
@@ -1,6 +1,9 @@
# syntax=docker/dockerfile:1
FROM --platform=linux/amd64 synthetixio/docker-e2e:18.16-ubuntu as base

# Prefer IPv4 for DNS resolution
Copy link
Member

Choose a reason for hiding this comment

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

Sounds like some serious detective work! Consider explaining in the comment why to prefer IPv4.

@@ -1,6 +1,9 @@
# syntax=docker/dockerfile:1
FROM --platform=linux/amd64 synthetixio/docker-e2e:18.16-ubuntu as base

# Prefer IPv4 for DNS resolution
ENV NODE_OPTIONS=--dns-result-order=ipv4first
Copy link
Member

Choose a reason for hiding this comment

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

I wonder whether there's a way to disable ipv6 for the whole Docker daemon. Node doesn't seem like the right level of abstraction for compatibility with the GH Action runner

Copy link
Contributor Author

@rabi-siddique rabi-siddique Jun 14, 2024

Choose a reason for hiding this comment

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

Shall we try this solution if you recommend it?

Also, we can pass the host flag to vite. This will allow the development server to accept connections from all network interfaces, and we won't need to disable IPv6 or set a priority for IPv4.

Copy link
Member

Choose a reason for hiding this comment

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

This isn't any worse than the other options :) The link will help if someone is running into complexity it creates

@rabi-siddique rabi-siddique force-pushed the rs-fix-ci-failure-for-e2e-tests branch from dca7c5a to bde01c8 Compare June 14, 2024 02:48
@rabi-siddique rabi-siddique merged commit 0003b60 into main Jun 14, 2024
3 checks passed
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