Skip to content

Commit c919040

Browse files
authored
Merge pull request #195 from jamals86/027-pg-transactions
A stable version with number of improvements to memory consuption and light weight subscription
2 parents feddd9e + d1103fd commit c919040

665 files changed

Lines changed: 15123 additions & 17138 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/nextest.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[[profile.default.overrides]]
2+
filter = 'test(test_setup_complete_environment)'
3+
threads-required = 15
4+
15
[profile.ci]
26
# Store test results in JUnit format
37
junit.path = "junit.xml"

.github/test-release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ if ! command -v wasm-pack &> /dev/null; then
4444
fi
4545

4646
# Build SDK
47-
print_step "Building kalam-link SDK..."
48-
cd "$REPO_ROOT/link/sdks/typescript"
47+
print_step "Building @kalamdb/client SDK..."
48+
cd "$REPO_ROOT/link/sdks/typescript/client"
4949
npm install
5050
npm run build
5151
print_success "SDK built"

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ jobs:
344344
345345
- name: Install SDK dependencies
346346
shell: bash
347-
working-directory: link/sdks/typescript
347+
working-directory: link/sdks/typescript/client
348348
run: |
349349
set -euo pipefail
350350
npm install --no-audit --no-fund
@@ -353,8 +353,8 @@ jobs:
353353
shell: bash
354354
run: |
355355
set -euo pipefail
356-
cd link/sdks/typescript
357-
npx --yes license-checker --production --json > ../../../target/license/sdk-licenses.json
356+
cd link/sdks/typescript/client
357+
npx --yes license-checker --production --json > "$GITHUB_WORKSPACE/target/license/sdk-licenses.json"
358358
359359
- name: Validate licenses and generate third-party report
360360
shell: bash

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
133133
- name: Install SDK dependencies
134134
shell: bash
135-
working-directory: link/sdks/typescript
135+
working-directory: link/sdks/typescript/client
136136
run: |
137137
set -euo pipefail
138138
npm install --no-audit --no-fund
@@ -141,8 +141,8 @@ jobs:
141141
shell: bash
142142
run: |
143143
set -euo pipefail
144-
cd link/sdks/typescript
145-
npx --yes license-checker --production --json > ../../../target/license/sdk-licenses.json
144+
cd link/sdks/typescript/client
145+
npx --yes license-checker --production --json > "$GITHUB_WORKSPACE/target/license/sdk-licenses.json"
146146
147147
- name: Validate and generate third-party report
148148
shell: bash
@@ -207,11 +207,11 @@ jobs:
207207
cargo install wasm-pack --version "$WASM_PACK_VERSION" --locked
208208
wasm-pack --version
209209
210-
- name: Build SDK (kalam-link)
210+
- name: Build SDK (@kalamdb/client)
211211
shell: bash
212212
run: |
213213
set -euo pipefail
214-
cd link/sdks/typescript
214+
cd link/sdks/typescript/client
215215
npm install
216216
npm run build
217217

.github/workflows/sdks.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
npm_publish:
7-
description: "Publish TypeScript SDK to npm"
7+
description: "Publish TypeScript SDK packages to npm"
88
type: boolean
99
required: false
1010
default: false
@@ -606,7 +606,7 @@ jobs:
606606
git push origin main
607607
608608
publish_npm:
609-
name: Publish TypeScript SDK to npm
609+
name: Publish TypeScript SDK packages to npm
610610
runs-on: ubuntu-latest
611611
needs:
612612
- resolve_versions
@@ -641,9 +641,24 @@ jobs:
641641
shared-key: npm-publish
642642
cache-on-failure: true
643643

644-
- name: Publish TypeScript SDK to npm
644+
- name: Publish @kalamdb/client to npm
645645
shell: bash
646-
working-directory: link/sdks/typescript
646+
working-directory: link/sdks/typescript/client
647+
env:
648+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
649+
run: |
650+
set -euo pipefail
651+
VERSION="${{ needs.resolve_versions.outputs.ts_version }}"
652+
FORCE_FLAG=""
653+
if [[ "${{ github.event.inputs.force_npm_publish }}" == "true" ]]; then
654+
FORCE_FLAG="--force"
655+
fi
656+
chmod +x ./publish.sh
657+
./publish.sh --version "$VERSION" $FORCE_FLAG
658+
659+
- name: Publish @kalamdb/consumer to npm
660+
shell: bash
661+
working-directory: link/sdks/typescript/consumer
647662
env:
648663
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
649664
run: |

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,12 @@ ui/package-lock.json
108108
/link/sdks/typescript/.wasm-cargo-home-test2
109109
ts-sdk-repro/server.toml
110110
/benchv2/logs
111+
/benchv2/logs
112+
/link/kalam-client/sdks/typescript/.wasm-cargo-home
113+
/link/kalam-client/sdks/typescript/.wasm-target
114+
/link/kalam-client/sdks/typescript/client/.wasm-cargo-home
115+
/link/kalam-client/sdks/typescript/client/.wasm-target
116+
/link/kalam-consumer-wasm/sdks/typescript/consumer/.wasm-cargo-home
117+
/link/kalam-consumer-wasm/sdks/typescript/consumer/.wasm-target
118+
/link/sdks/typescript/client/.wasm-cargo-home
119+
/link/sdks/typescript/client/.wasm-target

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ use kalamdb_commons::models::UserId;
8282
- `cli/`: Kalam CLI, smoke tests, and CLI-facing integration flows.
8383
- `link/`: SDK bridge workspace and shared link infrastructure.
8484
- `link/sdks/typescript/`: TypeScript SDK.
85-
- `link/sdks/dart/`: Dart/Flutter SDK. `link/sdks/dart/lib/src/generated` is generated; regenerate with `link/sdks/dart/build_native_libs.sh`.
85+
- `link/sdks/dart/`: Dart/Flutter SDK. `link/sdks/dart/lib/src/generated` is generated; regenerate and prepare the SDK with `link/sdks/dart/build.sh`.
8686
- `link/kalam-link-dart/`: Rust bridge/native layer used by the Dart SDK.
8787
- `pg/`: PostgreSQL extension workspace for `pg_kalam`; see `pg/pg_kalam.control`, `pg/src/`, `pg/crates/`, and `pg/tests/`.
8888
- `benchv2/`: Benchmark harness, scenarios, templates, and results for performance work.
@@ -138,6 +138,7 @@ backend/crates/
138138
- Always add `#[ntest::timeout(time)]` to every async test where `time` is the **actual observed runtime** × 1.5 (to cover slower machines).
139139
- Example: if a test took 40s, set `#[ntest::timeout(60000)]`.
140140
- Recalculate and update timeouts after significant changes to test behavior or data size.
141+
- Timeouts are guardrails, not the fix: do not increase a test timeout just because a test started failing. Fix the hang, race, or slow path first, then set the timeout from the measured healthy runtime × 1.5.
141142

142143
## Workflows & Commands (Documented)
143144

@@ -189,4 +190,4 @@ Suggested extra checks:
189190
6. WebSocket origins must be validated against config or rejected when strict mode is enabled.
190191
7. Admin or root password by default should be set or is set to kalamdb123 for testing or writting in tests, and the user should be admin
191192

192-
the folder: link/sdks/dart/lib/src/generated is generated dont modify anything in it, to regenerate this run the link/sdks/dart, build_native_libs.sh file which will regenerate this folder
193+
the folder: link/sdks/dart/lib/src/generated is generated dont modify anything in it, to regenerate this run the link/sdks/dart/build.sh script which also prepares the SDK artefacts

0 commit comments

Comments
 (0)