Skip to content

v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Jul 10:15
f716668

What's new

  • New astra db data-api [repl|exec] commands! (beta)

    • Use astrapy or astra-db-ts to quickly and easily interact with the Data API, either through an interactive session, or with your own code, using node, python, or ipython under the hood. You can bring your own packages as well!
    • Try it out yourself!:
      • astra db data-api repl (spin up a basic repl)
      • astra db data-api repl --python -c -t (it can prompt for which collections/tables to include)
      • astra db data-api exec my_db -c my_coll -e 'my_coll.insertOne({ name: "Astra" })' -- -p
  • New astra dotenv [write|print] commands to replace astra db create-dotenv! (beta)

    • This aims to make astra dotenv much more practical for actual usage! No more fiddling with your .env files every time you switch databases–you can trust astra to update your existing .env files through binding comments!
    • In your .env file, simply comment your env var with # astra: <ASTRA_ENV_KEY_NAME>. For example:
    • TOKEN=<token> # astra: ASTRA_DB_TOKEN (the comment doesn't need to be inline; it can be before the env var as well)
    • Then, simply run astra dotenv write to update it whenever you need to!
    • This way, you're no longer stuck with astra db create-dotenv's opinionated env var names–but in case you used them, they'll still work without any comments needed if the env var name matches!
      • Just use astra dotenv list-keys to see what options there are
    • Note: astra is very careful not to mess with the rest of your env file, including the formatting (whitespace, quotes, etc.). It'll only touch exactly what you ask it to. However, if you want to stay careful, astra dotenv print can still take -f .env as an argument and print out what the .env file would be with any updates applied
  • Various command improvements:

    • astra db create now gives you a list of regions to select from if you didn't provide one
      • No more needing to run preemptive astra db regions vector calls!
      • Also added -pg/--pcu-group flag
    • astra pcu is now out of beta
      • New astra pcu list-types command added
      • New astra pcu find-association command added
      • astra pcu transfer-association can now autodetect the current PCU group the datacenter is in
    • astra db regions [vector|serverless] now use filter-by-org=enabled by default
      • Use the new -a/--all flag to disable this and go back to the original behavior
    • astra db cqlsh and astra db dsbulk now have much better additional argument passing
      • Additional arguments can be passed to cqlsh/dsbulk verbatim like so:
      • astra db cqlsh repl my_db -- --flag1 --flag2 value
      • A bug with parsing backslashes in astra db cqlsh exec should also be fixed now
    • astra db endpoints improvements
      • Added data-api-client endpoint
      • astra db endpoints is now an alias for endpoints list (similar to commands like astra db and astra config)
      • Added -c/--copy for the various astra db endpoints * commands, similar to astra token -c
    • astra token list improvements
      • Greatly improved performance when there are new (uncached) roles in the orgs you run it against
      • Fixed erroring if role id isn't in expected uuid format
    • astra db resume should be fixed to work with the new server response now
      • It also removes the last reference to the old Stargate APIs from the CLI
    • astra db dsbulk has been updated to use dsbulk v1.11.2 (from v1.11.0)
    • astra config use's autocomplete will no longer suggest default
    • astra setup has a new flow for when you already have an existing config file
      • it'll ask you if you want to "create a new profile", "setup autocomplete" (if not already setup), "view the docs", or "cancel"
    • astra shellenv has some new options
    • Various updated help-text/error messages
  • Misc other improvements:

    • You can now provide an endpoint to refer to any db
      • If the command takes a region, it'll infer the region from the endpoint if you don't provide an explicit region yourself:
      • astra db download-scb https://<id>-us-east1.apps.astra.datastax.com will download us-east1 (unless you use --region)
      • astra db download-scb https://<id>-FAKE.apps.astra.datastax.com will fail (unless you use --region)
    • Tweaked formatting of various "human" outputs
      • Removed explicit indexing in tables, e.g. │ [0] us-east-1 │
      • Removed sorting of a few list fields (e.g. db regions or keyspaces), instead using the server's ordering