Commit graph

94 commits

Author SHA1 Message Date
Preston Thorpe
871357281b
Merge 'Install sqlite locally to run tests and other scripts' from Pedro Muniz
Some checks are pending
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
## Description
Add script to install SQLite in an untracked folder, so that
contributors do not have to install and update their Path to use a
compatible SQLite version.
<!--
Please include a summary of the changes and the related issue.
-->
## Motivation and context
My MacOs SQLite version does not support loading extensions nor
`concat`, so I cannot run tests locally.
<!--
Please include relevant motivation and context.
Link relevant issues here.
-->
## Description of AI Usage
I think AI is great at writing bespoke bash scripts, so I asked Claude
to write them for me and refactor scripts in the codebase, where we were
using system SQLite binary.
Opencode session:
https://opncd.ai/share/3zKROXCe
<!--
Please disclose how AI was used to help create this PR. For example, you
can share prompts,
specific tools, or ways of working that you took advantage of. You can
also share whether the
creation of the PR was mainly driven by AI, or whether it was used for
assistance.
This is a good way of sharing knowledge to other contributors about how
we can work more efficiently with
AI tools. Note that the use of AI is encouraged, but the committer is
still fully responsible for understanding
and reviewing the output.
-->

Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #4236
2025-12-16 21:56:46 -05:00
pedrocarlo
d1cd68e813 run install script before running other sqlite related scripts 2025-12-16 23:19:51 -03:00
pedrocarlo
ad2388da4a add script to download sqlite file to separate folder 2025-12-15 17:10:51 -03:00
Pekka Enberg
9288471525 stress: Make random seed configurable
When we're not running under Antithesis, allow the user to specify a
seed for random number generation, which impacts the SQL operations we
do. Although not deterministic, this makes reproducing some issues
easier.

Also, add a "scripts/run-until-fail.sh", which you can use to discover
interesting seeds. For example, you can run

```
./scripts/run-until-fail.sh cargo run -p turso_stress -- -t1
```

to find a bug and then just copy-paste the reported seed to attempt to
reproduce it.
2025-12-15 17:56:33 +02:00
Jussi Saurio
0887ebef7d Merge 'ci: run TCL tests for MVCC under CI' from Pere Diaz Bou
Some checks are pending
Build & publish @tursodatabase/database / db-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / db-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-aarch64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / sync-bindings-x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test DB bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Test DB bindings on browser@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
## Description
Run TCL tests for MVCC in the CI. Right now almost everything is
commented out as we need to fix them.
## AI Disclosure
No
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds CI step to run MVCC TCL tests via a custom sqlite wrapper with
experimental flags, and narrows the MVCC test suite to known passing
tests.
>
> - **CI**:
>   - Add `Test mvcc` step in `test-limbo` job to run `make test-compat-
mvcc` in `.github/workflows/rust.yml`.
> - **Makefile**:
>   - Update `test-compat-mvcc` to use `SQLITE_EXEC=scripts/turso-mvcc-
sqlite3`.
> - **Test Runner Script** (`scripts/turso-mvcc-sqlite3`):
>   - Enable experimental flags: `--experimental-mvcc`, `--experimental-
views`, `--experimental-strict`.
> - **Tests**:
>   - Define `testing/all-mvcc.test` with a subset of passing test
files; comment out failing ones.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ee48302e30. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #4178
2025-12-11 23:39:05 +02:00
Jussi Saurio
e67cc999f3 Add run-sqlancer.sh script to run sqlancer using Turso java bindings 2025-12-11 17:18:11 +02:00
Pere Diaz Bou
e048a48bee ci: run TCL tests for MVCC under CI 2025-12-11 11:57:32 +01:00
Pere Diaz Bou
c5f6c3d5c0 tcl,makefile: add tcl test infraestructure for mvcc 2025-12-08 18:05:45 +01:00
Jussi Saurio
826ca4d44d chore: remove experimental_indexes feature flags 2025-12-08 13:00:37 +02:00
Pekka Enberg
8ee5b5621e Update Java package version in scripts/update-version.py 2025-10-31 13:43:45 +02:00
Pekka Enberg
d71a33a188 antithesis: Upload config image in GitHub Actions workflow
The Antithesis config image was not being uploaded during CI runs, only
the workload image. This caused experiment failures when the config
image expired from the registry after 6 months of inactivity.
2025-10-30 07:49:44 +02:00
Pekka Enberg
9d4813df04 Reduce Antithesis runtime to 4 hours 2025-10-16 19:00:40 +03:00
Pekka Enberg
f4bf635129
Merge 'javascript: Rename "browser" packages to "wasm"' from Pekka Enberg
Closes #3417
2025-09-29 18:11:30 +03:00
Pekka Enberg
82456cfbed scripts/publish-crates.sh: Remove sqlite3_parser 2025-09-29 17:35:45 +03:00
Pekka Enberg
57c279e2b0 javascript: Rename "browser" packages to "wasm" 2025-09-29 17:02:34 +03:00
Nikita Sivukhin
1faafdb57e use wasm-runtime from NPM instead of patched sources 2025-09-23 12:28:16 +04:00
Nikita Sivukhin
78e06ff4f7 fix update script 2025-09-12 17:03:04 +04:00
Nikita Sivukhin
11e582c058 update update-script 2025-09-10 22:35:58 +04:00
Jussi Saurio
8b7c0334d4 RUFFFffff 2025-09-10 15:00:08 +03:00
Jussi Saurio
2ff5e15f58 Add scripts that help debug bugs from simulator
1. Add script that cleans simulator logs into just the SQL statements
2. Add script that bisects a set of SQL statements to find the minimal
   prefix set of statements that fails SQLite integrity check
