-
Notifications
You must be signed in to change notification settings - Fork 359
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: check ip version if settings.useStaticServer #6936
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you able to see the failure in the CI? Any chance we could add a test to verify it's fixed?
src/utils/framework-server.ts
Outdated
@@ -30,9 +31,11 @@ export const startFrameworkServer = async function ({ | |||
if (settings.command) { | |||
runCommand(settings.command, { env: settings.env, cwd }) | |||
} | |||
await startStaticServer({ settings }) | |||
const { address } = await startStaticServer({ settings }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than getting address
and then trying to figure out the IP family from the hostname, can you not use the family
property directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna find out!!! yes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
No we didn't see it, but I'm going to try out running tests on win + node 23 in the pipelines. Wish me luck lol. |
2710330
to
8a56858
Compare
5322732
to
98ea076
Compare
@@ -682,7 +682,9 @@ describe.concurrent('command/dev', () => { | |||
async (server) => { | |||
const output = server.outputBuffer.map((buff) => buff.toString()).join('\n') | |||
t.expect(output).toContain('Server now ready') | |||
t.expect(server.errorBuffer).toHaveLength(0) | |||
// With node 23 we might be getting some warnings, but no errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What warnings? Isn't that what we're fixing with this PR? Also, we're not looking for any specific OS or Node.js version here, so we're suddenly saying that it's okay for any OS and any Node.js version to have warnings — is that intended?
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 40 | ||
strategy: | ||
matrix: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You don't need a matrix if you only want to use one OS and one Node.js version.
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
node-version: ['23'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not latest
?
@@ -123,3 +123,105 @@ jobs: | |||
flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }} | |||
token: ${{ secrets.CODECOV_TOKEN }} | |||
if: '${{ !steps.release-check.outputs.IS_RELEASE }}' | |||
integration-win-node-23: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the long-term plan for this action? I understand we're looking to test this specific version today, but what happens after this goes to LTS and beyond? Can this be removed? Just trying to make sure we're not left with this extra step forever without people understanding why. Perhaps adding a comment here would help?
🎉 Thanks for submitting a pull request! 🎉
Summary
This hopefully fixes this: https://answers.netlify.com/t/128792
I noticed, while running this on windows in a VM, that the proxy was trying to connect to an IPv4 server, while the static server was actually an IPv6 one.
With this logic, we explicitly check what version we are running within the
settings.useStaticServer
branch of logic as well.For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)