Failure to open cache hash makes task to exit with non 0 exit code (to fail) #6974
Labels
blocked: retry with latest
Retry with latest release or head.
outdated
scope: core
core nx functionality
type: bug
Current Behavior
Unknown to me I sometimes get a operation not permitted to open the cache hash. We use a different cacheDirectory by using a custom tasksRunnerOptions to put the cache's in a separate folder that is shared between builds. This could be similar to #6957 in that you could use a try catch to not return a non 0 exit code.
Expected Behavior
We had not seen this before migrating to Azure DevOps but we don't think that is the root cause of the issue.
Steps to Reproduce
Failure Logs
Unexpected error:
Error: EPERM: operation not permitted, open 'C:\PIT\latestOutputsHashes\coverage\apps\chassis-tracker.hash'
at Object.openSync (fs.js:498:3)
at Object.writeFileSync (fs.js:1524:35)
at Object.writeToFile (C:\azagent_work\1\s\altec.voyager.web-ui\node_modules@nrwl\workspace\src\utilities\fileutils.js:13:10)
at C:\azagent_work\1\s\altec.voyager.web-ui\node_modules@nrwl\workspace\src\tasks-runner\cache.js:119:25
at Array.forEach ()
at Cache.recordOutputsHash (C:\azagent_work\1\s\altec.voyager.web-ui\node_modules@nrwl\workspace\src\tasks-runner\cache.js:117:17)
at TaskOrchestrator. (C:\azagent_work\1\s\altec.voyager.web-ui\node_modules@nrwl\workspace\src\tasks-runner\task-orchestrator.js:270:28)
at Generator.next ()
at fulfilled (C:\azagent_work\1\s\altec.voyager.web-ui\node_modules\tslib\tslib.js:114:62)
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
errno: -4048,
syscall: 'open',
code: 'EPERM',
path: 'C:\PIT\latestOutputsHashes\coverage\apps\chassis-tracker.hash'
Environment
Node : 16.6.1
OS : win32 x64
npm : 7.20.1
nx : Not Found
@nrwl/angular : 12.6.2
@nrwl/cli : 12.6.2
@nrwl/cypress : 12.6.2
@nrwl/devkit : 12.6.2
@nrwl/eslint-plugin-nx : 12.6.2
@nrwl/express : Not Found
@nrwl/jest : 12.6.2
@nrwl/linter : 12.6.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.6.2
@nrwl/web : Not Found
@nrwl/workspace : 12.6.2
@nrwl/storybook : 12.6.2
@nrwl/gatsby : Not Found
typescript : 4.3.5
The text was updated successfully, but these errors were encountered: