Description
azd ai agent init --image <prebuilt-image> should generate a unified azure.yaml agent service that carries the pre-built container image on the service-level image: field.
Instead, the generated project omitted services.<agent>.image, so azd deploy treated the service as a normal Docker build and attempted to build/publish a container from src/<agent>/Dockerfile.
Repro
azd ai agent init --no-prompt \
--agent-name my-agent \
--image myacr.azurecr.io/agents/my-agent:v1
rg "image:" azure.yaml src/my-agent/agent.yaml || true
azd deploy --no-prompt
Expected
azure.yaml contains the pre-built image at the service level:
services:
my-agent:
host: azure.ai.agent
image: myacr.azurecr.io/agents/my-agent:v1
azd deploy should use the pre-built image path and skip Dockerfile build/package/publish.
Actual
azure.yaml has no service-level image: field. Deploy falls through to Docker build and fails when no Dockerfile exists, for example:
container publish failed: rpc error: code = Unknown desc = remote build failed: open .../src/<agent>/Dockerfile: no such file or directory
Notes
This is a regression in the not-yet-shipped --image flow after the unified azure.yaml agent definition work. The extension needs to write the pre-built image to ServiceConfig.Image, and core must preserve non-empty osutil.ExpandableString values when saving azure.yaml.
Description
azd ai agent init --image <prebuilt-image>should generate a unifiedazure.yamlagent service that carries the pre-built container image on the service-levelimage:field.Instead, the generated project omitted
services.<agent>.image, soazd deploytreated the service as a normal Docker build and attempted to build/publish a container fromsrc/<agent>/Dockerfile.Repro
Expected
azure.yamlcontains the pre-built image at the service level:azd deployshould use the pre-built image path and skip Dockerfile build/package/publish.Actual
azure.yamlhas no service-levelimage:field. Deploy falls through to Docker build and fails when no Dockerfile exists, for example:Notes
This is a regression in the not-yet-shipped
--imageflow after the unifiedazure.yamlagent definition work. The extension needs to write the pre-built image toServiceConfig.Image, and core must preserve non-emptyosutil.ExpandableStringvalues when savingazure.yaml.