feat(run): add --except to run every service but the named ones#513
Open
jongio wants to merge 1 commit into
Open
feat(run): add --except to run every service but the named ones#513jongio wants to merge 1 commit into
jongio wants to merge 1 commit into
Conversation
Add a `--except` flag to `azd app run` as the complement of `--service`. It starts every service except the comma-separated names given. The two flags are mutually exclusive, and an unknown excluded name fails with the list of available services so a typo does not silently run more than intended. Closes #508 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Website Preview Your PR preview is ready! 📎 Preview URL: https://jongio.github.io/azd-app/pr/513/ This preview will be automatically cleaned up when the PR is closed. |
Contributor
🚀 Test This PRA preview build ( 🌐 Website PreviewLive Preview: https://jongio.github.io/azd-app/pr/513/ One-Line Install (Recommended)PowerShell (Windows): iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.ps1) } -PrNumber 513 -Version 0.19.5-pr513"Bash (macOS/Linux): curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.sh | bash -s 513 0.19.5-pr513UninstallWhen you're done testing: PowerShell (Windows): iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.ps1) } -PrNumber 513"Bash (macOS/Linux): curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.sh | bash -s 513Build Info:
What to Test: |
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
--excepttoazd app runso you can start every service and skip only the one(s) you name. It is the complement to--service: one names what runs, the other names what to leave out.This is handy when a project has one heavy or noisy service you do not want locally (a background worker, a scheduled job) but you still want everything else, without having to spell out the full list in
--service.Behavior
--serviceand--exceptare mutually exclusive. Passing both returns a clear error instead of guessing.--exceptfails with the list of available services, so a typo does not silently start more than you intended.--servicebehavior is unchanged.Details
selectRunServices/excludeServices, kept separate from the run flow so it is unit tested without spinning anything up.runWithServices, before any dependency or trust work, so it fails fast.--exceptgets service-name shell completion, same as--service.Testing
go build ./...go vet ./src/cmd/app/commands/...go test ./src/cmd/app/commands/ -count=1 -shortgolangci-lint run ./src/cmd/app/commands/...Closes #508