Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix annoying pipeline 7 #160

Merged
merged 2 commits into from
Dec 2, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/rust_tag_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}'
57 changes: 0 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

`<TYPE>/<NAME>/<VERSION_NUMBER>`

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.




2 changes: 1 addition & 1 deletion ahnlich/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ahnlich/client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ahnlich_client_rs"
version = "0.1.0"
version = "0.0.0"
authors = ["Diretnan Domnan <diretnandomnan@gmail.com>"]
categories = ["database-implementations", "database", "web-programming"]
keywords = ["ahnlich", "in-memory", "ai"]
Expand Down
29 changes: 29 additions & 0 deletions ahnlich/types/README.md
Original file line number Diff line number Diff line change
@@ -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 |


53 changes: 53 additions & 0 deletions docs/libgen.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

`<TYPE>/<NAME>/<VERSION_NUMBER>`

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.

Loading