Errors should be in better format
@jason-dou đang làm issue này rồi.
Từ ngày 28/5/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Is your feature request related to a problem? Please describe.
One of the issues related to this is most likely that Graph resources are not displayed in Azure Deployments as resources. As such we do not have the usual ARM/Bicep errors for resources and that is confusing.
With deployments for Azure resources we can have error like this:
| 13:21:11 - The deployment 'lz-storage-account-240527135pgyh' failed with
| error(s). Showing 3 out of 3 error(s). Status Message: vault container
| already exists and ImmutableStorageWithVersioning property is immutable.
| The container must undergo a migration to support immutable Storage with
| versioning. (Code:ContainerMustUndergoObjectLevelWormMigration) Status
| Message: At least one resource deployment operation failed. Please list
| deployment operations for details. Please see
From Azure deployments (operations) we can extract the same information and structure it like this:
ailed Deployments
--------------------
Id:
Code: DeploymentStackDeploymentFailed
Message: One or more resources could not be deployed. Correlation id: '81299724-a760-4808-b302-4682e76cd461'.
Id: /subscriptions/<sub id>/providers/Microsoft.Resources/deployments/lz-storage-account-240527135pgyh
Code: DeploymentFailed
Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.
Id:
Code: ContainerMustUndergoObjectLevelWormMigration
Message: vault container already exists and ImmutableStorageWithVersioning property is immutable. The container must undergo a migration to support immutable Storage with versioning.
Failed Resources
--------------------
Id: /subscriptions/<sub id>/resourceGroups/lz-storage-account/providers/Microsoft.Storage/storageAccounts/<storage name>/blobServices/default/containers/vault
Code: ContainerMustUndergoObjectLevelWormMigration
Message: vault container already exists and ImmutableStorageWithVersioning property is immutable. The container must undergo a migration to support immutable Storage with versioning.
Such information is even available directly in deployment stacks without needing to query deployment operations to get it.
As you can see this is very clear and well structured information what is failing and for which resource.
With Graph resources we do not have that. We have information like:
11:55:28 - The deployment 'azDeploy-240523115357-lz-ms-graph-test'
| failed with error(s). Showing 3 out of 4 error(s). Status Message:
| {"error":{"code":"BadRequest","target":"/resources/entraGroupRes","message":"AppOnly OBO tokens not supported by target service. Graph client request id: 624c90dc-600f-452a-a21a-4df1a7d2d672. Graph request timestamp: Thu, 23 May 2024 11:54:52 GMT."}} (Code:DeploymentOperationFailed) Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details. (Code: DeploymentFailed) - {"error":{"code":"BadRequest","target":"/resources/entraGroupRes","message":"AppOnly OBO tokens not supported by target service. Graph client request id: 624c90dc-600f-452a-a21a-4df1a7d2d672. Graph request timestamp: Thu, 23 May 2024 11:54:52 GMT."}} (Code:) Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details. (Code: DeploymentFailed) - {"error":{"code":"BadRequest","target":"/resources/entraGroupRes","message":"AppOnly OBO tokens not supported by target service. Graph client request id: 2067aa5d-d196-4bdb-9fc7-db7cdfb0e11a. Graph request timestamp: Thu, 23 May 2024 11:54:52 GMT."}} (Code:) CorrelationId: 6688fdc1-313c-47ee-9582-f0f76ddd7a00
If we look at the name of target resource /resources/entraGroupRes you basically you are missing vital information like:
- what is the type of the resource that is failing
- which is the exact resource failing
Instead we have this name entraGroupRes. This is basically the symbolic name of the resources I have defined in my template. In this case this is the name of multiple resources as entraGroupRes is a loop upon Microsoft.Graph/groups type. Many times the actual deployment is done by engineers who did not code the template, they only provide the configuration for the deployment so they do not know what entraGroupRes represents let alone being able to pin down to the exact resource.
If we take the current Graph error I think it should at the end achieve the same type of functionality in Azure Deployments where the graph resources are present within Deployment/Deployment operations in way that you can achieve something like this
Failed Resources
--------------------
Id: providers/Microsoft.Graph/groups/exampleGroup1
Code: '' // as far as I understand this error does not have code.
Message: AppOnly OBO tokens not supported by target service. Graph client request id: 624c90dc-600f-452a-a21a-4df1a7d2d672. Graph request timestamp: Thu, 23 May 2024 11:54:52 GMT.
Also if multiple resources are failing even if it is with the same error you should be able to list each one of them as separate one.
I think this represents quite improvement and alignment with the existing experience.
Describe the solution you'd like
described
Additional context
n/a
- Ngôn ngữ chính
- TypeScript
- Star
- 81
- Fork
- 15
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoftgraph/msgraph-bicep-types
-
Needs: Attention :wave:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
microsoftgraph/msgraph-bicep-types#324 · 3 bình luận · 1 người được giao ·
-
Docs: Add note about full-name + uniqueName requirement to applications/federatedIdentityCredentialsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
microsoftgraph/msgraph-bicep-types#311 · 3 bình luận ·
-
enhancement new type
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoftgraph/msgraph-bicep-types#304 · 4 bình luận · 2 reaction ·
Tất cả issue của microsoftgraph/msgraph-bicep-types
Issue tương tự
-
e2e-failure ready-to-code
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
redhat-developer/rhdh-plugin-export-overlays#4616 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-handle
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nextlevelbuilder/dewee-web-v2#73 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
PoCInnovation/Distribox#255 ·
Maintainer thường phản hồi trong vòng 1 ngày