Commit Graph

128 Commits

Author SHA1 Message Date
pedrocarlo
961c0cd282 script to save JsonSchema for editor integration 2025-08-30 12:17:50 -03:00
pedrocarlo
61fa7546c1 fold some SimulatorOpts fields to Profile 2025-08-30 11:31:52 -03:00
pedrocarlo
962666831b read Profile file from path or use predefined profiles 2025-08-30 11:31:52 -03:00
pedrocarlo
06b923d0c1 adjust simulator to use correct trait signature 2025-08-30 11:31:52 -03:00
pedrocarlo
19d9003cd7 create profiles folder 2025-08-30 11:31:52 -03:00
pedrocarlo
bcd70488ae add sqlite integrity check back 2025-08-29 12:25:27 -03:00
pedrocarlo
8010b7d0c7 make simulator use sql_generation crate as dependency 2025-08-25 22:59:31 -03:00
PThorpe92
2810b5d8a2 Add --keep-files flag and force Drop of database in simulator to prevent issues with the Registry 2025-08-15 17:54:40 -04:00
pedrocarlo
0c9ecbc768 simulator should delete files after a successful run 2025-08-09 16:25:51 -03:00
alpaylan
0b3fb2ecdd Merge branch 'main' of https://github.com/tursodatabase/limbo 2025-07-13 11:10:52 -04:00
Nils Koch
828d4f5016 fix clippy errors for rust 1.88.0 (auto fix) 2025-07-12 18:58:41 +03:00
Mikaël Francoeur
ed2de42048 only output color on terminal 2025-07-11 10:57:01 -04:00
alpaylan
e28ad97ac7 cargo fmt and cargo clippy fixes 2025-07-11 03:35:32 -04:00
alpaylan
3a967f9127 remove rusqlite integrity check, sync generation with --experimental-indexes, move FaultyQuery to disabled by default 2025-07-11 03:35:02 -04:00
alpaylan
489602b095 updates to the oracle implementations for differential and doublecheck, add integrity check to the end of the simulation, run cargo clippy --fix 2025-07-11 01:22:40 -04:00
alpaylan
a7b5a2c435 Merge branch 'main' of https://github.com/alpaylan/limbo 2025-07-09 00:14:24 -04:00
alpaylan
44a2fa60a3 add union all cardinality preservation, start generating INSERT INTO t SELECT... queries, add integrity checks to the end of run_simulation 2025-07-09 00:14:13 -04:00
echoumcp1
c5d719dafa adding better shrinking and cli opts 2025-07-07 21:21:21 -04:00
alpaylan
ea9c67a950 generate joins and unions 2025-07-07 02:54:48 -04:00
alpaylan
0bce68b38d wip: add joins to the select 2025-07-06 14:46:38 -04:00
pedrocarlo
6dfd4700e9 simulator: disable all ansi encodings for debug print log file 2025-06-14 19:34:40 -03:00
Jussi Saurio
f7fa56ecfd Change integrity check failure to say 'simulation failed:'
our AWS nightly sim looks for a line 'simulation failed:' in the process
output to capture context for the github issues it creates.

