Skip to content

Show database names in spacetime list#4769

Open
clockwork-labs-bot wants to merge 2 commits intomasterfrom
bot/list-database-names
Open

Show database names in spacetime list#4769
clockwork-labs-bot wants to merge 2 commits intomasterfrom
bot/list-database-names

Conversation

@clockwork-labs-bot
Copy link
Copy Markdown
Collaborator

Summary

  • add a db_names column to spacetime list
  • keep the database identity column too
  • use reverse-DNS lookups to show all known names for each database
  • degrade gracefully if a reverse lookup fails instead of failing the whole command

Closes #1046.

Notes

I looked at #1072 for prior art. This version is adapted to the current spacetime list implementation and uses the existing util::spacetime_reverse_dns helper rather than calling the endpoint directly.

If a database has no names, the command prints (unnamed).
If a reverse-DNS lookup fails, the command prints (lookup failed) for that row and warns on stderr.

Testing

  • cargo check -p spacetimedb-cli

config: &Config,
server: Option<&str>,
identities: Vec<IdentityRow>,
) -> Vec<DatabaseRow> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should just return a Vec<String> of names for a single identity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: List existing databases

2 participants