dbName was null trying to connect. fixes issue #28424
Current Behavior
If you try to run a 2nd process in parallel you get ...
NX disk I/O error
Error: disk I/O error at /home/ken/dev/animalus/animalus/node_modules/nx/src/utils/db-connection.js:11:93 at getEntryOrSet (/home/ken/dev/animalus/animalus/node_modules/nx/src/utils/db-connection.js:19:17) at getDbConnection (/home/ken/dev/animalus/animalus/node_modules/nx/src/utils/db-connection.js:11:24) at getTaskDetails (/home/ken/dev/animalus/animalus/node_modules/nx/src/hasher/hash-task.js:19:84) at invokeTasksRunner (/home/ken/dev/animalus/animalus/node_modules/nx/src/tasks-runner/run-command.js:367:56) at runCommandForTasks (/home/ken/dev/animalus/animalus/node_modules/nx/src/tasks-runner/run-command.js:117:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /home/ken/dev/animalus/animalus/node_modules/nx/src/tasks-runner/run-command.js:105:29 at async handleErrors (/home/ken/dev/animalus/animalus/node_modules/nx/src/utils/handle-errors.js:9:24) at async runCommand (/home/ken/dev/animalus/animalus/node_modules/nx/src/tasks-runner/run-command.js:104:20)
Expected Behavior
Ability to run a 2nd process in parallel
Related Issue(s)
#28424
Fixes #
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| nx-dev | ⬜️ Ignored (Inspect) | Visit Preview | Oct 17, 2024 11:15pm |
☁️ Nx Cloud Report
CI is running/has finished running commands for commit bb945b5dbed88ed5dc6f8b718a0baea685875f29. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
| 🟥 Failed Commands |
|---|
nx affected --targets=lint,test,build,e2e,e2e-ci --base=21d1696ef5c470d0087a8c3817b0d76f6afa606e --head=c339db0da8dda255bfac3745e7c4ae775ebbc392 --parallel=3 |
✅ Successfully ran 4 targets
nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dtenx-cloud record -- nx format:check --base=21d1696ef5c470d0087a8c3817b0d76f6afa606e --head=c339db0da8dda255bfac3745e7c4ae775ebbc392nx documentation --no-dtenx affected -t e2e-macos-local --parallel=1 --base=21d1696ef5c470d0087a8c3817b0d76f6afa606e --head=c339db0da8dda255bfac3745e7c4ae775ebbc392
Sent with 💌 from NxCloud.
@crowmagnumb Can you try the latest 19.8.6 patch version? It includes a fix for DB connection: https://github.com/nrwl/nx/releases/tag/19.8.5
@crowmagnumb Can you try the latest 19.8.6 patch version? It includes a fix for DB connection: https://github.com/nrwl/nx/releases/tag/19.8.5
Nope. same issue. Had to apply my patch locally to get it to work.
This fixing some of your issues is interesting to me. The connectToNxDb function can handle opts.dbName being null or undefined.
https://github.com/nrwl/nx/blob/25e3bdde9cad46660db160129b02dbd326d1f7da/packages/nx/src/native/db/mod.rs#L18
Assigning default to opts.dbName wouldn't be correct. We'll lose out on the database name being the machine id.
This definitely has me thinking...
Interesting. Well, let me know if I can help you debug in any way.
I have a potential fix thats in #28544, and I have it published here:
0.0.0-pr-28544-c9de3c0 can you try updating to that and see if the issue is still reproducible for you?
Sorry, as I just posted in #28424 I was not explicitly installing nx version 19.8.6 just the @nx/XXX modules. This led to nx version 20.0.2 being installed and with that I was getting this error. Now that I am also explicitly installing nx version 19.8.6 it works fine. Sorry for the confusion. I'm curious why the matching nx is not auto-installed but not going to worry about that. :) So I'm going to close this.
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.