`sky api cancel <request-id>` cannot cancel another user's request even for admins; `-u` cancels every request
Problem
`sky api cancel ` sends the caller's user hash along with the request id, and the server-side kill skips any request whose `user_id` differs (`sky/server/requests/requests.py`, the user filter in `_kill_requests`). The CLI has no form that combines "this request id" with "any user": `-u/--all-users` sets `request_ids = None` (`sky/client/cli/command.py`, the `api cancel` command), which cancels every request on the server rather than the named one.
Concrete case: a request scheduled by the server itself (`is_skypilot_system=True`, e.g. an internal background task) has the system user as its `user_id`. An admin who runs `sky api cancel ` sees:
``` Cancelling 1 request: ''... No requests need to be cancelled. ```
The SDK can do it: `sdk.api_cancel(request_ids=[], all_users=True)` cancels exactly that request, and the server already preserves the client's user id for admins in that path. Only the CLI lacks the combination.
Proposed fix
Let `sky api cancel -u <request-id ...>` pass `request_ids` together with `all_users=True`, so an admin can cancel one specific request regardless of its owner, while `sky api cancel -u` with no ids keeps today's cancel-everything behaviour.
-Claude
Source: skypilot-org/skypilot