refactor: own the azure.ai.connection service block in azure.yaml - #9864
refactor: own the azure.ai.connection service block in azure.yaml#9864JerryYang (JerryYangKai) wants to merge 4 commits into
Conversation
|
Azure Pipelines: Successfully started running 5 pipeline(s). 17 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.
🟡 Changes recommended
Deployment can target the wrong selected environment and rejects previously supported connection authentication types.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Moves split Foundry Connection lifecycle ownership from provisioning to the Connections extension.
Changes:
- Deploys
azure.ai.connectionservices through the Connections extension. - Preserves legacy bundled and ejected-infrastructure compatibility paths.
- Updates dependency guidance, documentation, and tests.
File summaries
| File | Description |
|---|---|
azure.ai.toolboxes/README.md |
Documents ownership interactions. |
azure.ai.projects/README.md |
Clarifies provisioning responsibility. |
azure.ai.projects/internal/synthesis/synthesizer.go |
Excludes split connections from generated infrastructure. |
azure.ai.projects/internal/synthesis/synthesizer_test.go |
Tests exclusion and legacy behavior. |
azure.ai.projects/internal/provisioning/foundry_provisioning_provider.go |
Configures synthesis ownership mode. |
azure.ai.projects/internal/provisioning/foundry_provisioning_provider_test.go |
Updates provider expectations. |
azure.ai.projects/internal/provisioning/foundry_provisioning_provider_resolveenv_test.go |
Removes obsolete connection-resolution coverage. |
azure.ai.connections/README.md |
Documents declarative connection services. |
azure.ai.connections/internal/cmd/service_target.go |
Implements connection deployment. |
azure.ai.connections/internal/cmd/service_target_test.go |
Tests service-target parsing and upsert behavior. |
azure.ai.connections/internal/cmd/connection.go |
Supports silent service-target creation. |
azure.ai.agents/README.md |
Updates connection deployment guidance. |
azure.ai.agents/internal/synthesis/synthesizer.go |
Mirrors synthesis ownership changes. |
azure.ai.agents/internal/project/foundry_dependencies.go |
Treats connections as deploy dependencies. |
azure.ai.agents/internal/project/foundry_dependencies_test.go |
Updates dependency validation coverage. |
azure.ai.agents/internal/cmd/resource_services.go |
Restricts collection to legacy connections. |
azure.ai.agents/internal/cmd/resource_services_test.go |
Updates legacy collection tests. |
azure.ai.agents/internal/cmd/pending_provision.go |
Removes connection provisioning state. |
azure.ai.agents/internal/cmd/pending_provision_test.go |
Removes obsolete state tests. |
azure.ai.agents/internal/cmd/nextstep/resolver.go |
Updates post-init guidance. |
azure.ai.agents/internal/cmd/nextstep/resolver_test.go |
Removes obsolete provisioning expectation. |
azure.ai.agents/internal/cmd/listen.go |
Uses legacy-only connection collection. |
azure.ai.agents/internal/cmd/init.go |
Stops recording pending connection provisioning. |
Review details
- Files reviewed: 23/23 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Connection names, $ref configurations, and targeted agent deploy dependency checks currently regress.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
cli/azd/extensions/azure.ai.connections/README.md:13
- This example uses tabs for YAML indentation, which YAML parsers reject. Replace them with spaces so the documented block can be copied into
azure.yaml.
search:
- Files reviewed: 30/30 changed files
- Comments generated: 3
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Deploy-time ownership currently breaks referenced configurations, process-environment fallback, generated connection names, and targeted dependency readiness.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (2)
cli/azd/extensions/azure.ai.connections/internal/cmd/service_target.go:351
- This parser does not resolve service-level
$refentries. Core forwards unknown service properties unchanged, so{ "$ref": "./connection.yaml" }unmarshals into an emptyDefinitionand Deploy attempts an upsert with empty category/target. The previous synthesis path explicitly supported these refs, andresource_services_test.go:308-366still contains that configuration shape. Resolve and shallow-merge the referenced file before decoding.
func parseConnectionServiceConfig(serviceConfig *azdext.ServiceConfig) (*definition.Definition, error) {
props := serviceConfig.GetAdditionalProperties()
if props == nil || len(props.GetFields()) == 0 {
props = serviceConfig.GetConfig()
}
cli/azd/extensions/azure.ai.agents/internal/project/foundry_dependencies.go:354
- A Connection dependency is now always considered ready, but
usesonly orders services present in the current graph.azd deploy <agent>filters the graph to that single service (pkg/project/importer.go:116-133), so the Connection target does not run; removing the readiness check lets the Agent deploy against a connection that may not exist. Keep a persisted/resource readiness check, or include dependencies in targeted deploys before treating this as unconditionally ready.
func validateFoundryConnectionDependency(_ *azdext.ServiceConfig, _ map[string]string) string {
// The uses graph runs the Connection service target before its dependent
// Agent. A failed or disabled Connection prevents the Agent deploy step, so
// no environment readiness marker is required here.
- Files reviewed: 31/31 changed files
- Comments generated: 2
- Review effort level: Balanced
azure.ai.toolboxes PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9864/azure-ai-toolboxes.zip"
|
azure.ai.connections PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9864/azure-ai-connections.zip"
|
azure.ai.projects PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9864/azure-ai-projects.zip"
|
azure.ai.agents PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9864/azure-ai-agents.zip"
|
No description provided.