temporalio / temporalio/cli

[Bug] List/Get API keys have different outputs

Open Beginner friendly
#1,200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
379
Forks
103
Avg merge
2d 11h
Merged PRs (30d)
23

Description

What are you really trying to do?

I want to find service account API keys that are expiring soon so that I can automate notifying the owner.

Describe the bug

The json output of:
temporal cloud apikey list -o json

contains snakecase and numerical values for ownerType e.g.
"owner_type": 2

The plain command:
temporal cloud apikey list

produces readable values e.g. SERVICE_ACCOUNT

the get command temporal cloud apikey get --key-id <some-value> -o json produces a different value again:
"ownerType": "OWNER_TYPE_SERVICE_ACCOUNT"

Minimal Reproduction

temporal cloud apikey list
then
temporal cloud apikey list -o json

Environment/Versions

temporal version 1.8.2 (Server 1.31.2, UI 2.50.1)
cloud version 0.1.0

Additional context

I think ideally it should SERVICE_ACCOUNT in all cases.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the temporal cloud apikey list and temporal cloud apikey get --key-id <some-value> command entry points, comparing their plain and JSON output paths. Reproduce the mismatch with the commands in the issue, then verify that ownerType consistently renders as SERVICE_ACCOUNT for list and get outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.