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

mongosh: 1.6.0 -> 1.6.1 #203918

Closed
wants to merge 1 commit into from
Closed

mongosh: 1.6.0 -> 1.6.1 #203918

wants to merge 1 commit into from

Conversation

aaronjheng
Copy link
Contributor

@aaronjheng aaronjheng commented Dec 1, 2022

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@aaronjheng
Copy link
Contributor Author

@winterqt Sorry to bother. Really need help here. I fail to build mongosh with buildNpmPackage.

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /nix/store/c02blhdvkalplc50qkv65fzxxp7q6s4a-nodejs-16.18.1/bin/node /nix/store/c02blhdvkalplc50qkv65fzxxp7q6s4a-nodejs-16.18.1/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/build/cache --prefer-offline=false --prefer-online=false --offline=true --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code ENOTCACHED
npm ERR! npm ERR! request to https://registry.npmjs.org/assume failed: cache mode is 'only-if-cached' but no cached response is available.
npm ERR!

@winterqt
Copy link
Member

winterqt commented Dec 1, 2022

@aaronjheng Does this persist if you remove the Node 16 override? (Did another issue prompt the addition of that override? It shouldn't be needed.)

@aaronjheng
Copy link
Contributor Author

Does this persist if you remove the Node 16 override?

Yes.

Did another issue prompt the addition of that override?

Nope. Upstream requires Node.js v16.x.

@winterqt
Copy link
Member

winterqt commented Dec 1, 2022

Looks like a Git dependency is... trying to install something in an install script? Maybe?

Can you add --verbose to npmFlags and provide logs, please?

@aaronjheng
Copy link
Contributor Author

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/bin/node /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/build/cache --prefer-offline=false --prefer-online=false --offline=true --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm verb cli /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/bin/node /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/bin/npm-cli.js
npm ERR! npm info using [email protected]
npm ERR! npm info using [email protected]
npm ERR! npm timing npm:load:whichnode Completed in 1ms
npm ERR! npm timing config:load:defaults Completed in 1ms
npm ERR! npm timing config:load:file:/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/npmrc Completed in 0ms
npm ERR! npm timing config:load:builtin Completed in 0ms
npm ERR! npm timing config:load:cli Completed in 3ms
npm ERR! npm timing config:load:env Completed in 1ms
npm ERR! npm timing config:load:file:/build/cache/_cacache/tmp/git-cloneVBmpEO/.npmrc Completed in 0ms
npm ERR! npm timing config:load:project Completed in 4ms
npm ERR! npm timing config:load:file:/build/.npmrc Completed in 3ms
npm ERR! npm timing config:load:user Completed in 3ms
npm ERR! npm timing config:load:file:/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/etc/npmrc Completed in 0ms
npm ERR! npm timing config:load:global Completed in 0ms
npm ERR! npm timing config:load:validate Completed in 1ms
npm ERR! npm timing config:load:credentials Completed in 1ms
npm ERR! npm timing config:load:setEnvs Completed in 0ms
npm ERR! npm timing config:load Completed in 15ms
npm ERR! npm timing npm:load:configload Completed in 15ms
npm ERR! npm timing npm:load:mkdirpcache Completed in 1ms
npm ERR! npm timing npm:load:mkdirplogs Completed in 0ms
npm ERR! npm verb title npm install
npm ERR! npm verb argv "install" "--force" "--cache" "/build/cache" "--prefer-offline" "false" "--prefer-online" "false" "--offline" "true" "--no-progress" "--no-save" "--no-audit" "--include" "dev" "--include" "peer" "--include" "optional" "--no-package-lock-only" "--no-dry-run"
npm ERR! npm timing npm:load:setTitle Completed in 1ms
npm ERR! npm timing config:load:flatten Completed in 3ms
npm ERR! npm timing npm:load:display Completed in 5ms
npm ERR! npm verb logfile logs-max:10 dir:/build/cache/_logs
npm ERR! npm verb logfile /build/cache/_logs/2022-12-01T14_58_06_455Z-debug-0.log
npm ERR! npm timing npm:load:logFile Completed in 4ms
npm ERR! npm timing npm:load:timers Completed in 0ms
npm ERR! npm timing npm:load:configScope Completed in 1ms
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm timing npm:load Completed in 29ms
npm ERR! npm timing arborist:ctor Completed in 2ms
npm ERR! npm timing arborist:ctor Completed in 1ms
npm ERR! npm timing idealTree:init Completed in 13ms
npm ERR! npm timing idealTree:userRequests Completed in 0ms
npm ERR! npm timing idealTree:#root Completed in 44ms
npm ERR! npm timing idealTree:node_modules/assume Completed in 0ms
npm ERR! npm timing idealTree:node_modules/cross-spawn Completed in 1ms
npm ERR! npm timing idealTree:node_modules/istanbul Completed in 0ms
npm ERR! npm timing idealTree:node_modules/mocha Completed in 0ms
npm ERR! npm timing idealTree:node_modules/pre-commit Completed in 0ms
npm ERR! npm timing idealTree:node_modules/which Completed in 0ms
npm ERR! npm timing idealTree:buildDeps Completed in 46ms
npm ERR! npm timing idealTree:fixDepFlags Completed in 1ms
npm ERR! npm timing idealTree Completed in 62ms
npm ERR! npm timing command:install Completed in 69ms
npm ERR! npm verb stack Error: request to https://registry.npmjs.org/assume failed: cache mode is 'only-if-cached' but no cached response is available.
npm ERR! npm verb stack     at cacheFetch (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js:12:13)
npm ERR! npm verb stack     at async fetch (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:98:7)
npm ERR! npm verb stack     at async RegistryFetcher.packument (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/node_modules/pacote/lib/registry.js:92:19)
npm ERR! npm verb stack     at async RegistryFetcher.manifest (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/node_modules/pacote/lib/registry.js:124:23)
npm ERR! npm verb stack     at async Arborist.[nodeFromEdge] (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1061:19)
npm ERR! npm verb stack     at async Arborist.[buildDepStep] (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:930:11)
npm ERR! npm verb stack     at async Arborist.buildIdealTree (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:211:7)
npm ERR! npm verb stack     at async Promise.all (index 1)
npm ERR! npm verb stack     at async Arborist.reify (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:153:5)
npm ERR! npm verb stack     at async Install.exec (/nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/npm/lib/commands/install.js:145:5)
npm ERR! npm verb cwd /build/cache/_cacache/tmp/git-cloneVBmpEO
npm ERR! npm verb Linux 5.15.0-53-generic
npm ERR! npm verb node v16.18.1
npm ERR! npm verb npm  v8.19.2
npm ERR! npm ERR! code ENOTCACHED
npm ERR! npm ERR! request to https://registry.npmjs.org/assume failed: cache mode is 'only-if-cached' but no cached response is available.
npm ERR! npm verb exit 1
npm ERR! npm timing npm Completed in 190ms
npm ERR! npm verb unfinished npm timer reify 1669906686575
npm ERR! npm verb unfinished npm timer reify:loadTrees 1669906686578
npm ERR! npm verb code 1
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /build/cache/_logs/2022-12-01T14_58_06_455Z-debug-0.log
npm verb exit 1
npm timing npm Completed in 13572ms
npm verb unfinished npm timer reify 1669906678788
npm verb unfinished npm timer reify:unpack 1669906679128
npm verb unfinished npm timer reifyNode:node_modules/pre-commit 1669906679144
npm verb unfinished npm timer reifyNode:node_modules/electron-notarize 1669906679163
npm verb code 1

@winterqt
Copy link
Member

winterqt commented Dec 1, 2022

Sorry, to be clear, I mean full build logs (the entire nix-build output). Thanks!

@aaronjheng
Copy link
Contributor Author

See mongosh.log

@winterqt
Copy link
Member

winterqt commented Dec 2, 2022

It's an npm thing, sigh (ref).

For now, you can patch out this dependency, and try again.

I need to mull over how to properly fix this, but patching that out should get it working with no effects to the behavior of the package in the end.

Let me know if anything else comes up -- happy to help.

@aaronjheng
Copy link
Contributor Author

Thanks for the help. I tried, but not working.

@winterqt
Copy link
Member

winterqt commented Dec 2, 2022

Okay, proper fix it is then 😅

Should have something to test later today.

@winterqt
Copy link
Member

winterqt commented Dec 9, 2022

Hi! Apologies for taking so long to get back to you on this.

The fix for this issue is #204877, but notice that it's not really... a fix. The reality is that this situation is very annoying to deal with, and it doesn't seem like this is common enough within the packages we ship (at least, not yet...) to come up with a convoluted solution, when, like in this case, workarounds exist.

Patching out electron-notarize and mongodb-js-precommit should do the trick, presumably without leading to anything breaking.

@aaronjheng
Copy link
Contributor Author

I appreciate your help very much. After patching out electron-notarize and mongodb-js-precommit, there are still some other problems that need to be investigated. Right now, I don't want to push forward. I will try to build mongosh with buildNpmPackage again in the future.

@aaronjheng aaronjheng closed this Dec 10, 2022
@aaronjheng aaronjheng mentioned this pull request Sep 5, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants