Skip to content

feat(remove): add remove command to remove a service from azure.yaml#511

Open
jongio wants to merge 1 commit into
mainfrom
idea/remove-service
Open

feat(remove): add remove command to remove a service from azure.yaml#511
jongio wants to merge 1 commit into
mainfrom
idea/remove-service

Conversation

@jongio

@jongio jongio commented Jul 13, 2026

Copy link
Copy Markdown
Owner

What

Adds azd app remove <service>, the inverse of azd app add. It deletes the named service from the services section of azure.yaml and leaves every other service and top-level key untouched.

Why

add writes a service into azure.yaml but there was no matching command to take one back out. Undoing an add meant hand-editing YAML and finding the right entry. This closes that gap so the add/remove pair is symmetric.

Behavior

  • azd app remove redis deletes the redis entry and preserves the rest of the file
  • Removing a service that is not present fails with a clear error listing the current service names
  • No-op removals leave the file byte-for-byte unchanged
  • Supports the global --output json flag

Tests

Table-driven unit tests cover a successful removal (with sibling and top-level preservation), an unknown service, a missing services section, the not-found message, JSON result shape, and the no-argument error.

Closes #506

Add `azd app remove <service>` as the inverse of `azd app add`. It deletes the
named service from the services section of azure.yaml and preserves every other
service and top-level key. Removing a service that is not present fails and
lists the current service names. Supports the global --output json flag.

Closes #506

Co-authored-by: Copilot App <[email protected]>
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 13, 2026
@jongio jongio self-assigned this Jul 13, 2026
github-actions Bot added a commit that referenced this pull request Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Website Preview

Your PR preview is ready!

📎 Preview URL: https://jongio.github.io/azd-app/pr/511/

This preview will be automatically cleaned up when the PR is closed.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.72%. Comparing base (37e07e7) to head (0109a36).

Files with missing lines Patch % Lines
cli/src/cmd/app/commands/remove.go 42.85% 42 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #511      +/-   ##
==========================================
- Coverage   60.77%   60.72%   -0.06%     
==========================================
  Files         223      224       +1     
  Lines       28527    28611      +84     
==========================================
+ Hits        17337    17373      +36     
- Misses      10010    10052      +42     
- Partials     1180     1186       +6     
Flag Coverage Δ
unittests 60.72% <42.85%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cli/src/cmd/app/commands/remove.go 42.85% <42.85%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Test This PR

A preview build (0.19.5-pr511) is ready for testing!

🌐 Website Preview

Live Preview: https://jongio.github.io/azd-app/pr/511/

One-Line Install (Recommended)

PowerShell (Windows):

iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.ps1) } -PrNumber 511 -Version 0.19.5-pr511"

Bash (macOS/Linux):

curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.sh | bash -s 511 0.19.5-pr511

Uninstall

When you're done testing:

PowerShell (Windows):

iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.ps1) } -PrNumber 511"

Bash (macOS/Linux):

curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.sh | bash -s 511

Build Info:

What to Test:
Please review the PR description and test the changes described there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add azd app remove command to remove a service from azure.yaml

1 participant