Make spacetime list <identity> CLI command also show db_names associated with database
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
Also I agree with BSL and am interested in completing the CLA to enable myself to make contributions that may be used.
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
Spoke to TL and signed the CLA.