Skip to content

Commit

Permalink
omdb: add --include-deleted switch to omdb db commands
Browse files Browse the repository at this point in the history
Several `omdb db` commands directly query CRDB and need to decide whether to
filter out soft-deleted objects from their queries. Make this configurable on
the command line and default to hiding deleted objects. This markedly improves
the UX of `omdb db instances`, which previously included all deleted instances
by default. This doesn't apply in cases where it's important always to
include or exclude soft-deleted objects, e.g. when trying to reason about the
graph of references between regions, volumes, and snapshots in response to a
`validate` subcommand.

Also clean up a couple of callers of `check_limit` who weren't actually setting
a LIMIT clause in their queries. (The check is harmless in this case but will
print a spurious warning if the query returns exactly the right number of rows.)

Tested by running `omdb db` commands on the dogfood rack.
  • Loading branch information
gjcolombo committed Jan 9, 2024
1 parent 1666711 commit 3f3b7c6
Showing 1 changed file with 108 additions and 73 deletions.
Loading

0 comments on commit 3f3b7c6

Please sign in to comment.