使用布尔变量时ADF V2失败 [英] ADF V2 failure when using bool variable

查看:64
本文介绍了使用布尔变量时ADF V2失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

非常简单的问题.我正在尝试建立一个具有bool类型变量的管道.一旦添加它,管道就会失败,并显示以下信息:

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\""
        }
    }
}
}

当我添加bool时,它无法调试.

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.

推荐答案

好的,我做了实验.

如果我进入代码并将类型设置为boolean而不是Bool,则将运行上述管道.

If I go into the code and set the type as boolean rather than Bool, then the above pipeline runs.

看起来像设计器中的UI错误,该错误将类型设置为Bool.我将提交错误报告. 马克.

Looks like a UI bug in the designer that sets the type to Bool. I'll file a bug report. Mark.

更新,它可以运行,但是我无法设置默认值(它消失了),任何引用该值的内容都会导致内部服务器错误(大概是因为它为null,这对于布尔值无效) ).绝对是工程师需要看的东西.

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.

更新2 似乎可以使用SetVariable设置变量,而不会出现错误,但似乎什么也没做.在我的测试案例中,该值始终为true.

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.

更新3 .Microsoft下周将修复此问题.

Update 3 Microsoft has a fix coming next week.

这篇关于使用布尔变量时ADF V2失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