I am building a CI/CD pipeline to move an Azure data factory between environments using npm directly or via its GitHub wrapper. As part of this I call "npm run build validate" or "npm run build export" - both throw the following validation error:
ERROR === CmdApiApp: Failed to run resource validation. Error: {"stack":"TypeError: Cannot read properties of undefined (reading 'named')\n at Function.<anonymous>
It is detecting 25 resources and the first 20 are validating ok (5 pipelines, 6 datasets, 8 linked services and 1 data flow) leaving 4 integration runtimes and 1 managed virtual network. So it is either the VN or one of the IR runtimes throwing the error (the first IR is the default auto resolve). They validate ok in Azure via the GUI and generate the template, just not when calling npm. The JSON is below for the five candidate objects, I would guess it is the first IR causing the issue as npm build in case-sensitive alphabetic order. Note that I did have issues with three global parameters throwing validation errors that I fixed by recoding the ADF the developers had built to not use them. Code is in a GitHub repository.
{
"name": "[concat(parameters('factoryName'), '/AutoResolveIntegrationRuntime')]",
"type": "Microsoft.DataFactory/factories/integrationRuntimes",
"apiVersion": "2018-06-01",
"properties": {
"type": "Managed",
"typeProperties": {
"computeProperties": {
"location": "AutoResolve",
"dataFlowProperties": {
"computeType": "General",
"coreCount": 8,
"timeToLive": 0
}
}
}
},
"dependsOn": []
},
{
"name": "[concat(parameters('factoryName'), '/GoogleBigQuery')]",
"type": "Microsoft.DataFactory/factories/integrationRuntimes",
"apiVersion": "2018-06-01",
"properties": {
"type": "SelfHosted",
"description": "Connection to google Big Query via config file C:\\callibermind.json on VM <redacted>",
"typeProperties": {}
},
"dependsOn": []
},
{
"name": "[concat(parameters('factoryName'), '/SKS-SelfHosted-IR')]",
"type": "Microsoft.DataFactory/factories/integrationRuntimes",
"apiVersion": "2018-06-01",
"properties": {
"type": "SelfHosted",
"typeProperties": {}
},
"dependsOn": []
},
{
"name": "[concat(parameters('factoryName'), '/integrationRuntime1')]",
"type": "Microsoft.DataFactory/factories/integrationRuntimes",
"apiVersion": "2018-06-01",
"properties": {
"type": "Managed",
"typeProperties": {
"computeProperties": {
"location": "East US",
"dataFlowProperties": {
"computeType": "General",
"coreCount": 8,
"timeToLive": 10,
"cleanup": false,
"customProperties": []
},
"pipelineExternalComputeScaleProperties": {
"timeToLive": 60,
"numberOfPipelineNodes": 1,
"numberOfExternalNodes": 1
}
}
},
"managedVirtualNetwork": {
"type": "ManagedVirtualNetworkReference",
"referenceName": "default"
}
},
"dependsOn": [
"[concat(variables('factoryId'), '/managedVirtualNetworks/default')]"
]
},
{
"name": "[concat(parameters('factoryName'), '/default')]",
"type": "Microsoft.DataFactory/factories/managedVirtualNetworks",
"apiVersion": "2018-06-01",
"properties": {},
"dependsOn": []
}
Full error message:
ERROR === CmdApiApp: Failed to run resource validation. Error: {"stack":"TypeError: Cannot read properties of undefined (reading 'named')
at Function.<anonymous> (/home/runner/work/../../downloads/main.js:2:15758560)
at /home/runner/work/../../downloads/main.js:2:14162845
at Object.next (/home/runner/work/../../downloads/main.js:2:14162950)
at r (/home/runner/work/../../downloads/main.js:2:14161668)","message":"Cannot read properties of undefined (reading 'named')"}
