Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make spacetime list <identity> CLI command also show db_names associated with database #1072

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MichaelNey
Copy link

@MichaelNey MichaelNey commented Apr 10, 2024

Description of Changes

#1046 Mentions a need to see the database name when listing databases for an identity. I agree with this being useful so here is an implementation supporting that. There may be better ways that the StDB team could do this, but here is what I use locally when developing if I want to easily get a database name.

Updated the spacetime list <identity> to also display a db_name column in the response. This db_name column is populated by making a request to the /database/reverse_dns/<db_address> endpoint for each db_address returned for the identity.

API and ABI breaking changes

N/A ?

Expected complexity level and risk

I believe the complexity and risk of this change to be a 1/5.

Testing

I tested this by making multiple databases, then running the spacetime list <identity> command. This should show a response in the CLI as a table with two columns: db_name and db_address. You can verify the db_address' all match the db_names via spacetime profile dashboard, as well as by creating new databases, and renaming databases. After that, the command should reflect new database names correctly, as well as updated database names.

Test 1

  • Create a new identity if you do not already have one
  • Create a new database (or even multiple)
  • Use the spacetime list <identity> command
  • Verify the db_name is present, and that it matches the correct db_address
  • Verify in the SpacetimeDB Profile page or via spacetime dns reverse_lookup <address> command that they match

Test 2

  • Follow test 1 if you do not already have an identity that owns at least one database
  • Use the spacetime list <identity> command
  • Verify the db_name is present, and that it matches the correct db_address
  • Verify in the SpacetimeDB Profile page or via spacetime dns reverse_lookup <address> command that they match
  • Rename the database or add additional dns labels
  • Use the spacetime list <identity> command
  • Verify the db_address matches the new db_name you set for it

image

@MichaelNey MichaelNey changed the title Make spacetime list <identity> CLI command also show db_name associated with database Make spacetime list <identity> CLI command also show db_names associated with database Apr 10, 2024
@MichaelNey
Copy link
Author

Also I agree with BSL and am interested in completing the CLA to enable myself to make contributions that may be used.

@jdetter
Copy link
Collaborator

jdetter commented Apr 25, 2024

Also I agree with BSL and am interested in completing the CLA to enable myself to make contributions that may be used.

Sorry for the late response on this, can you message us through discord to get the process started for this? We can email you the CLA

@jdetter jdetter added the community Used to mark PRs that were authored by the community (people outside of Clockwork Labs) label Apr 25, 2024
@MichaelNey
Copy link
Author

Spoke to TL and signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Used to mark PRs that were authored by the community (people outside of Clockwork Labs) release-1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants