← Back to issue list

Investigate why `list-keys` makes repeated API calls

View original Github issue

Metadata

Project
snapcraft
Number
#5683
Type
issue
State
open
Author
mr-cal
Labels
Status: Triaged Type: Research
Created
Updated
Closed
—

Current evaluation

Repeated API calls affected the legacy `list-keys` command; it is now removed, and its `keys` replacement makes one local key lookup and one account-info request.

Suggested action: close resolved

Reason: Commit 30c9fcd19 (#6144) migrated the command to `keys`; the resulting implementation invokes `_get_usable_keys()` once and `get_account_info()` once. The old `list-keys` path now only raises a removed-command error, so the reported repeated requests are no longer reachable through that command.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 12 Complexity: 35 Confidence: 90 Actionability: 60

Issue body

### What needs to get done See if we can reduce the number of API calls in `snapcraft list-keys`. ### Why it needs to get done `snapcraft list-keys` makes repeated API calls to list keys, which can be seen in the unit tests [here](https://github.com/canonical/snapcraft/blob/d5ddb55443782ef571ec97a53b92f8d58b3eac74/tests/legacy/unit/commands/test_list_keys.py#L29).

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 12
Complexity: 35
Confidence: 90
Actionability: 60
close resolved Repeated API calls affected the legacy `list-keys` command; it is now removed, and its `keys` replacement makes one local key lookup and one account-info request.
qwen/qwen3.6-35b-a3b
Impact: 10
Quick Win: 8
Complexity: 10
Confidence: 95
Actionability: 90
close resolved The `list-keys` command has been removed and replaced with `keys`. The issue references a command that no longer exists in the codebase.
qwen/qwen3.8-27b
Impact: 15
Quick Win: 11
Staleness: 85
Complexity: 25
Confidence: 82
Support Request: 5
close stale Research task to reduce repeated API calls in snapcraft list-keys. The command was removed and replaced with 'keys' (PR #6144), which uses a single get_account_info() call. The referenced legacy test file no longer exists. No activity in ~13 months.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 40
Confidence: 75
Support Request: 10
close stale Investigate reducing repeated API calls in `snapcraft list-keys` command. Issue is triaged, labeled as research, and has been inactive for over a year with no technical discussion or assignee.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 75
Support Request: 5
keep open Investigate and reduce repeated API calls in the snapcraft list-keys command. The task is triaged but has been inactive for over a year with no assignee or progress.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#6144 (confidence 90%)

    Commit 30c9fcd19 migrated the keys command; the current implementation performs one local lookup and one Store account request, while `list-keys` is only a removed-command alias.

Related issues

No related issues found above the similarity threshold.