Conversation
There was a problem hiding this comment.
Pull request overview
Improves azd’s user guidance when Docker isn’t available by suggesting remoteBuild: true (where supported) instead of presenting a dead-end “install Docker” failure.
Changes:
- Added a catch-all
error_suggestions.yamlrule forMissingToolErrorsmentioningremoteBuild: trueand providing Docker install/docs links. - Enhanced
EnsureServiceTargetTools()to return a service-awareErrorWithSuggestionwhen Docker is missing and affected services are Container Apps/AKS and not already usingremoteBuild. - Added unit tests for the new
suggestRemoteBuild()helper (multiple services, filters, remoteBuild already enabled, non-container targets, .NET dotnet-publish path).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cli/azd/resources/error_suggestions.yaml |
Adds a MissingToolErrors→Docker rule to suggest remote build + reference links. |
cli/azd/pkg/project/project_manager.go |
Wraps Docker MissingToolErrors with a targeted ErrorWithSuggestion listing applicable services. |
cli/azd/pkg/project/project_manager_test.go |
Adds unit tests validating suggestRemoteBuild() behavior across 9 scenarios. |
7bc4f9d to
a9273fb
Compare
cd3cc66 to
5ce5427
Compare
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
When Docker is not installed or not running, azd now suggests 'remoteBuild: true' as an alternative for services that support it (Container Apps, AKS). This addresses 2,936 Docker.missing failures and 4,655 Docker.failed errors per 28 days. Two-layer approach: 1. error_suggestions.yaml: Added catch-all rule matching MissingToolErrors with 'Docker' pattern, suggesting remoteBuild with install links. Covers all error paths as a safety net. 2. EnsureServiceTargetTools: Enhanced with service-aware suggestion. When Docker is missing, inspects which services actually need it (excluding dotnet-publish services that bypass Docker) and returns a targeted ErrorWithSuggestion listing the specific services that can use remoteBuild. Fixes #7240 Fixes #5715 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Per @weikanglim feedback: - Distinguish 'not installed' from 'not running' with different suggestions (start runtime vs install Docker/Podman) - Mention Podman alongside Docker in both Go suggestion and YAML rules - Split YAML rule into two: 'not running' (matched first) and 'not installed' - Add test cases for both scenarios Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tions Per @vhvb1989 feedback: project_manager should not assume which targets support remoteBuild. Instead, check whether the service target's RequiredExternalTools actually listed Docker, which respects custom service targets from extensions. The suggestRemoteBuild helper now takes svcToolInfo (which services needed Docker per their target) instead of checking Host.RequiresContainer(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5ce5427 to
e573d6d
Compare
Add lessons learned from recent PR reviews (#7290, #7251, #7250, #7247, #7236, #7235, #7202, #7039) as agent instructions to prevent recurring review findings. New sections: - Error handling: ErrorWithSuggestion completeness, telemetry service attribution, scope-agnostic messages - Architecture boundaries: pkg/project target-agnostic, extension docs - Output formatting: shell-safe paths, consistent JSON contracts - Path safety: traversal validation, quoted paths in messages - Testing best practices: test actual rules, extract shared helpers, correct env vars, TypeScript patterns, efficient dir checks - CI/GitHub Actions: permissions, PATH handling, artifact downloads, prefer ADO for secrets Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add lessons learned from team and Copilot reviews across PRs #7290, #7251, #7250, #7247, #7236, #7235, #7202, #7039 as agent instructions to prevent recurring review findings. New/expanded sections: - Error handling: ErrorWithSuggestion field completeness, telemetry service attribution, scope-agnostic messages, link/suggestion parity, stale data in polling loops - Architecture boundaries: pkg/project target-agnostic, extension docs separation, env var verification against source code - Output formatting: shell-safe quoted paths, consistent JSON types - Path safety: traversal validation, quoted paths in messages - Code organization: extract shared logic across scopes - Documentation standards: help text consistency, no dead references, PR description accuracy - Testing best practices: test YAML rules e2e, extract shared helpers, correct env vars (AZD_FORCE_TTY, NO_COLOR), TypeScript patterns, reasonable timeouts, cross-platform paths, test new JSON fields - CI / GitHub Actions: permissions blocks, PATH handling, cross-workflow artifacts, prefer ADO for secrets, no placeholder steps Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run azure-dev - cli |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Summary
Fixes #7240, fixes #5715
When Docker is not installed or not running, azd now suggests
remoteBuild: trueas an alternative for services that support it (Container Apps, AKS). This addresses 2,936 Docker.missing + 4,655 Docker.failed = 7,591 failures per 28 days affecting 1,808 users.Approach: Two-layer detection
Layer 1:
error_suggestions.yaml(catch-all safety net)Added a YAML rule matching
MissingToolErrorswithDockerpattern. This covers ALL error paths and provides a generic remoteBuild suggestion with install links. Zero code changes to error paths.Layer 2:
EnsureServiceTargetTools()(service-aware)Enhanced the existing tool check in
project_manager.gowith asuggestRemoteBuild()helper that:.NET services using dotnet publish)ErrorWithSuggestionnaming the specific services that can use remoteBuildUser experience
Before:
After:
Test Coverage (9 cases)