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

tests: New zlib version is 1.3, which only has two elements #50364

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

DimStar77
Copy link
Contributor

Change the test code to accept one, two, or three elements past the major version

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Oct 24, 2023
@DimStar77
Copy link
Contributor Author

Background:

  • openSUSE is in the progress of updating zlib from 1.2.13 to 1.3.
  • nodejs is configure with --shared-zlib

With this constellation, the test suite failed with

[ 2208s] not ok 2407 parallel/test-process-versions
[ 2208s]   ---
[ 2208s]   duration_ms: 388.41800
[ 2208s]   severity: fail
[ 2208s]   exitcode: 1
[ 2208s]   stack: |-
[ 2208s]     node:assert:1026
[ 2208s]         throw err;
[ 2208s]         ^
[ 2208s]     
[ 2208s]     AssertionError [ERR_ASSERTION]: The input did not match the regular expression /^\d+(?:\.\d+){2,3}(?:-.*)?$/. Input:
[ 2208s]     
[ 2208s]     '1.3'
[ 2208s]     
[ 2208s]         at Object.<anonymous> (/home/abuild/rpmbuild/BUILD/node-v20.8.1/test/parallel/test-process-versions.js:64:8)
[ 2208s]         at Module._compile (node:internal/modules/cjs/loader:1241:14)
[ 2208s]         at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
[ 2208s]         at Module.load (node:internal/modules/cjs/loader:1091:32)
[ 2208s]         at Module._load (node:internal/modules/cjs/loader:938:12)
[ 2208s]         at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
[ 2208s]         at node:internal/main/run_main_module:23:47 {
[ 2208s]       generatedMessage: true,
[ 2208s]       code: 'ERR_ASSERTION',
[ 2208s]       actual: '1.3',
[ 2208s]       expected: /^\d+(?:\.\d+){2,3}(?:-.*)?$/,
[ 2208s]       operator: 'match'
[ 2208s]     }

In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.
@lpinca
Copy link
Member

lpinca commented Oct 24, 2023

I think a better approach would be to skip the assertion when Node.js is built with the --shared-zlib option as the version might not match even with the proposed regex.

@lpinca
Copy link
Member

lpinca commented Nov 1, 2023

Can you please fix the commit message in accordance with our guidelines? Thank you.

Neverming, commit message is ok. I was tricked by PR title.

@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 1, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 1, 2023
@richardlau
Copy link
Member

Can you please fix the commit message in accordance with our guidelines? Thank you.

Commit message looks okay (it was already changed from the PR title).

@nodejs-github-bot
Copy link
Collaborator

@DimStar77
Copy link
Contributor Author

Can you please fix the commit message in accordance with our guidelines? Thank you.

Neverming, commit message is ok. I was tricked by PR title.

My bad - that was the 'original' commit message, saw the bot complaining about this and rewrote it - hopefully to comply

@richardlau richardlau added lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x labels Nov 1, 2023
@nodejs-github-bot
Copy link
Collaborator

@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 2, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 2, 2023
@nodejs-github-bot nodejs-github-bot merged commit 5d01042 into nodejs:main Nov 2, 2023
59 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 5d01042

anonrig pushed a commit to anonrig/node that referenced this pull request Nov 9, 2023
In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.

PR-URL: nodejs#50364
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
targos pushed a commit that referenced this pull request Nov 11, 2023
In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.

PR-URL: #50364
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
targos pushed a commit that referenced this pull request Nov 14, 2023
In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.

PR-URL: #50364
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
@targos targos added backported-to-v20.x PRs backported to the v20.x-staging branch. and removed lts-watch-v20.x PRs that may need to be released in v20.x labels Nov 15, 2023
targos pushed a commit that referenced this pull request Nov 15, 2023
In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.

PR-URL: #50364
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
@targos targos added backported-to-v18.x PRs backported to the v18.x-staging branch. and removed lts-watch-v18.x PRs that may need to be released in v18.x. labels Nov 15, 2023
targos pushed a commit that referenced this pull request Nov 15, 2023
In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.

PR-URL: #50364
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.

PR-URL: nodejs/node#50364
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
In the past, zlib versions had major.minor.micro formats, but with 1.3
this has been changed.

Change the test code to accept one, two, or three elements past the
major version.

PR-URL: nodejs/node#50364
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-to-v18.x PRs backported to the v18.x-staging branch. backported-to-v20.x PRs backported to the v20.x-staging branch. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants