Azure / Azure/azure-cli

az pipelines run should return the pipeline validation error

オープン
#27,653 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
act-platform-engineering-squad Auto-Assign Auto-Resolve customer-reported DevOps Pipelines Service Attention
主要言語
Python
スター
4.6k
フォーク
3.5k
平均マージ
3日 2時間
マージ済み PR(30日)
60

説明

**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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the az pipelines run command in the azure-devops extension and reproduce the reported validation failure, comparing normal output with --debug. Done means the validation detail, including the unexpected parameter and line/column, appears in the main error message.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cli
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。