Commit Graph

59 Commits

Author SHA1 Message Date
Tyler Cloutier 58d299ea42 Removed @clockworklabs/typescript-sdk in favor of spacetimedb (#3262)
# Description of Changes

This PR removes the `@clockworklabs/typescript-sdk` from the repository
and retains only `spacetimedb` in the `crates/bindings-typescript`
directory. Some files are migrated to `spacetimedb`. I have also updated
the appropriate READMEs.

In addition I have symlinked the old `sdks/typescript` directory to
point to `crates/bindings-typescript`.

# API and ABI breaking changes

This is not technically a breaking change of any kind, although it does
orphan and deprecate the
[@clockworklabs/spacetimedb-sdk](https://www.npmjs.com/package/@clockworklabs/spacetimedb-sdk)
npm package. This package will no longer work with SpacetimeDB.

Users should now install and use the `spacetimedb` package.

# Expected complexity level and risk

2, it's a straightforward change but affects many files.

# Testing

- [ ] I ran `pnpm test` in the `spacetimedb` package
- [ ] I ran the quickstart app

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-23 00:25:24 +00:00
Jason Larabie 26e99fe5e5 Added the Unreal SDK work for codegen, testing, and the plugin (#3223)
# Description of Changes

Closes #3219 
This adds the Unreal SDK, the new Unreal test cases, updates the test
runner to handle Unreal, codegen updates for Unreal, and a QuickStart
Chat.

# API and ABI breaking changes

No breaking changes.

# Expected complexity level and risk

2 - This impacts the subcommand generate.rs to include unrealcpp and
crates/testing to expand for Unreal

# Testing

- [x] Run the new Unreal tests 
- [x] Run any previous automation testing - with all the changes to
generate/testing I'm uncertain if there is an impact
- [x] Review the new CLI generate documentation changes

---------

Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2025-09-19 22:52:53 +00:00
Mario Montoya 8adef2b93b Support for the PG wire protocol (#2702)
# Description of Changes

Closes
[#2686](https://github.com/clockworklabs/SpacetimeDB/issues/2686).

Add support for listening using the [PG wire
protocol](https://www.postgresql.org/docs/current/protocol.html) so `pg`
clients could be used against the database.

# API and ABI breaking changes

The output of `duration` is changed to `rfc3339`, instead of the way is
made with `sats` because is what is done in `pg`, see note below.

# Expected complexity level and risk

2

~~There is open questions that are in the [ticket
#2686](https://github.com/clockworklabs/SpacetimeDB/issues/2686). Also
the crate used here require `RustTls`, so it could be good idea to
decide if~~:

* ~~Rewrite a big chunk of code to use `OpenSSL`~~
* ~~Move to `RustTls`
https://github.com/clockworklabs/SpacetimeDB/pull/1700~~
* ~~Pay for the extra compilation cost~~.

I open another port(`5433`) to listen for `pg` connections using `ssl`.
Need to be decided if this is the way or instead try to multi-plex the
current port for both protocols.

# Testing

Only manual testing so far. Solving the above questions allow me to
implement some unit tests. Also, not yet integrated into cloud for the
same reasons.

- [x] Adding some test for the binary encoding of special and primitive
types
- [x] Smoke test using `psql` that connect to the db instance and run
some queries
- [x] Manually inspect using a UI database explorer how infer the types,
some of this tools generate special widgets when displaying `json,
duration, etc`

---------

Co-authored-by: Noa <coolreader18@gmail.com>
2025-09-10 19:58:03 +00:00
Tyler Cloutier 413c8cbf3c Unifies TypeScript packages and command names (#3195)
# Description of Changes

This PR:
 - standardizes the prettier config across all TypeScript projects
 - adds a root level package.json
 - standardizes all `pnpm` commands to be the same
 - updates documentation accordingly
- adds some additional typescript testing for serialization and
deserialization
 
**IMPORTANT!** Once this PR merges we will need to change the
`compile-and-test` required check to `build-and-test`

# API and ABI breaking changes

No breaking changes.

# Expected complexity level and risk

2 - It in principle doesn't change any code, but could affect deploy
processes.

# Testing

- [x] Just the automated testing that we had previously
- [x] I added additional automated tests

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-04 02:23:29 +00:00
Zeke Foppa 726345206f CI - License checks (#3197)
# Description of Changes

- Checks that all `LICENSE`/`LICENSE.txt` files are symlinks to
something in `licenses/`
- Checks that all license symlinks are valid
- Adds Tyler as a codeowner for `LICENSE`

# API and ABI breaking changes

None.

# Expected complexity level and risk

2

# Testing

- [x] new CI fails on this PR (because
https://github.com/clockworklabs/SpacetimeDB/pull/3193 isn't merged yet)
- [x] new CI passes on a test PR with
https://github.com/clockworklabs/SpacetimeDB/pull/3193 merged in
(https://github.com/clockworklabs/SpacetimeDB/pull/3198)

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-03 19:55:41 +00:00
Zeke Foppa f664a63891 CI - Make new CI checks run in merge queue (#3016)
# Description of Changes

A few of our new CI checks weren't set up to run in the merge queue,
which prevented PRs from merging when those checks were marked required.

# API and ABI breaking changes

None. CI only change.

# Expected complexity level and risk

1

# Testing

This will have to be tested by making these checks required again, and
then seeing if this PR can merge.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-01 18:36:11 +00:00
Kim Altintop 6b9b0e3b81 smoketests: Fix server restarts and make more robust (#2977) 2025-07-23 15:29:43 +00:00
Kim Altintop 6979df59f6 ci: Temporarily disable zz_docker tests (#2974) 2025-07-22 18:24:29 +00:00
Zeke Foppa ccc4d06ddb Update GitHub files for C#/Unity SDK (#2952)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-07-21 14:44:47 +00:00
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