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
Prototype a provider-independent input-provider protocol for the Invisible Azure work. Core describes a missing input; installed extensions contribute options, recommendations, rationales, and optional required sets; core validates and selects a value or prompts.
Add a native beta-only InputService.Stream, authenticated capability registration, and Go SDK helpers WithBetaInputProvider / InputsBeta(). Stable v1 and legacy routes remain unchanged.
Union suggestions, intersect required sets and native constraints, and merge provenance. Automatically select a sole valid option or unique recommendation; otherwise prompt, or report a required selection under --no-prompt.
Resolve missing environment names and infrastructure locations through existing core consumers without adding template syntax. Keep explicit values, existing environments, parameter values, and native defaults ahead of recommendations.
Activate listeners lazily for input requests across commands, share startup with normal extension middleware, and clean up at the parent command boundary.
Extend the demo extension to offer names and locations and attribute automatic choices to their source extensions.
Document the protocol, selection policy, beta status, and initial scope; add unit and command integration coverage.
Initial scope
This iteration supports core-defined, immediate string inputs only. Runtime input definitions, resource creation, generated infrastructure, deferred fulfillment, and authored azure.yaml input declarations are not implemented. Required sets apply during missing-input resolution, not as global policy over explicit or persisted values.
Validation already completed locally
Affected-package tests covering commands, middleware, gRPC, SDK, environment management, input selection, provisioning, extensions, and the demo.
Full ./cmd and ./cmd/middleware short suites after command-wide activation changes.
Focused race checks for input-provider commands and middleware.
Go lint, spelling, and git diff --check.
Protobuf generation, lint, stable-to-beta compatibility, and historical breaking checks.
Offline smoke tests with the locally built and installed demo, including template-based azd init.
No Azure resources were deployed. Full repository preflight and live provisioning have not been run.
Review follow-ups
Preserve inactive initialization: skip provider-only binding discovery without providers or with an existing location; inspect Terraform references without evaluating substitutions.
Fail explicitly for input-provider startup failures and disconnected providers; retain best-effort startup for unrelated listeners and cover real startup failures.
Add process-environment precedence/conflict regressions for initialization and provisioning, including explicit flags and dotenv precedence.
Clarify the existing azd env new exception and provide consumer-specific remediation: this command does not consume AZURE_ENV_NAME.
The first Copilot review also prompted existing-name collision filtering, safe stream re-registration, shared Bicep location-constraint resolution, batched and strict provider quota validation, and removal of the unreleased singular response field. The affected-package short suites, focused race checks, lint, spelling, and protobuf compatibility checks pass after these fixes.
Local extension user-contract inspection: complete (6 files inspected; no new or removed command, positional parameter, flag, or YAML schema component). Capability values and runtime behavior are outside that structural pass.
Add a native beta input protocol, option and constraint coordination, command-wide lazy activation, environment and location consumers, and a demo provider with documentation and tests.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a1605b8-7261-40f0-bffe-d92985ee7682
Azure Pipelines:
27 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.
Prototypes beta input providers within azd’s extension framework, letting extensions suggest missing environment names and infrastructure locations while core validates and selects values.
Changes:
Adds the beta input stream, capability authorization, and Go SDK helpers without changing stable or legacy routes.
Integrates option selection and lazy listener activation with environment creation, Bicep, and Terraform.
Adds a demo provider, regression coverage, and protocol documentation.
Extension user-contract review: blocked on unavailable review history. All 6 changed extension files were inspected; no structural contract changes or new contract comments were identified. Existing-thread counts remain unverified.
File
Description
docs/reference/feature-status.md
Records beta input-provider status and host requirements.
docs/guides/creating-an-extension.md
Introduces input-provider authoring guidance.
docs/architecture/extension-framework.md
Adds the input capability and coordination model.
cli/azd/test/mocks/mockinputs/resolver.go
Provides resolver mocks for consumer tests.
cli/azd/pkg/prompt/input.go
Validates suggested locations against subscription locations.
cli/azd/pkg/inputs/inputs.go
Combines constraints and selects or prompts for values.
cli/azd/pkg/inputs/inputs_test.go
Covers combination, validation, and selection behavior.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved input-provider issues can abort commands that need no input, cause refresh timeouts through duplicate activation, and persist locations that violate template constraints.
Reuse the existing listener when the activator starts the demo first
cli/azd/cmd/middleware/input_providers.go:87
ExtensionActivator can already have started the demo for a provisioning layer before azd env refresh requests a missing native location. This path launches it again; its one-shot readiness signal was consumed by the first activation, so the second startup times out and refresh fails. Reuse shared listener/server ownership with ExtensionActivator and cover the activator-first path.
Enforce template constraints before saving provider-selected values
In .bicepparam mode, this selects and saves a provider location without the bound parameter's allowed-value, length, or quota constraints. With a template allowing only westus3, the demo can persist its eastus2 recommendation even though it also offers a valid alternative. Apply the template constraints before selecting and saving a provider value, or retain the existing fallback until those constraints are available.
Report ambiguous no-prompt inputs in the missing-input guidance
For an unmapped location with ambiguous provider options under --no-prompt, this returns a PromptRequiredError with no source explaining how to supply the value. It exits before buildMissingInputsError, losing the infra.parameters.<name> guidance and the other missing parameters. Treat this no-prompt ambiguity as unresolved so the caller includes the group in its normal missing-input report.
Update BetaInputHandler documentation to use the response type
This still describes the removed singular-value shape. BetaInputHandler (pkg/azdext/input_provider.go:22) returns (*v1beta.ResolveInputResponse, error), which matches the WithBetaInputProvider row above (line 697) and the framework guide. An SDK user following this paragraph would write a handler that doesn't compile.
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
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
Prototype a provider-independent input-provider protocol for the Invisible Azure work. Core describes a missing input; installed extensions contribute options, recommendations, rationales, and optional required sets; core validates and selects a value or prompts.
InputService.Stream, authenticated capability registration, and Go SDK helpersWithBetaInputProvider/InputsBeta(). Stable v1 and legacy routes remain unchanged.--no-prompt.Initial scope
This iteration supports core-defined, immediate string inputs only. Runtime input definitions, resource creation, generated infrastructure, deferred fulfillment, and authored
azure.yamlinput declarations are not implemented. Required sets apply during missing-input resolution, not as global policy over explicit or persisted values.Validation already completed locally
./cmdand./cmd/middlewareshort suites after command-wide activation changes.git diff --check.azd init.No Azure resources were deployed. Full repository preflight and live provisioning have not been run.
Review follow-ups
azd env newexception and provide consumer-specific remediation: this command does not consumeAZURE_ENV_NAME.The first Copilot review also prompted existing-name collision filtering, safe stream re-registration, shared Bicep location-constraint resolution, batched and strict provider quota validation, and removal of the unreleased singular response field. The affected-package short suites, focused race checks, lint, spelling, and protobuf compatibility checks pass after these fixes.
Local extension user-contract inspection: complete (6 files inspected; no new or removed command, positional parameter, flag, or YAML schema component). Capability values and runtime behavior are outside that structural pass.