Build: Use HTTP check instead of detect-port for service readiness to prevent EADDRINUSE#33924
Merged
Merged
Conversation
…revent EADDRINUSE Co-authored-by: valentinpalkovic <5889929+valentinpalkovic@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix port clash issue in CI for E2E tests
fix: use HTTP check instead of detect-port for service readiness to prevent EADDRINUSE
Feb 25, 2026
|
View your CI Pipeline Execution ↗ for commit 810c15c
☁️ Nx Cloud last updated this comment at |
Contributor
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughBoth dev and serve task scripts replaced port availability detection with HTTP probing. The updated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #33650
detect-portcan give false negatives in CI container environments — reporting a port as free even when a server is already bound to it (typically due to IPv4/IPv6 interface differences). When this happens duringyarn task e2e-tests-dev -s e2e-tests-dev, thedevtask gets'notserving'status, causing the task runner to attempt starting Storybook again, resulting inEADDRINUSE: address already in use 127.0.0.1:6006.Changes
scripts/tasks/dev.ts/scripts/tasks/serve.ts: Replacedetect-portTCP check inready()with an HTTP fetch to/iframe.html. This matches what the CI "wait for port" step does and is immune to the IPv4/IPv6 false-negative issue.The HTTP check verifies Storybook is actually serving content rather than just testing port occupancy, making it a more accurate signal of service readiness.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Summary by CodeRabbit