Commit Graph

3186 Commits

Author SHA1 Message Date
joshua-spacetime 4c0c7556b0 Add typing context for lowering (#1963) 2024-11-08 17:23:46 +00:00
Zeke Foppa d51b5ac850 Bump version to 1.0.0-rc2 (#1962)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-11-08 17:06:30 +00:00
Mario Montoya 17423a4cf0 Add missing LICENSE (#1960) 2024-11-07 22:33:15 +00:00
Zeke Foppa 789ac3576a Add LICENSE file to sql-parser crate (#1959)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-11-07 21:36:37 +00:00
Zeke Foppa adf6dab757 Get jsonwebtoken and jwks forks from crates.io (#1958)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-11-07 21:11:26 +00:00
Mario Montoya 97c8c26a20 Removing dead code: Relational ops and cursor (#1956) 2024-11-07 18:32:42 +00:00
github-actions[bot] 172d992c6f Version Packages (rc1) (#115)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-07 02:17:32 +05:30
Mazdak Farrokhzad 9fc6abff66 Companion to SpacetimeDB#1812 (light tx, ts) (#110)
* support TransactionUpdateLight and CallReducerFlags

* Run generate

* Push creds

* run prettier

* Add changeset

* Turn on withLightMode

---------

Co-authored-by: Puru Vijay <awesomepuruvj@gmail.com>
Co-authored-by: Puru Vijay <47742487+PuruVJ@users.noreply.github.com>
2024-11-06 12:34:46 -08:00
Zeke Foppa 82f4b07b90 Bump Unity SDK version to RC1 (#187)
## Description of Changes
Just bump `package.json` to `1.0.0-rc1` instead of `1.0.0`.

## API
No breaking changes

## Requires SpacetimeDB PRs
None

## Testing

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-11-06 14:29:48 -05:00
Jeffrey Dallatezza 0b1beec8f3 Decode identity correctly (#1952) 2024-11-06 19:13:11 +00:00
Puru Vijay bdc147eb5d Update readme for rc1.0 (#123)
* Update readme

* rc1

* Update packages/sdk/README.md

---------

Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2024-11-06 10:54:45 -08:00
Ingvar Stepanyan 6d712b4b0d Simplify benchmarking wrappers (#1951) 2024-11-06 17:21:56 +00:00
james gilles a24a206c28 Be more careful about endianness with Identity and Address (#1926)
Co-authored-by: Puru Vijay <awesomepuruvj@gmail.com>
2024-11-05 20:04:05 +00:00
Mario Montoya 9758339bf7 Logical to physical plan lowering (#1910) 2024-11-05 17:00:27 +00:00
Mario Montoya cb9e0176e6 Fix benches for ia_loop, circles (#1922) 2024-11-05 14:50:31 +00:00
John Detter e94009a0ef Remove jdetter as codeowner for now (#1939)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2024-11-05 13:23:49 +00:00
Kim Altintop f22b163c0a commitlog: Introduce epoch (#1851) 2024-11-05 10:10:30 +00:00
Jeremie Pelletier 181aff3323 Update the quickstart module (#185)
## Description of Changes

Fix the quickstart client program, also removes the rust server program (it lives in the stdb main repo under modules/quickstart-chat)

## Testing

Second subscription resets the first one without the fix

## Testsuite

SpacetimeDB branch name: master
2024-11-04 19:17:05 +00:00
james gilles 7e111bc1c5 Update Identity and Address to use bigints rather than byte arrays (#119)
* Update Identity and Address to use bigints rather than byte arrays

* Add back accidentally-removed APIs

* Remove debugging log

* Add changeset

* Fix names

* Format

* Update creds

---------

Co-authored-by: Puru Vijay <awesomepuruvj@gmail.com>
2024-11-05 00:11:06 +05:30
Mazdak Farrokhzad 2ad31d65b4 Companion to SpacetimeDB#1812 (light tx, C#) (#170)
## Description of Changes

Adds C# sdk support for
https://github.com/clockworklabs/SpacetimeDB/pull/1812.

## Requires SpacetimeDB PRs

- https://github.com/clockworklabs/SpacetimeDB/pull/1812

## Testsuite

SpacetimeDB branch name: centril/websocket-light

---------

Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2024-11-04 17:46:42 +01:00
Mazdak Farrokhzad ac0053caab Websocket API: Light transaction updates & NoSuccessNotify (#1812)
Signed-off-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
2024-11-04 15:59:11 +00:00
joshua-spacetime 1657fd2d28 Use previous reducer context when downgrading a tx (#1932) 2024-11-01 23:05:31 +00:00
joshua-spacetime 49032bd2d9 chore: remove dead code (#1930) 2024-11-01 21:54:48 +00:00
joshua-spacetime f199ba5ca8 Cached query execution plan (#1923) 2024-11-01 16:22:47 +00:00
John Detter f936c98b04 Fix Reconnection Logic (#168)
## Description of Changes
*Describe what has been changed, any new features or bug fixes*

- switched our "already connected" logic to using a reference to a
`MonoBehaviour` instead of just a bool. `MonoBehaviour`s are typically
destroyed when a scene reload happens and in this case we'll want to
allow developers to spawn a new `SpacetimeDBNetworkManager` if the
previous one has been destroyed.

## API

This is *not* an API break.

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*

- https://github.com/clockworklabs/SpacetimeDB/pull/1869

## Testsuite

SpacetimeDB branch name: master

## Testing
*Write instructions for a test that you performed for this PR*

- [x] I have added in several new tests here, one of which is a
reconnection test. Also, the reason why we couldn't have more than 1
test before this is that it was required for reconnections to be working
in order to have multiple tests running in the testsuite. Now that we
have fixed reconnections I have enabled all of the tests.

Testsuite passes


![image](https://github.com/user-attachments/assets/09ef5835-f2c7-41f1-af6b-e612ac5e0497)

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Jeremie Pelletier <jeremiep@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-31 22:34:26 +00:00
Zeke Foppa 3afa1e00ad CLI - Add login show and logout (#1911)
Co-authored-by: Jeffrey Dallatezza <jeffreydallatezza@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-31 18:10:07 +00:00
Mazdak Farrokhzad ac45eacf37 Add gzip + none compression algos and let SDK pick compression (take 2) (#174)
## Description of Changes

Companion to https://github.com/clockworklabs/SpacetimeDB/pull/1802.

## Requires SpacetimeDB PRs

None

## Test suite

SpacetimeDB branch name: 0935b7346b

---------

Co-authored-by: Jeremie Pelletier <jeremiep@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-31 19:08:52 +01:00
John Detter b728e63158 Unity testsuite as a git submodule (#186)
**Please do not rebase this PR**

## Description of Changes
*Describe what has been changed, any new features or bug fixes*

This is very similar to
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/176
except it imports the circle game as a submodule instead of copying the
code over into this repo. This is the SpacetimeDBCircleGame PR that
we're dependent on right now:
https://github.com/clockworklabs/SpacetimeDBCircleGame/pull/3

- This PR introduces a testsuite which runs in Unity. Right now it just
spawns in a circle, eats some food and verifies the decay logic is
working correctly. I've also written some reconnection tests but they
don't work because reconnections are currently broken. There are also
one-off tests but those don't work either because they also require
reconnections to be working.

Update: reconnections have been fixed via
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/168.

I've used the built-in unity testsuite framework to achieve this, along
with the UnityCI tool from GameCI. The documentation for this docker
container can be found here:
https://game.ci/docs/github/getting-started/

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

Not breaking

## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*

None

## Testsuite

SpacetimeDB branch name: 0935b7346b

## Testing
*Write instructions for a test that you performed for this PR*

- [x] The testsuite is passing:
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/actions/runs/11604456943/job/32313229775

You can follow test instructions here to double check my work:
https://github.com/clockworklabs/SpacetimeDBCircleGame/pull/3

## Follow-up Actions

- [ ] Rebase the reconnection logic PR onto this PR and re-enable the
reconnection tests

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>
2024-10-31 18:25:28 +01:00
Ingvar Stepanyan 8448484ad9 Optimise C# in a ridiculous way (#1924) 2024-10-31 16:24:13 +00:00
John Detter b2c5b41170 Fix Connection Error: Success (#166)
## Description of Changes
This PR edits the handling of errors related to websocket connections
and disconnections. In particular, clients and users would often run
into the dreaded `Connection Error: Success` message which was confusing
and frustrating. This PR better addresses the error by providing more
guidance and debug info for the user. It is unfortunately still
suboptimal because the `HttpStatusCode` is not available in the .NET
core version that Unity supports. We try to be as helpful as possible in
this scenario.

## API

- [x] This is an API breaking change to the SDK, because it changes the
returned values from the `OnDisconnect` and `OnConnectError` callbacks
to implement the API specification:
https://github.com/clockworklabs/SpacetimeDBPrivate/pull/866/files#diff-be533cc04817c33605a68d717c6ec320c4449904266ee8e1096971e9e17e8d31R424

## Requires SpacetimeDB PRs
No changes to SpacetimeDB required.

## Testing

I, Tyler, have tested this and confirmed it to be working with
CircleGame. Here is a sample of the output in the case of `Connection
Error: Success`:

<img width="1324" alt="image"
src="https://github.com/user-attachments/assets/2b98c69f-07e2-4d0b-a61f-0ae4f84d62f6">

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-30 18:08:36 -04:00
Jeremie Pelletier 1328b5d6a0 C# codegen making state relative to a DbConnection (#1869) 2024-10-30 20:55:30 +00:00
Puru Vijay 556858e007 Companion to spacetime-web#470 (#1912)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-30 19:23:58 +00:00
Ingvar Stepanyan bc79f93e29 Hide "internal" datetime representation types (#1921) 2024-10-30 16:49:51 +00:00
SteveGibson 5ccb5f99bf Fixed subscription updates not clearing tables with no subscribed values (#182)
## Description of Changes
*Describe what has been changed, any new features or bug fixes*

Context:
https://discord.com/channels/568217153853980682/669989878955638785/1301132060878049332
Currently, when we receive subscription updates, a table will only be
diffed if subscription has any rows for that table. If, however, there
are no subscribed values, that table will NOT be diffed, and therefore
will not get cleared. Values from previous subscription will still be
there, so the table is in incorrect state.

This PR fixes that by making sure that ALL tables are checked in state
diff

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*


## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*

## Testing
*Write instructions for a test that you performed for this PR*

- [ ] Create a table A with an `val: i32` field
- [ ] Generate rows for table A with field values in the range (0..100)
- [ ] Connect client and subscribe to `SELECT * FROM A WHERE val > 0`
(will have all rows from table A)
- [ ] Change your subscription to `SELECT * FROM A WHERE val > 1000`
(should have no rows)
- [ ] Note that after subscription is applied, table A will have no
values

Co-authored-by: Steve Boytsun <steve@clockwokrlabs.io>
2024-10-30 16:33:54 +00:00
Ingvar Stepanyan 0935b7346b Fix Find() with struct-based rows (#1917) 2024-10-29 21:33:59 +00:00
Zeke Foppa 61360387be CLI - Login flow (#1878)
Co-authored-by: Jeffrey Dallatezza <jeffreydallatezza@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-29 20:28:45 +00:00
joshua-spacetime c8ce611a18 perf: Use default buffer size for brotli compression (#1920) 2024-10-29 19:09:29 +00:00
Ingvar Stepanyan 11a38dacdd Don't redownload WASI SDK (#1916) 2024-10-29 18:40:20 +00:00
Zeke Foppa cf3f37cf77 Update DLLs and bump package versions to 1.0.0-rc1 (#180)
## Description of Changes
Update the SpacetimeDB C# DLLs to be up to date with `master` in
SpacetimeDB (now that C# bindings have been bumped to `v1.0.0-rc1`).

We will need a followup PR

## API

Not a breaking change.

## Requires SpacetimeDB PRs
`master`

## Testing
Only automated tests

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-29 11:33:15 -07:00
Mario Montoya a6a6c4f08f Put ExecutionContext inside the Tx context (#1876)
Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
2024-10-29 16:24:06 +00:00
Zeke Foppa 7de743d44d Bump C# bindings to 1.0.0 (#1913)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-29 00:23:49 +00:00
Ingvar Stepanyan e595b11761 NFC: Remove obsolete BytesWrapper (#1896)
Signed-off-by: Ingvar Stepanyan <me@rreverser.com>
2024-10-28 15:45:24 +00:00
Kim Altintop d09e1eabd2 commitlog: Improve skipping behavior of traversals (#1902) 2024-10-28 08:07:40 +00:00
Kim Altintop 9f5ddd967f core: Conversion from txdata::Inputs to ReducerContext (#1901) 2024-10-28 07:02:59 +00:00
Kim Altintop 17a49d28b6 core: Expose next_tx_offset of the Replay decoder (#1899) 2024-10-28 06:42:45 +00:00
Kim Altintop a30ec5790e core: Expose snapshot taking on Locking datastore (#1898) 2024-10-28 06:24:42 +00:00
Jeffrey Dallatezza 25ea57db50 Fix the endpoint for short-lived tokens (#1907)
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
2024-10-25 19:56:32 +00:00
joshua-spacetime 839aa99027 feat: Add non-unique index join iterator (#1908) 2024-10-25 19:10:35 +00:00
Tyler Cloutier fa960b3be9 Small naming fixes. Fixes database identity creation. (#1892) 2024-10-24 23:02:21 +00:00
joshua-spacetime c840eda037 Physical query plan + executors (#1881) 2024-10-24 17:30:59 +00:00