diff --git a/.github/workflows/rust_tag_and_deploy.yml b/.github/workflows/rust_tag_and_deploy.yml index 39367fcd..1ed9cfe6 100644 --- a/.github/workflows/rust_tag_and_deploy.yml +++ b/.github/workflows/rust_tag_and_deploy.yml @@ -71,7 +71,7 @@ jobs: - name: Deploy using tag working-directory: ./ahnlich run: | - # cargo publish -p ahnlich_types --token '${{secrets.CARGO_TOKEN}}' + cargo publish -p ahnlich_types --token '${{secrets.CARGO_TOKEN}}' # Removing dev dependencies as those use * and are only locally available sed -i '/^\[dev-dependencies\]/,/^\[/{//!d; /^\[dev-dependencies\]/s/.*/ /}' client/Cargo.toml cargo publish --allow-dirty -p ahnlich_client_rs --token '${{secrets.CARGO_TOKEN}}' diff --git a/README.md b/README.md index 4a919417..8e251c22 100644 --- a/README.md +++ b/README.md @@ -61,60 +61,3 @@ The DB can be used without the AI proxy for more fine grained control of the gen ### Contributing View [contribution guide](CONTRIBUTING.md) - -### Version Format - -`//` - -Where: -- TYPE: Bin, Client, -- NAME: AI, DB, PY, RS -- VERSION_NUMBER: Semver - - -### How Deployments and Releases Work - -Ahnlich maintains two separate versioning systems: **Protocol Versions** and **Client Versions**. Understanding how these interact is key to managing releases across binaries, libraries, and Docker images. - -#### Protocol and Client Versioning -- The **Protocol Version** represents changes to the underlying communication standard between different Ahnlich components. Major bump to this version can introduce breaking changes, meaning requests made by outdated clients will be rejected. -- The **Client Version** tracks updates to the client libraries. These are versioned separately but are often synchronized with protocol updates to ensure compatibility. - -##### Bumping Protocol Versions -- To bump both the Protocol and Client versions simultaneously, use the following command: - ```bash - make bump-protocol-version BUMP_RULE=[major, minor, patch] - ``` - This will trigger deployments for all relevant binaries (like AI, CLI, and DB) as well as client libraries. -- Major changes to the Protocol Version may involve breaking changes, so ahnlich AI or DB rejects a connection when the major version don't match. - -##### Bumping Individual Package/Crate Versions -- The Makefile contains additional commands for selectively bumping versions of crate or lib within the workspace. - -#### Releasing New Binaries (AI, CLI, DB), Images and Client Libs -When deploying new binaries, the updated versions are pushed to their respective Artifactory repositories. The workflow is as follows: - -##### Binaries and Docker Images -1. **Bump the Protocol Version**: Use the appropriate Makefile commands to bump versions for AI, CLI, or DB binaries or client Libs. - -2. Submit a PR to main -3. Once merged, Create a tag using the the ahnlich tag format -4. Create a Release from tag which triggers building of binaries and docker images - -##### Client Libraries (Example Python) - -- Update the `MSG_TAG` file with a new tag message. -- From a feature branch, bump the version using: - ```bash - make bump-py-client BUMP_RULE=[major, minor, patch] - ``` - or - ```bash - poetry run bumpversion [major, minor, patch] - ``` -- Open a PR to Main -- Once merged, this automatically creates a tags if a change to the version file is detected and deploys the lib to it's artifactory. - - - - diff --git a/ahnlich/Cargo.lock b/ahnlich/Cargo.lock index 40729d22..0065fa72 100644 --- a/ahnlich/Cargo.lock +++ b/ahnlich/Cargo.lock @@ -32,7 +32,7 @@ dependencies = [ [[package]] name = "ahnlich_client_rs" -version = "0.1.0" +version = "0.0.0" dependencies = [ "ahnlich_types", "ai", diff --git a/ahnlich/client/Cargo.toml b/ahnlich/client/Cargo.toml index 1c352b36..08e2d783 100644 --- a/ahnlich/client/Cargo.toml +++ b/ahnlich/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ahnlich_client_rs" -version = "0.1.0" +version = "0.0.0" authors = ["Diretnan Domnan "] categories = ["database-implementations", "database", "web-programming"] keywords = ["ahnlich", "in-memory", "ai"] diff --git a/ahnlich/types/README.md b/ahnlich/types/README.md new file mode 100644 index 00000000..cd6221b2 --- /dev/null +++ b/ahnlich/types/README.md @@ -0,0 +1,29 @@ +## Ahnlich Types + +Types used by the ahnlich rust client + + +[![Crates.io](https://img.shields.io/crates/v/ahnlich_types.svg)](https://crates.io/crates/ahnlich_types) +[![Documentation](https://docs.rs/ahnlich_types/badge.svg)](https://docs.rs/ahnlich_types/) +[![Ahnlich TestSuite](https://github.com/deven96/ahnlich/actions/workflows/test.yml/badge.svg)](https://github.com/deven96/ahnlich/actions/workflows/test.yml) +[![Ahnlich Types Tag and Deploy](https://github.com/deven96/ahnlich/actions/workflows/rust_tag_and_deploy.yml/badge.svg)](https://github.com/deven96/ahnlich/actions/workflows/rust_tag_and_deploy.yml) + +## Usage Overview + +The following topics are covered: +* [Installation](#installation) +* [Change Log](#change-log) + +## Installation + +```bash +cargo add ahnlich_types +``` + +## Change Log + +| Version| Description | +| -------|:-------------:| +| 0.0.0 | Adding types for version 0.0.0 | + + diff --git a/docs/libgen.md b/docs/libgen.md index 2295d512..036552a3 100644 --- a/docs/libgen.md +++ b/docs/libgen.md @@ -22,3 +22,56 @@ Available languages are: In order to communicate effectively with the ahnlich db, you would have to extend the bincode serialization protocol automatically provided by `serde_generate`. Your message(in bytes) should be serialized and deserialized in the following format => `AHNLICH_HEADERS` + `VERSION` + `QUERY/SERVER_RESPONSE`. Bytes are `Little Endian`. +### Version Format + +`//` + +Where: +- TYPE: Bin, Client, +- NAME: AI, DB, PY, RS +- VERSION_NUMBER: Semver + + +### How Deployments and Releases Work + +Ahnlich maintains two separate versioning systems: **Protocol Versions** and **Client Versions**. Understanding how these interact is key to managing releases across binaries, libraries, and Docker images. + +#### Protocol and Client Versioning +- The **Protocol Version** represents changes to the underlying communication standard between different Ahnlich components. Major bump to this version can introduce breaking changes, meaning requests made by outdated clients will be rejected. +- The **Client Version** tracks updates to the client libraries. These are versioned separately but are often synchronized with protocol updates to ensure compatibility. + +##### Bumping Protocol Versions +- To bump both the Protocol and Client versions simultaneously, use the following command: + ```bash + make bump-protocol-version BUMP_RULE=[major, minor, patch] + ``` + This will trigger deployments for all relevant binaries (like AI, CLI, and DB) as well as client libraries. +- Major changes to the Protocol Version may involve breaking changes, so ahnlich AI or DB rejects a connection when the major version don't match. + +##### Bumping Individual Package/Crate Versions +- The Makefile contains additional commands for selectively bumping versions of crate or lib within the workspace. + +#### Releasing New Binaries (AI, CLI, DB), Images and Client Libs +When deploying new binaries, the updated versions are pushed to their respective Artifactory repositories. The workflow is as follows: + +##### Binaries and Docker Images +1. **Bump the Protocol Version**: Use the appropriate Makefile commands to bump versions for AI, CLI, or DB binaries or client Libs. + +2. Submit a PR to main +3. Once merged, Create a tag using the the ahnlich tag format +4. Create a Release from tag which triggers building of binaries and docker images + +##### Client Libraries (Example Python) + +- Update the `MSG_TAG` file with a new tag message. +- From a feature branch, bump the version using: + ```bash + make bump-py-client BUMP_RULE=[major, minor, patch] + ``` + or + ```bash + poetry run bumpversion [major, minor, patch] + ``` +- Open a PR to Main +- Once merged, this automatically creates a tags if a change to the version file is detected and deploys the lib to it's artifactory. +