oxidecomputer / oxidecomputer/omicron

`omdb db inventory collections show` fails unhelpfully when collection is missing

Open
#8,336 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Good for new hires
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

root@oxz_switch0:~# omdb db inventory collections show 7dc6f0da-020a-43e5-a7ff-2ea02f14354f
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS server for subnet fd00:1122:3344::/48
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd00:1122:3344:109::3]:32221,[fd00:1122:3344:105::3]:32221,[fd00:1122:3344:10b::3]:32221,[fd00:1122:3344:107::3]:32221,[fd00:1122:3344:108::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (150.0.0)
Error: fetching collection 7dc6f0da-020a-43e5-a7ff-2ea02f14354f

Caused by:
    Internal Error: failed runtime check: "collections.len() == 1"

It should report a more explicit message.

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 by reproducing omdb db inventory collections show 7dc6f0da-020a-43e5-a7ff-2ea02f14354f and trace the collection-fetching path to the collections.len() == 1 runtime check. Done means a missing collection produces an explicit user-facing error instead of the internal runtime-check failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, rust
Domain
cli, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.