Azure数据工厂CI NPM验证步骤突然崩溃
我们一直在为Azure数据工厂使用“新” CICD设置,该工厂由文档页面进行: https://learn.microsoft.com/en-us/azure/data-factory/continouul-continouul-integration-delegration-delegration-delivery-improvements 。我们正在使用用YAML编写的Azure DevOps管道来执行此操作。
这对我们来说一直很好,直到今天早上突然开始在验证步骤中崩溃。我们这边没有更改代码。我想知道版本号或不兼容性是否有问题,但我找不到任何问题。
所讨论的Azure YAML代码是:
- task: Npm@1
displayName: 'Validate ADF json'
inputs:
command: 'custom'
workingDir: $(packageJsonFolder)
customCommand: 'run build validate $(Build.Repository.LocalPath)/DataFactories/${{ parameters.folderName }} $(adfAzureResourceId)'
错误消息的完整日志如下:
node /home/vsts/work/1/s/DataFactories/downloads/main.js validate /home/vsts/work/1/s/DataFactories/internaldataload /subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx
/home/vsts/work/1/s/DataFactories/node_modules/@microsoft/azure-data-factory-utilities/lib/bundle.manager.js:53
throw "Execution failed with exit code: " + exitCode;
^
Execution failed with exit code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `node node_modules/@microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vsts/.npm/_logs/2022-06-16T09_04_15_237Z-debug.log
=====ERROR=====
Error: Command failed: node /home/vsts/work/1/s/DataFactories/downloads/main.js validate /home/vsts/work/1/s/DataFactories/internaldataload /subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx
/home/vsts/work/1/s/DataFactories/downloads/main.js:2
(()=>{var e={82257:(e,t,r)=>{e.exports=r(53605)
at Object.94616 (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:4897020)
at r (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:7274976)
at /home/vsts/work/1/s/DataFactories/downloads/main.js:2:7275513
at /home/vsts/work/1/s/DataFactories/downloads/main.js:2:7953499
at Object.<anonymous> (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:7953503)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Execution finished....
Found npm debug log, make sure the path matches with the one in npm's output: /home/vsts/.npm/_logs/2022-06-16T09_04_15_237Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/opt/hostedtoolcache/node/10.24.1/x64/bin/node',
1 verbose cli '/opt/hostedtoolcache/node/10.24.1/x64/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build',
1 verbose cli 'validate',
1 verbose cli '/home/vsts/work/1/s/DataFactories/internaldataload',
1 verbose cli '/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle @~prebuild: @
6 info lifecycle @~build: @
7 verbose lifecycle @~build: unsafe-perm in lifecycle true
8 verbose lifecycle @~build: PATH: /opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/vsts/work/1/s/DataFactories/node_modules/.bin:/opt/hostedtoolcache/node/10.24.1/x64/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/vsts/.local/bin:/opt/pipx_bin:/home/vsts/.cargo/bin:/home/vsts/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/vsts/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle @~build: CWD: /home/vsts/work/1/s/DataFactories
10 silly lifecycle @~build: Args: [ '-c',
10 silly lifecycle 'node node_modules/@microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"' ]
11 silly lifecycle @~build: Returned: code: 1 signal: null
12 info lifecycle @~build: Failed to exec build script
13 verbose stack Error: @ build: `node node_modules/@microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @
15 verbose cwd /home/vsts/work/1/s/DataFactories
16 verbose Linux 5.13.0-1029-azure
17 verbose argv "/opt/hostedtoolcache/node/10.24.1/x64/bin/node" "/opt/hostedtoolcache/node/10.24.1/x64/bin/npm" "run" "build" "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"
18 verbose node v10.24.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error @ build: `node node_modules/@microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
22 error Exit status 1
23 error Failed at the @ build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
##[error]Error: Npm failed with return code: 1
Finishing: Validate ADF json
我们的Package.json文件完全符合文档页面。
{
"scripts":{
"build":"node node_modules/@microsoft/azure-data-factory-utilities/lib/index"
},
"dependencies":{
"@microsoft/azure-data-factory-utilities":"^0.1.5"
}
}
有什么想法我们能做什么?
We've been using the "new" CICD setup for Azure Data Factory as descibed by the documentation page: https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-delivery-improvements. We're doing this using Azure DevOps pipelines written in YAML.
This has been working quite well for us, until it suddenly started crashing at the validation step this morning. No code has been changed on our side. I'm wondering if there's some issue with version number or incompatability but I can't find anything.
The Azure YAML code in question is this:
- task: Npm@1
displayName: 'Validate ADF json'
inputs:
command: 'custom'
workingDir: $(packageJsonFolder)
customCommand: 'run build validate $(Build.Repository.LocalPath)/DataFactories/${{ parameters.folderName }} $(adfAzureResourceId)'
The full log of error messages is as following:
node /home/vsts/work/1/s/DataFactories/downloads/main.js validate /home/vsts/work/1/s/DataFactories/internaldataload /subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx
/home/vsts/work/1/s/DataFactories/node_modules/@microsoft/azure-data-factory-utilities/lib/bundle.manager.js:53
throw "Execution failed with exit code: " + exitCode;
^
Execution failed with exit code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `node node_modules/@microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vsts/.npm/_logs/2022-06-16T09_04_15_237Z-debug.log
=====ERROR=====
Error: Command failed: node /home/vsts/work/1/s/DataFactories/downloads/main.js validate /home/vsts/work/1/s/DataFactories/internaldataload /subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx
/home/vsts/work/1/s/DataFactories/downloads/main.js:2
(()=>{var e={82257:(e,t,r)=>{e.exports=r(53605)
at Object.94616 (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:4897020)
at r (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:7274976)
at /home/vsts/work/1/s/DataFactories/downloads/main.js:2:7275513
at /home/vsts/work/1/s/DataFactories/downloads/main.js:2:7953499
at Object.<anonymous> (/home/vsts/work/1/s/DataFactories/downloads/main.js:2:7953503)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Execution finished....
Found npm debug log, make sure the path matches with the one in npm's output: /home/vsts/.npm/_logs/2022-06-16T09_04_15_237Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/opt/hostedtoolcache/node/10.24.1/x64/bin/node',
1 verbose cli '/opt/hostedtoolcache/node/10.24.1/x64/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build',
1 verbose cli 'validate',
1 verbose cli '/home/vsts/work/1/s/DataFactories/internaldataload',
1 verbose cli '/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle @~prebuild: @
6 info lifecycle @~build: @
7 verbose lifecycle @~build: unsafe-perm in lifecycle true
8 verbose lifecycle @~build: PATH: /opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/vsts/work/1/s/DataFactories/node_modules/.bin:/opt/hostedtoolcache/node/10.24.1/x64/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/vsts/.local/bin:/opt/pipx_bin:/home/vsts/.cargo/bin:/home/vsts/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/vsts/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle @~build: CWD: /home/vsts/work/1/s/DataFactories
10 silly lifecycle @~build: Args: [ '-c',
10 silly lifecycle 'node node_modules/@microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"' ]
11 silly lifecycle @~build: Returned: code: 1 signal: null
12 info lifecycle @~build: Failed to exec build script
13 verbose stack Error: @ build: `node node_modules/@microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/opt/hostedtoolcache/node/10.24.1/x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @
15 verbose cwd /home/vsts/work/1/s/DataFactories
16 verbose Linux 5.13.0-1029-azure
17 verbose argv "/opt/hostedtoolcache/node/10.24.1/x64/bin/node" "/opt/hostedtoolcache/node/10.24.1/x64/bin/npm" "run" "build" "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"
18 verbose node v10.24.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error @ build: `node node_modules/@microsoft/azure-data-factory-utilities/lib/index "validate" "/home/vsts/work/1/s/DataFactories/internaldataload" "/subscriptions/xxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxx/providers/Microsoft.DataFactory/factories/xxxxx"`
22 error Exit status 1
23 error Failed at the @ build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
##[error]Error: Npm failed with return code: 1
Finishing: Validate ADF json
Our package.json file is exactly as from the documentation page.
{
"scripts":{
"build":"node node_modules/@microsoft/azure-data-factory-utilities/lib/index"
},
"dependencies":{
"@microsoft/azure-data-factory-utilities":"^0.1.5"
}
}
Any ideas what we can do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您在2024年阅读本文,则解决方案是将Node.js更新为18
If you are reading this in 2024, the solution is to update node.js to 18
修复了更新“安装node.js”任务以匹配文档的参考:
Fixed after updating the 'Install Node.js' task to match the reference from doc:
更改为节点18后,它将解决。
After changing to Node 18 it is resolved.