cli: introduce metrics command (CRAFT-387)
Metadata
Current evaluation
Merged PR #3560, introducing snapcraft metrics with JSON/table output, required name and format arguments, and optional date ranges.
Resolution: closed resolved
Reason: PR #3560 was approved and merged into master as merge commit 1de3fab6d; its implementation commit is 7b7673f78.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- Add metrics command with:
-- required args for name and format.
-- optional args for start and end dates
-- JSON and table format options
- Update fake terminal fixture to support lines
Future work is still required to re-auth if needed, the user
must relogin to get credentials if they don't already have
the package_metrics ACL token.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3560, introducing snapcraft metrics with JSON/table output, required name and format arguments, and optional date ranges. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3560 as commit 7b7673f, adding a metrics CLI command with required name/format arguments, optional dates, and JSON/table output; auth re-login support remains future work. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged into master, adding a metrics CLI command with required name and format arguments, optional dates, and JSON or table output. Approved by two reviewers, passed CI, and achieved 93.1% coverage. Auth re-login logic remains pending. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master, introducing a CLI metrics command with required name and format arguments, optional date ranges, and JSON or table output. Achieved 93.10% diff coverage. Future token re-authentication handling remains pending. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcore/snapcraft#3559
(confidence 98%)
Added the Store API support used by the metrics CLI.
-
Related To:
snapcore/snapcraft#3558
(confidence 96%)
Introduced the metrics data model used by the command.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3559 store: add API support for metrics (CRAFT-386) | snapcraft | merged | PR #3559 (commit dd4784132, CRAFT-386) merged into master as 7dd2ad206, adding the /dev/api/snaps/metrics endpoint, package_metrics ACL token support and error helpers. | |
| #6207 refactor: migrate metrics command | snapcraft | merged | Merged as commit 98bb42c3b, migrating the metrics command from Snapcraft’s legacy codebase to the new command architecture for SNAPCRAFT-1319. |