az pipelines run should return the pipeline validation error
- 主要语言
- Python
- 星标
- 4.6k
- 派生
- 3.5k
- 平均合并
- 3 天 10 小时
- 30 天内合并 PR
- 64
描述
**Related command**
az pipelines run
**Is your feature request related to a problem? Please describe.**
Whenever I run a pipeline from the command-line and there is a validation error, I must run with `--debug` in order to see the error in the verbose logging.
**Describe the solution you'd like**
I would like to see the validation error in the main error message.
**Describe alternatives you've considered**
As stated, I currently run `--debug` as a workaround.
**Additional context**
```
az version
{
"azure-cli": "2.52.0",
"azure-cli-core": "2.52.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"azure-devops": "0.25.0",
"resource-graph": "2.1.0",
"virtual-wan": "0.2.14"
}
}
```
Currently the following error is given:
```cli.azure.cli.core.azclierror: Could not queue the build because there were validation errors or warnings.```
In the verbose log I can find the explanation:
```
urllib3.connectionpool: https://redacted.visualstudio.com:443 "POST /myproject/_apis/build/Builds HTTP/1.1" 400 477
azext_devops.devops_sdk.client: Response content: b'{"$id":"1","customProperties":{"ValidationResults":[{"result":"error","message":"/devops/build.yaml (Line: 38, Col: 17): Unexpected parameter \'testFolder\'"}]},"innerException":null,"message":"Could not queue the build because there were validation errors or warnings.","typeName":"Microsoft.TeamFoundation.Build.WebApi.BuildRequestValidationFailedException, Microsoft.TeamFoundation.Build2.WebApi","typeKey":"BuildRequestValidationFailedException","errorCode":0,"eventId":3000}'
```
In this case apparently there was an unexpected parameter `testFolder` on line 38, column 17.
贡献指南
调研方向
从 azure-devops 扩展中的 az pipelines run 命令开始,重现报告的验证失败,并将普通输出与 --debug 进行比较。当验证详细信息(包括意外参数和行/列)出现在主要错误消息中时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100