-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Transform into production-ready key-value store #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,149 @@ | ||||||||||||||||||||||||||||||
| name: CI | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||
| branches: [ main, master ] | ||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||
| branches: [ main, master ] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||
| CARGO_TERM_COLOR: always | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||
| test: | ||||||||||||||||||||||||||||||
| name: Test | ||||||||||||||||||||||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||||||||||||||||||||||||||||||
| rust: [stable, beta, nightly] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install Rust | ||||||||||||||||||||||||||||||
| uses: actions-rs/toolchain@v1 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| toolchain: ${{ matrix.rust }} | ||||||||||||||||||||||||||||||
| override: true | ||||||||||||||||||||||||||||||
| components: rustfmt, clippy | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Cache cargo registry | ||||||||||||||||||||||||||||||
| uses: actions/cache@v3 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| path: ~/.cargo/registry | ||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Cache cargo index | ||||||||||||||||||||||||||||||
| uses: actions/cache@v3 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| path: ~/.cargo/git | ||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Cache cargo build | ||||||||||||||||||||||||||||||
| uses: actions/cache@v3 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| path: target | ||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install dependencies (Ubuntu only) | ||||||||||||||||||||||||||||||
| if: matrix.os == 'ubuntu-latest' | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||||||||||||||
| sudo apt-get install -y libssl-dev pkg-config | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Check formatting | ||||||||||||||||||||||||||||||
| run: cargo fmt --all -- --check | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Run clippy | ||||||||||||||||||||||||||||||
| run: cargo clippy --all-targets --all-features -- -D warnings | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Build | ||||||||||||||||||||||||||||||
| run: cargo build --verbose --all | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Run tests | ||||||||||||||||||||||||||||||
| run: cargo test --verbose --all | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Run integration tests | ||||||||||||||||||||||||||||||
| run: cargo test --test integration_tests | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| benchmark: | ||||||||||||||||||||||||||||||
| name: Benchmark | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install Rust | ||||||||||||||||||||||||||||||
| uses: actions-rs/toolchain@v1 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| toolchain: stable | ||||||||||||||||||||||||||||||
| override: true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
Comment on lines
+79
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same: modernize toolchain action in benchmark job. Apply this diff: - - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- override: true
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@stable📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.7)79-79: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| - name: Cache cargo registry | ||||||||||||||||||||||||||||||
| uses: actions/cache@v3 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| path: ~/.cargo/registry | ||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Cache cargo index | ||||||||||||||||||||||||||||||
| uses: actions/cache@v3 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| path: ~/.cargo/git | ||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Cache cargo build | ||||||||||||||||||||||||||||||
| uses: actions/cache@v3 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| path: target | ||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Run benchmarks | ||||||||||||||||||||||||||||||
| run: cargo bench | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| security: | ||||||||||||||||||||||||||||||
| name: Security Audit | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install Rust | ||||||||||||||||||||||||||||||
| uses: actions-rs/toolchain@v1 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| toolchain: stable | ||||||||||||||||||||||||||||||
| override: true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
Comment on lines
+113
to
+117
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update toolchain action in security job. Apply this diff: - - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- override: true
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@stable📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.7)113-113: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| - name: Install cargo-audit | ||||||||||||||||||||||||||||||
| run: cargo install cargo-audit | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Run security audit | ||||||||||||||||||||||||||||||
| run: cargo audit | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| coverage: | ||||||||||||||||||||||||||||||
| name: Coverage | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install Rust | ||||||||||||||||||||||||||||||
| uses: actions-rs/toolchain@v1 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| toolchain: stable | ||||||||||||||||||||||||||||||
| override: true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
Comment on lines
+132
to
+136
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update toolchain action in coverage job. Apply this diff: - - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- override: true
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@stable📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.7)132-132: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| - name: Install cargo-tarpaulin | ||||||||||||||||||||||||||||||
| run: cargo install cargo-tarpaulin | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Generate coverage report | ||||||||||||||||||||||||||||||
| run: cargo tarpaulin --out Xml | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Upload coverage to Codecov | ||||||||||||||||||||||||||||||
| uses: codecov/codecov-action@v3 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| file: ./cobertura.xml | ||||||||||||||||||||||||||||||
| flags: unittests | ||||||||||||||||||||||||||||||
| name: codecov-umbrella | ||||||||||||||||||||||||||||||
| fail_ci_if_error: false | ||||||||||||||||||||||||||||||
|
Comment on lines
+143
to
+149
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update Codecov action to v4. Apply this diff: - - name: Upload coverage to Codecov
- uses: codecov/codecov-action@v3
- with:
- file: ./cobertura.xml
- flags: unittests
- name: codecov-umbrella
- fail_ci_if_error: false
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v4
+ with:
+ files: ./cobertura.xml
+ flags: unittests
+ name: codecov-umbrella
+ fail_ci_if_error: false📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.7)144-144: the runner of "codecov/codecov-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [1.0.0] - 2024-01-XX | ||
|
|
||
| ### Added | ||
| - Complete rewrite of the key-value store with production-ready features | ||
| - Transaction support with ACID compliance | ||
| - Multiple serialization formats (JSON, Bincode, MessagePack) | ||
| - Comprehensive CLI with subcommands | ||
| - Interactive mode for database operations | ||
| - Configuration management with TOML files and environment variables | ||
| - Structured logging with tracing | ||
| - Import/export functionality for JSON data | ||
| - Backup and restore capabilities | ||
| - In-memory and persistent file-based storage engines | ||
| - Comprehensive test suite with integration tests | ||
| - Performance benchmarks | ||
| - GitHub Actions CI/CD pipeline | ||
| - Security audit integration | ||
| - Code coverage reporting | ||
| - Cross-platform support (Windows, macOS, Linux) | ||
|
|
||
| ### Changed | ||
| - Upgraded from Rust 2018 to Rust 2021 edition | ||
| - Modernized dependencies with latest stable versions | ||
| - Improved error handling with custom error types | ||
| - Enhanced performance with optimized data structures | ||
|
|
||
| ### Removed | ||
| - Legacy simple text-based storage format | ||
| - Old CLI argument parsing | ||
| - Deprecated dependencies | ||
|
|
||
| ## [0.1.0] - 2023-XX-XX | ||
|
|
||
| ### Added | ||
| - Initial simple key-value store implementation | ||
| - Basic CLI with path, key, and value arguments | ||
| - Simple file-based storage with tab-separated format | ||
| - Basic HashMap-based in-memory operations | ||
|
|
||
| --- | ||
|
|
||
| ## Future Releases | ||
|
|
||
| ### Planned Features | ||
| - Distributed storage support | ||
| - REST API server | ||
| - WebSocket support | ||
| - Advanced indexing | ||
| - Compression support | ||
| - Encryption at rest | ||
| - Replication | ||
| - Clustering support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update deprecated GitHub Actions.
actions-rs/toolchain@v1 uses a deprecated runtime. Switch to dtolnay/rust-toolchain.
Apply this diff:
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.7)
25-25: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents