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

eslint-plugin-jest v24.0.0 broken on CI #824

Closed
richardlau opened this issue Sep 7, 2020 · 8 comments · Fixed by #831
Closed

eslint-plugin-jest v24.0.0 broken on CI #824

richardlau opened this issue Sep 7, 2020 · 8 comments · Fixed by #831

Comments

@richardlau
Copy link
Member

  • Node Version: 14.9.0
  • CitGM Version: 7.1.4
  • Platform: multiple

Looks like the most recent version of eslint-plugin-jest, v24.0.0, is broken when running in CITGM on our CI:
e.g. https://ci.nodejs.org/job/citgm-smoker/2458/nodes=ubuntu1804-64/testReport/junit/(root)/citgm/eslint_plugin_jest_v24_0_0/

undefinedUsage Error: Unrecognized or legacy configuration settings found: ignoreEngines - run "yarn config -v" to see the list of settings supported in Yarn (in <environment>)
 $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds]

I can reproduce locally with [email protected] but not with [email protected] (the previous release).

bash-4.2$ node bin/citgm eslint-plugin-jest
info:    starting            | eslint-plugin-jest  
info:    lookup              | eslint-plugin-jest  
info:    lookup-found        | eslint-plugin-jest  
info:    eslint-plugin-jest lookup-replace| https://github.com/jest-community/eslint-plugin-jest/archive/1392cf39d8d8fcc5d9bbcc92e3388ac
info:    eslint-plugin-jest npm:| Downloading project: https://github.com/jest-community/eslint-plugin-jest/archive/1392cf39d8d8fcc5d9bb
info:    eslint-plugin-jest npm:| Project downloaded eslint-plugin-jest-24.0.0.tgz
info:    eslint-plugin-jest yarn:| yarn install started
error:   failure             | Install Failed      
error:   failing module(s)   |                     
error:   module name:        | eslint-plugin-jest  
error:   version:            | 24.0.0              
error:   error:              | Install Failed      
error:   error:              | undefinedUsage Error: Unrecognized or legacy configuration settings found: ignoreEngines - run "y
error:                       |                                                                                                          
error:                       | $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds]              
error:   done                | The smoke test has failed.
info:    duration            | test duration: 4732ms
bash-4.2$ 

cc @SimenB

@SimenB
Copy link
Member

SimenB commented Sep 7, 2020

Ah sorry, we migrated to yarn v2. Removing --ignore-engines should be enough (they've removed the flag and just warn now)

@richardlau
Copy link
Member Author

We set YARN_IGNORE_ENGINES unilaterally since #738 for #737. We can take it out but we'll need to check doing so doesn't affect other modules which use yarn.

@SimenB
Copy link
Member

SimenB commented Sep 7, 2020

Hmm. We can run yarn --version - if v2 do not add the arg?

@SimenB
Copy link
Member

SimenB commented Sep 7, 2020

/cc @arcanis thoughts on best way to approach this?

@arcanis
Copy link
Contributor

arcanis commented Sep 8, 2020

If checking the version is possible that would be the easiest workaround. The second best one (but still significantly less good) would be to modify yarnPath to refer to a wrapper script that would remove the extraneous configuration keys 🤔

richardlau added a commit to richardlau/citgm that referenced this issue Sep 25, 2020
This partially reverts c3917aa.
yarn v2 does not support the YARN_IGNORE_ENGINES option.

Fixes: nodejs#824
@richardlau
Copy link
Member Author

Hmm. We can run yarn --version - if v2 do not add the arg?

#831 does this.

It also looks like eslint-plugin-jest fails on big endian platforms (e.g. AIX, LinuxONE) and should be skipped on those (we already skip on AIX):
https://ci.nodejs.org/job/citgm-smoker/nodes=rhel7-s390x/2473/testReport/(root)/citgm/eslint_plugin_jest_v24_0_2/

undefinedType Error: Cannot create property 'message' on string 'Runtime error: expected the system to be little-endian!'
     at Module.w (/data/iojs/tmp/citgm_tmp/1984e210-f804-40a3-ab37-a5b90c16f8f1/eslint-plugin-jest/.yarn/releases/yarn-sources.cjs:2:372125)
     at o (/data/iojs/tmp/citgm_tmp/1984e210-f804-40a3-ab37-a5b90c16f8f1/eslint-plugin-jest/.yarn/releases/yarn-sources.cjs:2:268762)
     at Function.find (/data/iojs/tmp/citgm_tmp/1984e210-f804-40a3-ab37-a5b90c16f8f1/eslint-plugin-jest/.yarn/releases/yarn-sources.cjs:2:269118)
     at async /data/iojs/tmp/citgm_tmp/1984e210-f804-40a3-ab37-a5b90c16f8f1/eslint-plugin-jest/.yarn/releases/yarn-sources.cjs:2:247308
     at async r (/data/iojs/tmp/citgm_tmp/1984e210-f804-40a3-ab37-a5b90c16f8f1/eslint-plugin-jest/.yarn/releases/yarn-sources.cjs:2:247002)

@SimenB
Copy link
Member

SimenB commented Sep 26, 2020

#831 does this.

🎉

It also looks like eslint-plugin-jest fails on big endian platforms

Wat. I've never seen that error and have no idea where it comes from. I tried grepping in the repo (which has both the yarn script and node_modules) without finding that string. Googling seems to indicate it comes from some WASM stuff, so I guess it might be some native module?

@arcanis
Copy link
Contributor

arcanis commented Sep 26, 2020

It seems like Emscripten doesn't support big endian systems, and we use it for the zip support 🤔

Emscripten-compiled code currently requires a little-endian host to run on, which accounts for 99% of machines connected to the internet. This is because JavaScript typed arrays (used for views on memory) obey the host byte ordering and LLVM needs to know which endianness to target.

richardlau added a commit that referenced this issue Sep 29, 2020
eslint-plugin-jest uses yarn policies which uses emscripten which
only supports little endian architectures.

Refs: #824 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants