-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
I was deploying following content:
pipeline:
// code available by requesttrigger:
{
"name": "trigger",
"properties": {
"annotations": [],
"runtimeState": "Started",
"pipelines": [
{
"pipelineReference": {
"referenceName": "pipeline",
"type": "PipelineReference"
},
"parameters": {
"filePath": "@triggerBody().folderPath",
"fileName": "@triggerBody().fileName"
}
}
],
"type": "BlobEventsTrigger",
"typeProperties": {
"blobPathBeginsWith": "redacted",
"blobPathEndsWith": "redacted.xlsx",
"ignoreEmptyBlobs": true,
"scope": "/subscriptions/redacted/resourceGroups/redacted-storage-dev-rg/providers/Microsoft.Storage/storageAccounts/redacted",
"events": [
"Microsoft.Storage.BlobCreated"
]
}
}
}parameter file:
# trigger
trigger,trigger,typeProperties.scope, "xx"
trigger,trigger,+pipelines[0].parameters.refreshDataset, "true"
trigger,trigger,-pipelines[0].parameters.fileName
Trigger parameters did not update according to my parameters.
With dry-run result are following:
$adf = publish-AdfV2FromJson -RootFolder "." -ResourceGroupName tekdata-datafactory-prod-rg -DataFactoryName tekdata-datafactory-prod-df -Location westeurope -Stage ./parameters-prod.csv -Option $opt -DryRun
($adf.Triggers | Where-Object {$_.Name -eq "trigger"}).Body.properties | ConvertTo-Json -Depth 99results:
{
"annotations": [],
"runtimeState": "Started",
"pipelines": [
{
"pipelineReference": {
"referenceName": "pipeline",
"type": "PipelineReference"
},
"parameters": {
"filePath": "@triggerBody().folderPath",
"fileName": "@triggerBody().fileName"
}
}
],
"type": "BlobEventsTrigger",
"typeProperties": {
"blobPathBeginsWith": "redacted",
"blobPathEndsWith": "redacted.xlsx",
"ignoreEmptyBlobs": true,
"scope": "xx",
"events": [
"Microsoft.Storage.BlobCreated"
]
},
"pipelines[0]": {
"parameters": {
"refreshDataset": "true"
}
}
}From result we can see that indexing notation was not resolved, instead [0] is being used as part of $root on
| $obj | Add-Member -NotePropertyName $root -NotePropertyValue $value |
Remove-ObjectProperty have similar issue. Update-ObjectProperty works because of the Invoke-Expressions usage.
Expected behaviour
Indexing notation on parameter file paths should work.
I could not see any mentions about this kind of limitation on documentation.
Version of PowerShell module of:
- 1.11.2
- Code analysis from master branch
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request