fix(azure.ai.agents): preserve hosted agent deployment error classification - #9491
Open
Hui Miao (huimiu) wants to merge 2 commits into
Open
fix(azure.ai.agents): preserve hosted agent deployment error classification#9491Hui Miao (huimiu) wants to merge 2 commits into
Hui Miao (huimiu) wants to merge 2 commits into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Preserves structured error classification across hosted-agent deployment and container host operations.
Changes:
- Adds Azure and host gRPC error converters.
- Classifies deployment polling failures with remediation guidance.
- Adds regression tests and extension guidance.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
internal/project/service_target_agent.go |
Applies structured errors to package, publish, and deploy flows. |
internal/project/service_target_agent_test.go |
Tests deployment and host service classification. |
internal/exterrors/errors.go |
Adds structured error conversion helpers. |
internal/exterrors/errors_test.go |
Tests Azure and gRPC error preservation. |
AGENTS.md |
Documents the host error helper. |
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
cli/azd/extensions/azure.ai.agents/internal/exterrors/errors.go:168
- [azd-code-reviewer] This check runs too late for authentication failures whose inner cause is an
azcore.ResponseError.AuthenticationFailedErrorimplementsUnwrap, so the response-error branch above matches first and returns a service error, losing the auth category and login guidance. CheckAuthenticationFailedErrorbeforeResponseError, and add a regression test usingazidentity.NewAuthenticationFailedErroraround a response error.
if _, ok := errors.AsType[*azidentity.AuthenticationFailedError](err); ok {
return Auth(CodeAuthFailed, err.Error(), "run `azd auth login` to authenticate")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ImageError,CodeError, andProvisioningErrorwith stable operation-specific service codes and remediation guidance.Scope
This PR intentionally contains only the
azure.ai.agentsextension changes. The separate azd core gRPCServiceErrorDetailtransport change is not included. Without that core change, ordinary container service errors returned over host gRPC may still lack service status/code metadata; auth, actionable, and extension-local classification improvements remain covered here.E2E Test Results
azd package agent --no-promptazd deploy agent --no-promptazd up --no-promptDuring setup, Foundry returned a
CodeErrorfor a missing Python dependency manifest. The CLI preserved the provider classification and remediation guidance; after correcting the fixture, the same deploy command reached active status.