You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a template consumer, I want to get a clear error message immediately if my system is missing Python (or another required runtime) rather than waiting until hook execution fails deep in the deployment.
For each language hook, check runtime availability via executor's Prepare() dry-run or a lightweight CheckInstalled().
Cache results per language within a single validation pass (don't check Python N times).
Collect all errors — report all missing runtimes at once.
Return empty slice when all runtimes available.
This is soft validation — informational at startup (e.g., during azd init or start of azd provision). The hard error remains in Prepare() at execution time.
Surface via ErrorWithSuggestion with install URLs from ExternalTool.InstallUrl().
Runtime Validation in HooksManager
Part of #7435 — Multi-Language Hook Support
User Story
As a template consumer, I want to get a clear error message immediately if my system is missing Python (or another required runtime) rather than waiting until hook execution fails deep in the deployment.
Solution Approach
Modify
pkg/ext/hooks_manager.go:ValidateLanguageRuntimes(ctx context.Context, hooks map[string][]*HookConfig) []error:Prepare()dry-run or a lightweightCheckInstalled().azd initor start ofazd provision). The hard error remains inPrepare()at execution time.ErrorWithSuggestionwith install URLs fromExternalTool.InstallUrl().Modify
pkg/ext/hooks_manager_test.go:Files:
pkg/ext/hooks_manager.go(MODIFY),pkg/ext/hooks_manager_test.go(MODIFY)Acceptance Criteria
ValidateLanguageRuntimesreturns errors for each missing runtimeErrorWithSuggestionwith platform-specific install URLsReferences