refactor: enhance error handling for container publishing and add tests - #9737
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 20 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
cli/azd/internal/grpcserver/container_service.go:241
- This mapping is bypassed when both the remote build and its local fallback fail.
ContainerHelper.Publishreplaces theRemoteBuildRunErrorwithpublishLocalImage's error (pkg/project/container_helper.go:807-831), so common failures such as an invalid Dockerfile reach this line without anycontainer_publish_acr_run_*code. Preserve the remote-build error in the fallback failure chain and cover that path end to end.
return nil, mapContainerPublishError(err)
|
Azure Pipelines: Successfully started running 1 pipeline(s). 20 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
|
/check-enforcer override |
Summary
This change gives container publishing through Azure Container Registry remote builds status-specific diagnostics for extensions. It keeps the build log and still passes through the original Azure service and cancellation errors.
Problem
Remote build failures were returned as generic errors. Extensions could not tell whether a run failed, hit an error, timed out, or was canceled, which made telemetry and user-facing error handling less precise.
Approach
RemoteBuildRunErrorcarries the ACR run status and build log. The gRPC container service converts known terminal failures into structuredLocalErrorcodes. Azure response errors and context cancellation errors remain unchanged.E2E Validation
azd publishazd deployazd upFixes #9740