Add uses to extension ServiceConfig#8838
Conversation
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
uses to extension ServiceConfig
There was a problem hiding this comment.
Pull request overview
This PR expands the azdext.ServiceConfig model exposed to extensions to include the uses dependency list, and wires it through the core↔extension mapping layer so extensions can read service/resource dependencies directly from the config model.
Changes:
- Added
repeated string uses = 13;to theServiceConfigprotobuf model and regenerated the Go bindings. - Mapped
Usesin both directions betweenproject.ServiceConfigandazdext.ServiceConfig. - Extended mapper tests to assert
Usesin forward and round-trip conversions.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/grpc/proto/models.proto | Adds ServiceConfig.uses to the wire model (field 13) for extension-facing config. |
| cli/azd/pkg/azdext/models.pb.go | Regenerated protobuf bindings to surface Uses []string in azdext.ServiceConfig. |
| cli/azd/pkg/project/mapper_registry.go | Maps Uses through the project↔azdext conversions in both directions. |
| cli/azd/pkg/project/mapper_registry_test.go | Adds assertions covering Uses in forward mapping and round-trip mapping tests. |
Review details
Files not reviewed (1)
- cli/azd/pkg/azdext/models.pb.go: Generated file
- Files reviewed: 3/4 changed files
- Comments generated: 1
- Review effort level: Low
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
jongio
left a comment
There was a problem hiding this comment.
Proto field numbering (13 is next free after additional_properties at 12), wire compatibility (additive repeated field, backward safe), mapper completeness (both ServiceConfig-to-proto and proto-to-ServiceConfig directions covered), and test coverage (forward + round-trip) all check out.
Nit (non-blocking): The PR description still states "The out-of-date scaffolding template copy is left untouched" but the first file in the diff updates exactly that template (correctly, after the inline reviewer flagged it). Worth refreshing the description so it doesn't contradict the actual diff.
Fixes #8834
The azdext
ServiceConfigexposed to extensions omitted theuses(service/resource dependencies) property, forcing extensions to set it out-of-band viaSetServiceConfigValue— easy to miss depending on how a service is manipulated.Changes
repeated string uses = 13;to theServiceConfigmessage ingrpc/proto/models.proto; regeneratepkg/azdext/models.pb.go.Usesin both directions inpkg/project/mapper_registry.go(ServiceConfig↔azdext.ServiceConfig).Usesin the forward-mapping and round-trip cases inmapper_registry_test.go.Extensions can now read dependencies directly:
Notes
extensions/microsoft.azd.extensions/.../proto/models.proto) is left untouched — it already lacksdocker/config/additional_properties, so it is not the source of truth here and patching onlyuseswould be inconsistent.