microsoft / microsoft/fabric-cli
[FEATURE] delete MPE on workspace when `--force` is set
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 173
- Forks
- 63
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
Use Case / Problem
This was previously listed as a bug, however after feedback this instead should be a feature.
Currently when a workspace contains a Managed Private Endpoint (MPE) it will prevent the workspace from being deleted even when --force is set. This is inline with the current Fabric Portal:
As the user is passing --force and thus wants to delete the workspace with all of its contents IMO it makes sense to delete the workspace regardless of MPEs being active on the workspace.
Proposed Solution
When --force is applied, first check whether there are any MPEs active. If yes, delete them and then proceed to delete the workspace. The output of the CLI would then give something like this:
$ fab rm ws1.Workspace -f
This will delete 0 underlying items
! Executing force delete
Deleting 'mpe1.ManagedPrivateEndpoint'...
* 'mpe1.ManagedPrivateEndpoint' deleted
! Executing force delete
Deleting 'ws1.Workspace'...
* 'ws1.Workspace' deleted
Alternatives Considered
Alternatives currently is to first list MPEs of a workspace, iteratively delete those and only then delete the workspace. This feels like a lot of extra steps.
Impact Assessment
- This would help me personally
- This would help my team/organization
- This would help the broader fabric-cli community
- This aligns with Microsoft Fabric roadmap items
Implementation Attestation
- I understand this feature should maintain backward compatibility with existing commands
- I confirm this feature request does not introduce performance regressions for existing workflows
- I acknowledge that new features must follow fabric-cli's established patterns and conventions
Implementation Notes
Logic could be something like this, of course open for discussion :)
if force_delete:
managed_private_endpoints = utils_mem_store.get_managed_private_endpoints_for_workspace(workspace)
for managed_private_endpoint in managed_private_endpoints:
args_ = deepcopy(args)
args_.id = managed_private_endpoint.id
args_.name = managed_private_endpoint.name
if managedprivateendpoint_api.delete_managed_private_endpoint(args_, force_delete):
utils_mem_store.delete_managed_identity_from_cache(managed_private_endpoint)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the workspace force-delete command and the existing managed private endpoint deletion flow. Read the proposed utils_mem_store and managedprivateendpoint_api entry points, then follow established force-delete output and cache-cleanup patterns. Done means --force removes the workspace's MPEs before deleting the workspace while preserving existing behavior for other workflows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100