2025-09-10 14:56:58 +03:00
Pekka Enberg
a2f0725a62 Fix publish-create.sh script 2025-09-10 13:49:55 +03:00
Nikita Sivukhin
b49deb64d8 fix lint error 2025-09-09 23:23:32 +04:00
Nikita Sivukhin
62e4f15f22 update update-script to properly handle JS workspace 2025-09-09 22:15:08 +04:00
PThorpe92
d2a762534c
Fix merge script to prompt if tests are still in progress 2025-09-08 13:22:40 -04:00
Pekka Enberg
12cf4d2e72 core: Make strict schema support experimental
It's not tested properly so let's mark it as experimental for now.

Fixes #2775
2025-09-02 16:40:02 +03:00
Pekka Enberg
8f7e43b32b scripts/publish-crates.sh: Remove turso_sqlite3_parser package 2025-09-02 14:21:04 +03:00
Pekka Enberg
3ec6f37555 scripts: Add turso_sqlite3_parser back to publish-crates.sh
Turns out turso_parser depends on it.
2025-09-02 12:52:40 +03:00
Pekka Enberg
adaf0bec6c scripts: Fix publish-crates.sh to publish new parser crate 2025-09-02 12:45:16 +03:00
C4 Patino
75c85e6284
ci: fix merge-pr issue to escape command-line backticks 2025-08-25 17:59:58 -05:00
Pekka Enberg
13b805a992 Move @tursodatabase/sync code to sync/javascript 2025-08-18 14:23:20 +03:00
Glauber Costa
7e76970035 fix: Handle fresh INSERTs in materialized view incremental maintenance
The op_insert function was incorrectly trying to capture an "old record"
for fresh INSERT operations when a table had dependent materialized views.
This caused a "Cannot delete: no current row" error because the cursor
wasn't positioned on any row for new inserts.

The issue was introduced in commit f38333b3 which refactored the state
machine for incremental view handling but didn't properly distinguish
between:
- Fresh INSERT operations (no old record exists)
- UPDATE operations without rowid change (old record should be captured)
- UPDATE operations with rowid change (already handled by DELETE)

This fix checks if cursor.rowid() returns a value before attempting to
capture the old record. If no row exists (fresh INSERT), we correctly
set old_record to None instead of erroring out.

I am also including tests to make sure this doesn't break. The reason I
didn't include tests earlier is that I didn't know it was possible to
run the tests under a flag. But in here, I am just adding the flag to
the execution script.
2025-08-13 06:41:14 -05:00
PThorpe92
213d589dd1
Apply review suggestions, remove FreeEntry 2025-08-08 11:07:29 -04:00
PThorpe92
2e072cadb0
Add CI=true env var so the tests dont each allocate 4mb by default 2025-08-08 10:55:26 -04:00
Pekka Enberg
6ccee4267b Add sync package to scripts/update-version.py 2025-08-08 16:50:02 +03:00
PThorpe92
84900c4da2
Check repository scope in merge pr script 2025-07-31 11:39:57 -04:00
PThorpe92
ca383a3b88
Fix merge-py.py script to use github CLI and add makefile command 2025-07-31 10:20:17 -04:00
PThorpe92
ab22dafbe1
Fix merge_pr.py script to avoid marking contributor PRs as closed 2025-07-30 22:49:57 -04:00
Pekka Enberg
2d2f416e2c Revert "bindings/javascript: Add optional dependencies"
This reverts commit 9d7a77efde. It does
not work because the native packages don't yet exists at that point.
Let's fix the Github workflows instead.
2025-07-29 12:36:12 +03:00
Pekka Enberg
9d7a77efde bindings/javascript: Add optional dependencies 2025-07-29 12:15:43 +03:00
Diego Reis
98bec9868b Remove wasm binding
With napi v3 we can compile our javascript binding to wasm, which can
reduce a lot of maintenance overhead and complexity
2025-07-28 14:48:51 -03:00
Pekka Enberg
7c70e8274f antithesis: Run experiments for 8 hours
Eric from Antithesis pointed out that we can still find more states by
running for longer, so let's try that.
2025-07-10 19:37:45 +03:00
Jussi Saurio
f312227825 uv run ruff format && uv run ruff check --fix 2025-07-09 10:06:29 +03:00
Pekka Enberg
1e9fd7d5ed Add scripts/gen-changelog.py 2025-07-09 09:27:09 +03:00
pedrocarlo
81f80edd4a remove experimental_flag from script + remove -q flag default flag from TestTursoShell 2025-07-07 15:34:03 -03:00
pedrocarlo
79660f268f rust pass arguments to run-sim 2025-07-07 12:23:00 -03:00
pedrocarlo
1f2199ea44 run less tests in simulator in CI 2025-07-07 11:53:45 -03:00
Pekka Enberg
4206fc2e23 testing/sqlite3: Add TCL tester harness 2025-07-07 15:41:38 +03:00
Pekka Enberg
9e92325bad antithesis: Make experiments run for longer
...increases probability of Antithesis finding interesting things.
2025-07-03 15:58:49 +03:00
Pekka Enberg
9c5ee9fec1 scripts/publish-crates.sh: s/limbo/turso/ 2025-06-30 10:59:25 +03:00
Pekka Enberg
c9945950e8 core: Remove dependencies to extensions
We don't want to publish all extensions on crates.io, at least not for now.
2025-06-30 10:01:03 +03:00