Reputation: 1711
Very simple issue. I am trying to set up a pipeline that has a variable of type bool. As soon as I add it, the pipeline fails with:
{
"code":"BadRequest",
"message":"Invalid value for property 'type'",
"target":"pipeline/pipeline2/runid/66b9c7be-9894-494a-abd9-34fd92bbd972",
"details":null,
"error":null
}
simple pipeline with a string variable and a wait activity succeeds.
{
"name": "pipeline2",
"properties": {
"activities": [
{
"name": "Wait1",
"type": "Wait",
"typeProperties": {
"waitTimeInSeconds": 1
}
}
],
"variables": {
"Test": {
"type": "String",
"defaultValue": "\"Hello\""
}
}
}
}
When I add a bool and nothing else, it fails to debug.
{
"name": "pipeline2",
"properties": {
"activities": [
{
"name": "Wait1",
"type": "Wait",
"typeProperties": {
"waitTimeInSeconds": 1
}
}
],
"variables": {
"Test": {
"type": "String",
"defaultValue": "\"Hello\""
},
"TestBool": {
"type": "Bool",
"defaultValue": false
}
}
}
}
Any clue how to get this to work? I am trying to use this variable as a condition for an Until loop.
Many thanks.
Upvotes: 1
Views: 6606
Reputation: 1711
ok, I experimented.
If I go into the code and set the type as boolean rather than Bool, then the above pipeline runs.
Looks like a UI bug in the designer that sets the type to Bool. I'll file a bug report. Mark.
Update ok it runs but I can't set a default value (it disappears) and anything that references the value causes an Internal Server Error (presumably because it is null which is invalid for a Boolean). Definitely something for the engineers to look at.
Update 2 It appears you can set the variable with SetVariable without error but it appears not to do anything. The value is always true in my test case.
Update 3 Microsoft has a fix coming next week.
Upvotes: 4