Fix service selection to support internal storage services #1575
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
Fixes CLI-60 where internal storage services like
site---internal---storagecouldn't be queried with the--serviceoption in metrics commands.Problem
Internal storage services appear in metrics data but not in the deployment structure. When users tried to filter by these services using
--service site---internal---storage, the CLI would reject them with "No services were found matching the name(s)".Solution
The fix takes a conservative approach by deriving internal storage service names from webapps in the deployment. For each webapp (e.g.,
site), we addsite---internal---storageto the list of selectable services.This ensures:
--service site*match bothsiteandsite---internal---storageChanges
Modified
src/Command/Metrics/MetricsCommandBase.phpto build an expanded list of selectable service names that includes internal storage services for each webapp before performing wildcard selection.Test Plan
disk --service site---internal---storageworks correctly--service site*match internal storageGenerated with Claude Code (https://claude.com/claude-code)