fix: only clear the requested resource type

Running `resource:limit-clear` or `resource:reserve-clear` without `--process-type` deleted every resource property for the app, so clearing limits also removed reservations and vice versa. Both commands now clear only their own resource type across all process types.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-10-22 18:58:23 -04:00
1 parent 898924e541
commit 97dd080441
6 files changed
+154 -14

No files matched your search

+2 -2
View File
@@ -19,10 +19,10 @@ Additional commands:`
helpContent = `
resource:limit [--process-type <process-type>] [RESOURCE_OPTS...] <app>, Limit resources for a given app/process-type combination
resource:limit-clear [--process-type <process-type>] <app>, Limit resources for a given app/process-type combination
resource:limit-clear [--process-type <process-type>] <app>, Clear resource limits for a given app/process-type combination
resource:report [<app>] [<flag>], Displays a resource report for one or more apps
resource:reserve [--process-type <process-type>] [RESOURCE_OPTS...] <app>, Reserve resources for a given app/process-type combination
resource:reserve-clear [--process-type <process-type>] <app>, Reserve resources for a given app/process-type combination`
resource:reserve-clear [--process-type <process-type>] <app>, Clear resource reservations for a given app/process-type combination`
)
func main() {