4 Commits

Author SHA1 Message Date
Phoebe Goldman a1e9984840 Multiple server configurations for CLI (#214)
Alters the CLI's configuration format to support storing multiple server configurations,
and having each server configuration store an (optional) default identity.
Many CLI commands take an additional -s argument, the server on which to operate,
which defaults to the configured default_server.
Using -s consistently requires renaming the publish skip-clippy short flag to -S.

Per discussion with @jdetter , this PR does not directly associate identities with servers.
Instead, each server configuration stores the server's "fingerprint" (i.e. PEM-formatted ECDSA public key),
and the CLI uses that public key to decode tokens to determine if they apply to a given server.
This architecture allows the CLI to behave reasonably
when multiple server configurations use the same set of tokens,
e.g. if multiple distinct URLs resolve to the same SpacetimeDB instance.
For example, one could imagine a configuration with server configurations for both http://127.0.0.1:3000
and http://localhost:3000, which should use the same set of identities.
2023-09-01 17:29:20 +00:00
John Detter 0b0c533830 Smoketests run in parallel (#49)
* Working on improving commands that use identities

* Fix lints

* Reverted file that shouldn't have changed

* Found and fixed all other todos

* Addressed more CLI TODOs

* Fixes for formatting issues

* Set names of identities

* Set name of identities + clippy

* Small fix

* Added the start of a doc comment, switching over to another PR

* Fixed tests that needed to be updated

* Addressed more feedback and fixed several clippy issues

* Small fix

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>

* Added more doc comments

* Addressing more feedback

* Fixed really old bug in SpacetimeDB

* Tests to verify new functionality

* Fix clippy lints

* Email during identity creation is optional

* Some work

* Getting smoketests working on mac

* All tests are passing except known failing tests

* Working on parallel smoketests

* Fixed some bugs in saving configs that was preventing this from working

* Fixes required for parallel tests

* Tests are working in parallel

* Pruned changes

* retab

* re-retab

* retab the lib file

* Cargo profile for building more quickly

* I have to rebase on another PR

* smoketest fixes

* create_project and reset_project are now the same thing, removed
create_project

* More fixes

* Removed print statement

* Small fix

* Another fix

* Tons of improvements to the smoketests

* Have to rebase on master

* Small fixes

* More progress

* Finally working correctly!

* Apparently we're missing this

* Enable command output

* Listing installed targets

* Clean before building

* What is going on

* Something super wonky going on

* Another test

* Skip building containers for now

* Small fix

* Test using cargo instead

* Changed workflow a bit

* CI is stuck

* Small fix

* Another fix

* Try cargo run instead of building spacetime CLI

* Removed workflow step

* Fixing all of the tests

* Identity test

* Tests should finally be working

* Enable debug

* Remove spacetime from path

* Another try

* Logic fix

* Another fix

* Another fix

* Working now?

* Another fix

* Finally working again

* Adding github containers back in

* CI fix

* Use SpacetimeDB Large Runner

* Updated test to get more output

* Changed 0ms to 10ms to improve parallel test stability

* Removed unused logs

Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>

* Removed unnecessary reset_project

* Removed reset_config where its not needed

* Reset template

---------

Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Boppy <no-reply@boppygames.gg>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
2023-08-01 23:17:03 +02:00
John Detter d8c8a2e931 Smoketests work on macos (#15)
* Some work

* Getting smoketests working on mac

* All tests are passing except known failing tests

---------

Co-authored-by: Boppy <no-reply@boppygames.gg>
2023-08-01 23:17:02 +02:00
Tyler Cloutier 44df6c6e7d Initial commit 2023-08-01 23:16:37 +02:00