feat(config): add config command to show resolved per-service configuration#512
Open
jongio wants to merge 1 commit into
Open
feat(config): add config command to show resolved per-service configuration#512jongio wants to merge 1 commit into
jongio wants to merge 1 commit into
Conversation
…ration Add `azd app config` to print the configuration azd app resolves from azure.yaml for each service: host, effective type (explicit or inferred), language, project, command, image, ports, uses, and which optional blocks are configured. Supports an optional service-name argument and --output json. Closes #507 Co-authored-by: Copilot App <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds
azd app config, a read-only command that prints the configuration azd app resolves from azure.yaml for each service. It gives you one place to confirm what the tool sees before you start anything.For every service it shows the host, the effective service type (marked
explicitwhen set in azure.yaml orinferredwhen derived from the service shape), language, project path, run command, image, ports, and dependencies (uses). It also lists which optional blocks are configured on the service:docker,healthcheck,restart,resources,logs,local, andazure.Run it with no arguments to print every service, or pass a service name to print just that one.
--output jsonemits an object keyed by service name.Example
Details
Service.GetServiceType()resolver, so the output matches how the rest of the tool interprets the service.env.selectServiceConfigs, kept separate from I/O so it is covered by unit tests without touching the working directory.Testing
go build ./...go vet ./src/cmd/app/commands/...go test ./src/cmd/app/commands/ -run "TestBuildServiceConfig|TestConfiguredBlocks|TestSelectServiceConfigs|TestServiceConfigJSONShape" -count=1golangci-lint run ./src/cmd/app/commands/...Closes #507