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

ci: fix errors in ci github action for node 8 and 9 #48

Merged

Conversation

inigomarquinez
Copy link
Contributor

@inigomarquinez inigomarquinez commented Apr 24, 2024

This PR fixes nyc version to 14.1.1 when running tests in node 8 or node 9. nyc 15.x requires a yargs package version that requires node >=10.

I've also added the latest versions of node (18, 19 and 20) to the matrix.

Related to jshttp/http-errors#108

Warning

The CI is failing for one test in node@21 and node@22. The error has nothing to do with this PR, because those node versions were not tested before and with this PR we discovered it.

Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

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

Can we include Node@21?

Copy link
Member

@wesleytodd wesleytodd left a comment

Choose a reason for hiding this comment

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

Yeah agree we should add node 21, but everything else looks good!

@inigomarquinez
Copy link
Contributor Author

inigomarquinez commented Apr 30, 2024

Added support for node@21 here

@inigomarquinez
Copy link
Contributor Author

The CI is failing for one test in node@21 and node@22. The error has nothing to do with this PR, because those node versions were not tested before and with this PR we discovered it.

@wesleytodd
Copy link
Member

Interesting, I don't have time to look into the failure right now, but the test is pretty simple and clear so likely this is a change in node as I don't think this package ever returns a 400, so likely we either need to update/remove this test.

@inigomarquinez
Copy link
Contributor Author

@UlisesGascon , @wesleytodd

How should we proceed with this PR? Can we merge it and then fix the failing test in a separate PR? Or do you want to proceed differently?

@wesleytodd
Copy link
Member

So I just pulled this down and am poking around at it, and it is because node is sending back the 400 before it gets passed onto finalhandler. I was looking for a clear commit which would cause it but could not find it, but my guess is maybe the llhttp update? @ShogunPanda, would you mind taking a look to see if this was an expected breaking change?

@wesleytodd
Copy link
Member

I realized the thread here didn't have enough context, sorry about that, here is what I was hoping you could look at @ShogunPanda:

The test passes an invalid path of /foo%20§. In node versions prior to 21 this was passed along to finalhandler and was not considered a 400 from node. Now it is returning a 400 with an empty body which circumvents finalhandler's 404 and html response.

@ShogunPanda
Copy link

@wesleytodd Yes, the llhttp is the "problem". Between 8 and 9 llhttp became strict by default: invalid characters in the URL are not supported anymore and return in a parse error.

@wesleytodd
Copy link
Member

Awesome, thanks for the direct confirmation. Now that we are sure that is the cause, I think we can just remove these tests for invalid paths since we will also be dropping node support prior to this soon and I dont think we have any other changes slated for this package which warrant trying to conditionally fix the test.

@inigomarquinez do you want to do that in this PR to get it passing before we merge? Or should we do it in a separate one? I am not super opinionated either way.

@wesleytodd wesleytodd merged commit eada099 into pillarjs:master Aug 17, 2024
26 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.

4 participants