Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 88 additions & 45 deletions RELEASE_NOTES_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Documentation: https://typedb.com/docs/drivers/rust/overview


```sh
cargo add typedb-driver@3.4.0
cargo add typedb-driver@3.4.4
```


### Java driver

Available through [https://repo.typedb.com](https://cloudsmith.io/~typedb/repos/public-release/packages/detail/maven/typedb-driver/3.4.0/a=noarch;xg=com.typedb/)
Available through [https://repo.typedb.com](https://cloudsmith.io/~typedb/repos/public-release/packages/detail/maven/typedb-driver/3.4.4/a=noarch;xg=com.typedb/)
Documentation: https://typedb.com/docs/drivers/java/overview

```xml
Expand All @@ -29,7 +29,7 @@ Documentation: https://typedb.com/docs/drivers/java/overview
<dependency>
<groupid>com.typedb</groupid>
<artifactid>typedb-driver</artifactid>
<version>3.4.0</version>
<version>3.4.4</version>
</dependency>
</dependencies>
```
Expand All @@ -42,66 +42,109 @@ Documentation: https://typedb.com/docs/drivers/python/overview
Available through https://pypi.org

```
pip install typedb-driver==3.4.0
pip install typedb-driver==3.4.4
```

### HTTP Typescript driver

[//]: # (TODO: Update docs link)

NPM package: https://www.npmjs.com/package/typedb-driver-http
Documentation: https://typedb.com/docs/drivers/

```
npm install typedb-driver-http@3.4.4
```

## New Features
- **Introduce file-based database export and import**
Introduce interfaces to export databases into schema definition and data files and to import databases using these files. Database import supports files exported from both TypeDB 2.x and TypeDB 3.x.

Both operations are blocking and may take a significant amount of time to execute for large databases. Use parallel connections to continue operating with the server and its other databases.

- **Typescript HTTP driver**

Add a relatively slim typescript driver based on our HTTP API, adapted from code used for this purpose in `typedb-studio`.

This driver is published to `npm` under the name `typedb-driver-http` through the same process as the old `nodejs` driver.


- **Typescript HTTP driver docs generation**

Usage examples in Rust:
```rust
// export
let db = driver.databases().get(db_name).await.unwrap();
db.export_to_file(schema_file_path, data_file_path).await.unwrap();
Introduce docs generation for the Typescript HTTP driver, based on the existing strategy for the NodeJS driver.

// import
let schema = read_to_string(schema_file_path).unwrap();
driver.databases().import_from_file(db_name2, schema, data_file_path).await.unwrap();
```
We divide the docs into:

Usage examples in Python:
```py
# export
database = driver.databases.get(db_name)
database.export_to_file(schema_file_path, data_file_path)
- Connection
- Response
- Concept
- Query Structure

# import
with open(schema_file_path, 'r', encoding='utf-8') as f:
schema = f.read()
driver.databases.import_from_file(db_name2, schema, data_file_path)
```
within each section, static functions are grouped into a specific `Static Functions` section.

Usage examples in Java:
```java
// export
Database database = driver.databases().get(dbName);
database.exportToFile(schemaFilePath, dataFilePath);
Additionally, `QueryConstraints`, `QueryVertices` in query structure; and `DriverParams` in connection are used as sub-categories (that is, `DriverParams`, `DriverParamsBasic`, and `DriverParamsTranslated` are all grouped under `DriverParams`).

// import
String schema = Files.readString(Path.of(schemaFilePath));
driver.databases().importFromFile(dbName2, schema, dataFilePath);
```
We also implement functionality for handling:
- type aliases
- indexable properties (e.g. `[varName: string]: Concept`)



## Bugs Fixed
- **Handle "Unexpected response type for remote procedure call: Close" on query stream opening**
Fix a rare `InternalError` returned by mistake when a client sends a query request while the transaction is being closed. Now, an expected "The transaction is closed and no further operation is allowed." error is returned instead.

Additionally, wait for specific transaction responses in `rollback`, `commit`, and `query` to solidify the protocol and ensure that the server acts as expected.




## Code Refactors


## Other Improvements

- **Update zlib dependency**
Support build on Apple Clang 17+ by updating dependencies (details: https://github.com/typedb/typedb-dependencies/pull/577).
- **Enforce explicit https addresses for TLS connections**
Drivers return explicit error messages when connection addresses and TLS options are mismatched. TLS connections require addresses to have `https`. Non-TLS connections require addresses not to have `https`.


- **Enable TLS by default in Python**

We want to enable a secure-by-default setting in TypeDB Drivers. In Java and Rust, `DriverOptions` have to be explicitly set, and there are no defaults. However, Python features a disabled TLS default. While this is compatible with TypeDB CE, it's an insecure default & not compatible with TypeDB Cloud without explicitly enabling it.

Instead, we set the default to TLS being __enabled__ in Python. This means when using an insecure, plaintext connection the user must explicitly set it, and is more likely to become aware of the plaintext communication.


- **Ensure PNPM config in CI matches config locally**

We add an `.npmrc` file to ensure the PNPM config in local machines and CI match so that installation succeeds in CI.


- **Install PNPM deps in CI release pipeline**

The release pipeline in CI now correctly installs PNPM dependencies for the HTTP TS driver.


- **Make the HTTP TypeScript driver dual-module (CJS+ESM)**

The HTTP TypeScript driver is now dual-module, offering both CommonJS and ES Module support.


- **Set HTTP Typescript driver dependencies as dev dependencies**

We set all dependencies of the Typescript HTTP driver as dev dependencies, as they aren't required at runtime.


- **Rename docs antora module**

We rename the docs antora module used to host the generated driver references from `api-ref` to `external-typedb-driver`, to support refactoring in the typedb docs repository.

- **Revert the HTTP driver to a CommonJS package**

We convert `typedb-driver-http` back into using `commonjs`. This allows us to also revert `import`/`export` syntax to not require file extensions.


- **Correct the package and tsconfig for HTTP driver**

We fix issues in `package.json` that prevented `typedb-driver-http` from being used correctly


- **Fix CircleCI release configuration for HTTP driver**

We fix a typo that made the CircleCI release configuration invalid.


- **Use release version of typedb server artifact**

- **Update to latest typedb server artifact**


13 changes: 12 additions & 1 deletion RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,20 @@ Available through https://pypi.org
pip install typedb-driver=={version}
```

### HTTP Typescript driver

[//]: # (TODO: Update docs link)

NPM package: https://www.npmjs.com/package/typedb-driver-http
Documentation: https://typedb.com/docs/drivers/

```
npm install typedb-driver-http@{version}
```

[//]: # (TODO: Please remove the unreleased drivers manually. Commenting them out in Markdown looks scary)

### NodeJS driver
### NodeJS GRPC driver

NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/drivers/nodejs/overview
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.0
3.4.4
2 changes: 1 addition & 1 deletion dependencies/typedb/artifacts.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def typedb_artifact():
artifact_name = "typedb-all-{platform}-{version}.{ext}",
tag_source = deployment["artifact"]["release"]["download"],
commit_source = deployment["artifact"]["snapshot"]["download"],
tag = "3.4.1"
commit = "ee675e16030aaff1751f5c91cf3afa3b7c1a84ad"
)

#def typedb_cloud_artifact():
Expand Down
2 changes: 1 addition & 1 deletion dependencies/typedb/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ def typedb_behaviour():
git_repository(
name = "typedb_behaviour",
remote = "https://github.com/typedb/typedb-behaviour",
commit = "d05a284e445a53de96868c3d27a35ffbef58a077", # sync-marker: do not remove this comment, this is used for sync-dependencies by @typedb_behaviour
commit = "913455bf2923f8a6853f513bab9d3dc34d12c254", # sync-marker: do not remove this comment, this is used for sync-dependencies by @typedb_behaviour
)