Daniel-Boll / scylla-javascript-driver

A ScyllaDB Driver alternative for Nodejs, Javascript and Typescript written using Node API through Rust bindings
https://www.scylladb.com/
MIT License
41 stars 3 forks source link

Updating Rust Driver version and setting a Custom Driver name/version #35

Open DanielHe4rt opened 1 month ago

DanielHe4rt commented 1 month ago

Currently, we're using an outdated Scylla Rust Driver version and we need maintain it on LTS. But more than that, we gonna need to implement a different driver name under the Rust Driver (for identification inside the Cluster).

Thinking on that, the drivers team recently merged a possibility to settle the driver name/version (https://github.com/scylladb/scylla-rust-driver/commit/36d5edd3a06a6808ce19dd594ea4904c8b48c0c2)

let session: Session = SessionBuilder::new()
  .known_node("127.0.0.1:9042")
  .custom_identity(
     SelfIdentity::new()
       .with_custom_driver_version("0.3.17")
       .with_application_name("ScyllaDB JavaScript Driver")
       .with_application_version(app_version_from_package_json),
  );

Goal

Upgrade the driver version and validate missing rules to implement this feature.

Daniel-Boll commented 1 month ago

We could try to change from getting the version from the package.json to the CARGO_PKG_VERSION one instead, it's easier to achieve this in Rust. The only thing that we will need to change to this to happen is sync the package.json bump version to the cargo.toml too.

DanielHe4rt commented 1 month ago

Hmm, since it will be generating a binary every time I don't think that this can be an issue. We will just have to change this in the Rust side for the versioning...

Apparently Scylla folks are defining a name like the one I sent here so it's only up to versioning.