Skip to content

CLI function invoke doesn't resolve short IDs to full UUIDs #457

@poyrazK

Description

@poyrazK

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

  • Small
  • Medium
  • Large

Severity

  • Low
  • Medium
  • High
  • Critical

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions