Skip to content

fix: matching version in all version files for js sdk#38

Closed
egenthon-cmd wants to merge 10 commits into
mainfrom
fix/version-matching-ci
Closed

fix: matching version in all version files for js sdk#38
egenthon-cmd wants to merge 10 commits into
mainfrom
fix/version-matching-ci

Conversation

@egenthon-cmd

@egenthon-cmd egenthon-cmd commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added support for reconnecting to an existing live session without starting a new one.
    • Exposed the new connection options across both JavaScript and Python SDKs.
  • Bug Fixes

    • Improved job deletion timing by waiting for jobs to finish processing before deleting them, reducing premature delete failures.
  • Chores

    • Updated the JavaScript SDK version to 1.0.6.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 90c365b5-8fa0-490a-8a20-dff46e741f8e

📥 Commits

Reviewing files that changed from the base of the PR and between 63cce90 and 49a32ab.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (17)
  • e2e/e2e-node-cjs/test/live_v2_job_management.test.cjs
  • e2e/e2e-node-esm/test/live_v2_job_management.test.ts
  • e2e/e2e-python/tests/test_live_v2_job_management.py
  • packages/sdk-js/package.json
  • packages/sdk-js/src/client.test.ts
  • packages/sdk-js/src/v2/live/client.ts
  • packages/sdk-js/src/v2/live/session.test.ts
  • packages/sdk-js/src/v2/live/session.ts
  • packages/sdk-js/src/v2/live/types.ts
  • packages/sdk-js/src/version.ts
  • packages/sdk-python/src/gladiaio_sdk/__init__.py
  • packages/sdk-python/src/gladiaio_sdk/v2/live/async_client.py
  • packages/sdk-python/src/gladiaio_sdk/v2/live/async_session.py
  • packages/sdk-python/src/gladiaio_sdk/v2/live/client.py
  • packages/sdk-python/src/gladiaio_sdk/v2/live/session.py
  • packages/sdk-python/src/gladiaio_sdk/v2/live/types.py
  • packages/sdk-python/tests/v2/live/test_connect_session.py

📝 Walkthrough

Walkthrough

Adds connectSession/connect_session methods to JS and Python Live V2 clients, allowing callers to attach to an existing session by providing its ID, URL, and optional metadata instead of performing HTTP initialization. Both SDKs gain a LiveV2ConnectSessionOptions type, session constructor changes, unit tests, and the JS SDK version is bumped to 1.0.6. E2e job-management tests gain terminal-status polling before delete calls.

connect_session feature (JS + Python SDKs)

Layer / File(s) Summary
LiveV2ConnectSessionOptions type definitions
packages/sdk-js/src/v2/live/types.ts, packages/sdk-python/src/gladiaio_sdk/v2/live/types.py
New LiveV2ConnectSessionOptions interface/dataclass added in both SDKs with id, url, optional created_at, and optional messages_config.
Session constructor: existingSession bypass
packages/sdk-js/src/v2/live/session.ts, packages/sdk-python/src/gladiaio_sdk/v2/live/session.py, packages/sdk-python/src/gladiaio_sdk/v2/live/async_session.py
LiveV2Session and LiveV2AsyncSession constructors accept an optional existingSession/existing_session; when provided, HTTP initialization is skipped and the session response is resolved immediately.
connectSession client methods
packages/sdk-js/src/v2/live/client.ts, packages/sdk-python/src/gladiaio_sdk/v2/live/client.py, packages/sdk-python/src/gladiaio_sdk/v2/live/async_client.py, packages/sdk-python/src/gladiaio_sdk/__init__.py
connectSession/connect_session methods added to all three client classes; each builds an existing_session from provided options and returns a session bypassing HTTP init. LiveV2ConnectSessionOptions is re-exported from the Python package root.
Unit tests
packages/sdk-js/src/v2/live/session.test.ts, packages/sdk-python/tests/v2/live/test_connect_session.py
JS Vitest tests cover existingSession bypass, lifecycle message emission, and normal startSession. Python tests use fake HTTP/WebSocket clients to verify sync and async connect_session skips HTTP init and start_session still calls it.
GladiaClient test fix + version bump
packages/sdk-js/src/client.test.ts, packages/sdk-js/src/version.ts, packages/sdk-js/package.json
Two GladiaClient test calls gain apiKey; SDK_VERSION and package.json version bumped to 1.0.6.
E2e delete test: terminal status polling
e2e/e2e-node-cjs/test/live_v2_job_management.test.cjs, e2e/e2e-node-esm/test/live_v2_job_management.test.ts, e2e/e2e-python/tests/test_live_v2_job_management.py
Polling helpers added in all three e2e suites; the delete success test now awaits done/error status before calling delete.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • gladiaio/sdk#24: Touches the same packages/sdk-js/package.json and SDK_VERSION constant in packages/sdk-js/src/version.ts.
  • gladiaio/sdk#28: Introduced the Live V2 job-management e2e tests that this PR extends with terminal-status polling and the updated delete test.
  • gladiaio/sdk#35: Modifies the same LiveV2Session/LiveV2AsyncSession constructor and initialization paths that this PR changes to add existing_session support.

Suggested reviewers

  • lrossillon-gladia

🐇 A session once lost in the cloud,
Now reconnects, skipping the crowd.
No POST to begin,
Just pass the session in—
The rabbit hops on, ears unbowed! 🎉

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/version-matching-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant