Why is this an issue?
The cloud function invoke command's help text says [name/id], implying it accepts both names and IDs. However, short IDs are not resolved and return an error.
What is causing it?
The CLI passes the short ID directly to the API without first resolving it to a full UUID. The API's function lookup rejects non-UUID strings with "invalid function id".
How can it be solved?
Add short ID resolution in the cloud function invoke command handler, similar to how other commands resolve short IDs. Alternatively, update the help text to only show [name] or [id] consistently.
Category
Severity
Steps to reproduce
cloud function invoke 31ed3ec1
# Output: Error: api error: {"error":{"type":"INVALID_INPUT","message":"invalid function id","code":"INVALID_INPUT"}}
cloud function invoke hello-function # name works
# Output: object not found on disk (different error, but name is accepted)
# The help says [name/id] but short IDs are rejected
cloud function invoke --help
# Usage: cloud function invoke [name/id] [flags]
Why is this an issue?
The
cloud function invokecommand's help text says[name/id], implying it accepts both names and IDs. However, short IDs are not resolved and return an error.What is causing it?
The CLI passes the short ID directly to the API without first resolving it to a full UUID. The API's function lookup rejects non-UUID strings with "invalid function id".
How can it be solved?
Add short ID resolution in the
cloud function invokecommand handler, similar to how other commands resolve short IDs. Alternatively, update the help text to only show[name]or[id]consistently.Category
Severity
Steps to reproduce