if the sim passes otherwise but integrity check fails, then this log line
must also be present there, otherwise the aws sim will panic due to not finding
a suitable line.
2025-06-13 11:26:04 +03:00
pedrocarlo
83d72db901 better error messages + cleaner printing of file stats + tracing
instrumentation in `execute_interaction`
2025-06-11 11:32:45 -03:00
pedrocarlo
82538dbe8e add integrity_check to sim 2025-06-10 12:17:59 -03:00
pedrocarlo
f3ef60e1f1 use anyhow in simulator for lazily evaluated error context instead of eager evaluation with .or 2025-06-10 10:50:39 -03:00
Jussi Saurio
51e3a04668 simulator: add option to disable BugBase 2025-06-02 12:14:35 +03:00
Pere Diaz Bou
8ee7228c43 simulator: log to file too
most of the time debugging the log of a simulator run is spent reading
from a file for convinience. Let's just log to a file too.
2025-05-30 11:10:17 +02:00
Pere Diaz Bou
83db9be818 log seed creating plan 2025-05-30 11:04:19 +02:00
Pere Diaz Bou
d3495238c4 set default level info and log seed at startup 2025-05-30 11:02:05 +02:00
Pere Diaz Bou
8ec7e616b4 simulator: switch to tracing, run io.run_once and add update queries
* Without tracing crate we cannot log anything that happens in
limbo_core
* IO never ran in step loop inside simulator.
* Added update queries (which currently loop forever for some reason I'm
debugging).
2025-05-30 10:57:13 +02:00
alpaylan
e13b5bc698 fix min/max-tests bug 2025-04-11 15:33:32 -04:00
alpaylan
9d08693e8f add simulator subcommands 2025-04-11 14:10:12 -04:00
alpaylan
d4707fe391 add non-zero exit code in case of failures, remove the interactive initalization option in bug base for now, fix bugs in differential mode, add detailed information regarding runs to the bug base 2025-04-11 11:23:03 -04:00
alpaylan
64c2917e81 add bug base, refactor 2025-04-08 17:48:16 -04:00
Pekka Enberg
96175cccf7 cli: Add --experimental-mvcc option to enable MVCC 2025-03-06 10:16:42 +02:00
alpaylan
c133bbdd29 add differential testing against rusqlite 2025-02-11 14:13:14 -05:00
Aarni Koskela
eaea02c567 Fix a handful of typos 2025-02-09 18:08:29 +02:00
alpaylan
4362bc16a3 fix formatting 2025-02-08 09:37:08 -05:00
alpaylan
6308ce4544 fix the shrinking file and poison errors 2025-02-08 09:34:51 -05:00
Pekka Enberg
0d0906dce4 Merge 'simulator: implement --load and --watch flags' from Alperen Keleş
The current status of the PR is halfway. The new framing of simulation
runner where `setup_simulation` is separated from `run_simulation`
allows for injecting custom plans easily. The PR is currently missing
the functionality to update the `SimulatorEnv` ad hoc from the plan, as
the environment tables were typically created during the planning phase.
The next steps will be to implement a function `fn
mk_env(InteractionPlan, SimulatorEnv) -> SimulatorEnv`, add `--load`
flag to the CLI for loading a serialized plan file, making a
corresponding environment and running the simulation.
We can optionally combine this with a `--save` option, in which we keep
a seed-vault as part of limbo simulator, corresponding each seed with
its generated plan and save the time to regenerate existing seeds by
just loading them into memory. I am curious to hear thoughts on this?
Would the maintainers be open to adding such a seed-vault? Do you think
the saved time would be worth the complexity of the approach?

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #720
2025-01-26 08:52:58 +02:00
alpaylan
e476b9f697 implement watch mode
- add `--watch` flag
- start saving seeds in persistent storage
- make a separate version of execution functions that use `vector of interaction` instead of `InteractionPlan`
2025-01-18 23:54:03 +03:00
Jorge López
0d6e6a0aa4 syntactic changes: use Result::unwrap_or() instead of manual match 2025-01-18 19:20:11 +01:00
alpaylan
c30e2757b4 - implement '--load <PATH>' flag that loads an interaction plan and executes it instead of generating one from scratch
- save a json serialization of the generated plans to `<tempdir>/simulator.plan.json`
2025-01-17 22:04:55 +03:00
alpaylan
28cde537a8 this commit;
- makes interaction plans serializable
- fixes the shadowing bug where non-created tables were assumed to be created in the shadow tables map
- makes small changes to make clippy happy
- reorganizes simulation running flow to remove unnecessary plan regenerations while shrinking and double checking
2025-01-17 01:30:46 +03:00
alpaylan
ecb0f782ac Merge branch 'main' of https://github.com/tursodatabase/limbo 2025-01-15 10:59:46 +03:00
Pekka Enberg
3c118db20d simulator: Welcome banner 2025-01-14 19:15:14 +02:00
Pekka Enberg
0c7ebd4df5 simulator: Enable info-level logging by default 2025-01-14 17:54:39 +02:00
Pekka Enberg
30a380cab1 simulator: Move more logging under trace level 2025-01-14 17:54:29 +02:00
alpaylan
fb937eff7b fix non-determinism bug arising from a call to thread_rng while picking
which row to check existence for in the result of the select query
2025-01-13 17:26:23 +03:00
alpaylan
43f6c34408 fix arbitrary_from ergonomics by removing the implicit reference in the trait signature 2025-01-13 14:43:12 +03:00