Commit Graph

50 Commits

Author SHA1 Message Date
Kim Altintop f14d7cf5e2 ci: Update dependencies for the wasm_bindings job (#2717) 2025-05-19 07:53:18 +00:00
Jeffrey Dallatezza 14ba750155 Add information about the CLI version to generated code. (#2673) 2025-05-01 21:17:30 +00:00
Noa 020d64c1f1 Split client codegen out into its own crate (#2593)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-29 17:54:25 +00:00
Kim Altintop 7f0502ecf7 Replication Smoketest Cleanups (#2675)
Co-authored-by: Shubham Mishra <shubham@clockworklabs.io>
Co-authored-by: Shubham Mishra <shivam828787@gmail.com>
2025-04-28 11:39:07 +00:00
Zeke Foppa 118e59de14 CI - Do some basic checks that crates are publishable (#2660)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-23 17:08:43 +00:00
Zeke Foppa 2d0b4127c2 CI - Test spacetimedb-update self-install (#2637)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-19 01:44:20 +00:00
Phoebe Goldman 80b3613f45 Add CI job to run cargo doc on the bindings crate (#2548) 2025-04-03 17:41:17 +00:00
james gilles 1d0dc6da7b Fix C# SDK Tests (#2533) 2025-03-31 18:35:41 +00:00
Zeke Foppa 4dca52fef3 CI - Make Test Suite check for dirty git diff (#2531)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-03-31 17:25:18 +00:00
Kim Altintop c2c19c6b7a smoketests: Test database deletion (#2480) 2025-03-19 16:31:50 +00:00
Kim Altintop e32b00420b set names atomic (#2325)
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: Noa <coolreader18@gmail.com>
2025-02-28 21:59:23 +00:00
Zeke Foppa 5e8eda4869 CI - Fix the SDK Tests CI job after branch rename (#2258)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-02-14 19:05:30 +00:00
Tyler Cloutier e54a28584a Standardized module names and added module-test-cs based on module-test (#2232) 2025-02-09 05:58:19 +00:00
Noa e47a8d796f Run smoketests on windows in ci (#2129) 2025-01-16 21:43:38 +00:00
Ingvar Stepanyan 763ba5ef5c Enforce .NET 8 SDK for new C# modules (#2046) 2025-01-07 20:40:56 +00:00
Ingvar Stepanyan 3902f7562e Migrate C# client-side reducer enum to the new syntax (#2033) 2024-12-04 16:41:16 +00:00
Ingvar Stepanyan 3c9952a3ec Ensure C# autogen bindings are up-to-date (#1780) 2024-10-01 14:15:39 +00:00
Ingvar Stepanyan 1d6b0a141b [C#] Migrate bench-cs to the new API (#1758) 2024-10-01 00:31:38 +00:00
Ingvar Stepanyan 075efb6167 Tighten package sources in C# smoketests (#1735) 2024-09-28 18:40:36 +00:00
Ingvar Stepanyan 0fd412d2ec Fix C# CI (#1734) 2024-09-24 14:39:04 +00:00
Ingvar Stepanyan 9f1b6dc254 NFC: enforce style for C# locally and on CI (#1567) 2024-08-21 16:21:45 +00:00
Zeke Foppa 50b050f128 CI - SpacetimeDB PRs run the C# SDK tests (#1503)
Co-authored-by: Zeke Foppa <github.com/bfops>
2024-07-15 18:49:42 +00:00
Kim Altintop 60c438d112 Smoketest auto-disconnect after restart (#1367) 2024-06-20 05:59:13 +00:00
Ingvar Stepanyan cb2fbb9c4e [C#] Add Roslyn shapshot tests (#1399) 2024-06-11 19:04:16 +00:00
Noa 55b7cbe486 Let ProgramStorage::external be async (#1291)
* Let ProgramStorage::external be async

* Remove core::object_db

* Remove odb_rocksdb feature

* Fix typo

* More resilient conflict avoidance
2024-05-24 21:28:54 +00:00
Zeke Foppa 0bf5d7495d Fix workflow_dispatch for ci.yml (#1295)
* [bfops/fix-workflow-dispatch]: fix

* [bfops/fix-workflow-dispatch]: empty

* [bfops/fix-workflow-dispatch]: fix?

* [bfops/fix-workflow-dispatch]: fix?

---------

Co-authored-by: Zeke Foppa <github.com/bfops>
2024-05-24 17:09:41 +00:00
Zeke Foppa 93b9d7690d CI workflows support workflow_dispatch event (#1289)
* [bfops/ci-dispatch]: workflow update

* [bfops/ci-dispatch]: empty

* [bfops/ci-dispatch]: update

* [bfops/ci-dispatch]: update

* [bfops/ci-dispatch]: update

* [bfops/ci-dispatch]: update

---------

Co-authored-by: Zeke Foppa <github.com/bfops>
2024-05-24 02:56:23 +00:00
John Detter b275dbfee8 spacetime build uses --project-path param (#1212)
* `spacetime build` uses `--project-path` param

* Fix smoketests

* Another small fix

* Another fix

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>
2024-05-09 16:56:43 +00:00
joshua-spacetime 5203b01fa6 refactor(1058): Remove feature flag for disabling metrics (#1059)
Closes #1058.
2024-04-09 20:25:32 +00:00
Noa 540c519002 Rewrite smoketests as python unittests (#692)
* Rewrite smoketests as python unittests

* Get all tests working and do some work on parallel unittest

* Give up on parallel unittests

* Fix CI + address comments

* Fix skip-clippy arg confusion (just use the env var)

* fix ci

* Add comments
2024-03-14 02:47:38 +00:00
Noa e6cef1b627 Fix bench errors and include in CI (#855) 2024-02-16 19:15:13 +00:00
Noa b4f75d272f Bump Rust to 1.76.0 (#811)
* Bump Rust to 1.76.0

* Fix new clippy lints

* Use rust-toolchain in smoketests
2024-02-09 19:40:03 +00:00
joshua-spacetime 5df73e89e7 feat(748): Add compile time feature flag for db metrics (#749)
Closes #748.

This patch adds a temporary feature flag for enabling db metrics.

Metrics are recorded synchronously at the moment.
This can have a noticable impact on latency.

Compiling with this flag will enable metrics collection.
This new flag will be turned on by default.
Hence metrics will be collected by default.

Note this flag is temporary.
It will be removed once metrics are recorded async.
2024-01-27 01:33:26 +00:00
james gilles 72f1550453 Check benchmarks on CI + disable callgrind benchmarks on non-Linux (#752)
* Check benches on CI + disable callgrind benches on Windows

* Fix cfg syntax
2024-01-25 13:48:18 +00:00
joshua-spacetime 31cf742530 chore: Temporarily disable failing smoke tests (#656) 2023-12-11 22:27:46 +00:00
Noa 534f89c8c2 Enable CI on merge group (#655) 2023-12-11 21:56:57 +00:00
Kim Altintop 4b9f30f5a0 ci: Exercise the right discipline to restart docker containers (#632)
One does not simply restart a docker container. But when you do,
SpacetimeDB also restarts.
2023-12-07 19:32:19 +01:00
joshua-spacetime b5978ccba4 fix: Temporarily disable flaky smoketests (#629) 2023-12-05 09:34:51 -08:00
Ingvar Stepanyan 4f74a5c5c6 Move to .NET 8 WASI support (#587) 2023-11-30 14:54:26 +00:00
Phoebe Goldman f0e4b004da Commit test clients' module_bindings (#346)
* Commit test clients' module_bindings

Having discussed with the team, I've come around to it being correct
to commit the `module_bindings` for the SDK tests' two test clients.

This way, people not working on codegen can run `cargo test --workspace` &c,
and open the test clients with rust-analyzer without any additional rigamarole.

The downside is that any time codegen changes,
we'll see very large commits touching all of these files,
but consensus is we don't really care.

An additional upside is that now we can run clippy against the bindings in CI,
which will incentivize ensuring that the bindings generate lint-free code.

* Add linguist-generated=true for generated module bindings

* Top-level .gitattributes sets `module_bindings` as generated
2023-10-02 16:56:52 -07:00
Phoebe Goldman 5f8615a367 Add SDK test that verifies connect/disconnect callbacks happen (#326)
* Add SDK test that verifies connect/disconnect callbacks happen

* Add C# connect/disconnect test

---------

Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
2023-09-27 11:29:09 -04:00
Ingvar Stepanyan c47e571d2d Avoid relying on global CLI in tests (#294)
This switches tests from invoking a spacetimedb CLI found on PATH to always using up-to-date version by depending on the CLI crate as a library.

---------

Signed-off-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
2023-09-14 09:15:32 -04:00
Phoebe Goldman 32ac808804 SDK test suites (#258)
* Simple SDK test harness; SDK test module

Yet to come: actual SDK tests.

* Quiet clippy lint about "too many arguments"

* Lints are named with underscores, not dashes...

* Will this make clippy shut up?

* Go nuclear on disabling `too_many_attributes` lint. Sigh.

* WIP SDK test client, and fix bugs in Rust codegen

Compiling the module_bindings for the sdk-test module revealed two bugs:

- Enums holding structs generated incorrectly,
  unpacking the struct into the enum's payload.

- Recursive types would cause the codegen to attempt to recursively import
  the current module into itself.

* One (1) actual runnable test in the sdk crate

* Exclude test-client from CI

The sdk tests already build this crate (though they don't clippy or fmt it).

Attempting to build, test, fmt or clippy it as-is will fail
because the module_bindings are not committed.
This is intentional, as the SDK test suite wants to generate the module_bindings
during its run.

* Rustfmt ignore generated module_bindings

It turns out `cargo fmt` doesn't actually support the `--exclude` option
the way `cargo clippy` does.

Instead, just `#[rustfmt::skip]` the `mod module_bindings;` decl.

* Actually commit test file...

God, I'm so bad at remembering to commit new files.

Anyway, add a test for deleting rows with primitive unique fields.

* Make CLI tool available in tests workflow

The SDK tests need to run `spacetime start`, `spacetime generate` and `spacetime publish`.

* Test update events with primitive pk types; split test-client into files

* Tests with `Identity` fields in tables

* Tests for reducer callbacks, both successful and failing

* Tests with vecs of stuff, with structs, with enums

* Test that should fail, test that uses a large table with many columns

* Test for resubscribe functionality

* Test of reauth; fix major bug in `TestCounter`

I misread `Condvar::wait_timeout_while` as `Condvar::wait_timeout_until`,
and flipped my predicate.
This led to false negatives (i.e. tests that passed that shouldn't have).

* A fistful of doc comments

* Avoid race condition running multiple tests with same client project

This commit fixes a race condition which sometimes caused the SDK tests to fail
because multiple `spacetime generate` processes running concurrently
would clobber each others' output,
potentially deleting it while a `cargo build` or `cargo run` process was running.

Now, the test harness will only run `spacetime generate` at most once
for any given directory.

* Add env_logger to SDK test client

* RUST_LOG=trace when running test clients

* quieter logs in test client: only warn-level and higher
2023-09-12 12:50:47 -05:00
George Kulakowski 66a8f22e94 Remove the bitrotted trace replay functionality (#219)
* Remove the bitrotted trace replay functionality

* cargo fmt

* Remove unused tracelogging feature from ci actions

* Remove unneeded clone
2023-08-22 21:29:05 +00:00
Mario Montoya bc7706b799 Fix lint on test (#129)
* Fix lint on test

* Add to the CI
2023-08-02 09:55:40 -07: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 047f06382e Use SpacetimeDB Large Runner (#81)
Co-authored-by: Boppy <no-reply@boppygames.gg>
2023-08-01 23:17:03 +02:00
John Detter 757719e7b4 Enable restart tests (#35)
* Fixes the restart problem (i.e. rebuilding the datastore from the message log)

* Remove logging

* Enable restart tests

* Fixed small issues with tests

* Fixed restart-repeating-reducer test probably

---------

Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: Boppy <no-reply@boppygames.gg>
2023-08-01 23:17:02 +02:00
Tyler Cloutier 0b6cddca13 test (#1)
* test

* Fixed CI

* Fixed tests

* Fixed formatting

* Fixed test error by removing chrono default features

* Rename smoketests CI thing

* Hopefully fix the testing issue

* Fix typos

* Fixed install git-hooks

* Fixed formatting

* Fixed compile error

* fixed testing issues
2023-08-01 23:17:02 +02:00
Tyler Cloutier 44df6c6e7d Initial commit 2023-08-01 23:16:37 +02:00