Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
245cd32
refactor: minor refactor
fengjiachun Jun 23, 2025
6618897
feat: filght encoder
fengjiachun Jun 23, 2025
64f5f48
feat: bulk insert example
fengjiachun Jun 23, 2025
f86ba1c
chore: remove unused code
fengjiachun Jun 23, 2025
f5bee9c
feat: bulk stream writer
fengjiachun Jun 25, 2025
04b94e1
chore: no panic
fengjiachun Jun 26, 2025
17cc18b
feat: write record batch parallel
fengjiachun Jun 26, 2025
a4f6c38
chore: minor refactor
fengjiachun Jun 26, 2025
9f27b32
feat: docs
fengjiachun Jun 26, 2025
a843432
feat: integration test
fengjiachun Jun 26, 2025
a505967
chore: method name, without_compression
fengjiachun Jun 26, 2025
d4c76f1
chore: fix integration test
fengjiachun Jun 26, 2025
bfca1af
chore: intergration test CI
fengjiachun Jun 26, 2025
c7811be
feat: use duration to set timeout
fengjiachun Jun 26, 2025
e2f6d6e
chore: remove drop for BulkStreamWriter
fengjiachun Jun 26, 2025
4d820e3
Update README.md
fengjiachun Jun 27, 2025
1cd5deb
Update examples/README.md
fengjiachun Jun 27, 2025
db5c2f2
fix: clippy
fengjiachun Jun 27, 2025
b4d037a
fix: clippy
fengjiachun Jun 27, 2025
18532f3
fix: clippy
fengjiachun Jun 27, 2025
f654fd4
Update README.md
fengjiachun Jun 27, 2025
16bc3c1
chore: timeout for wait stream next item
fengjiachun Jun 27, 2025
28c12c2
chore: let wait_for_all_pending can timeout
fengjiachun Jun 27, 2025
9c73046
feat: make pending_requests and completed_resposne simply
fengjiachun Jun 27, 2025
f8fac63
feat: rm readme_test and make rust code in readme can compile
fengjiachun Jun 27, 2025
05fd172
fix: by comment
fengjiachun Jun 27, 2025
dc93ce2
chore: refactor request_id
fengjiachun Jun 27, 2025
05c134a
chore: refactor wait_for_all_pending
fengjiachun Jun 27, 2025
dda9971
chore: minor change
fengjiachun Jun 27, 2025
a4fdd5f
fix: make all stream operations can timeout
fengjiachun Jun 27, 2025
e1644d3
chore: minor change
fengjiachun Jun 27, 2025
cca7582
fix: improve concurrency control in process_pending_responses
fengjiachun Jun 27, 2025
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
66 changes: 66 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Integration Tests

on:
push:
branches: [ master, main, develop ]
pull_request:
branches: [ master, main, develop ]
schedule:
# Run integration tests daily at 2 AM UTC
- cron: '0 2 * * *'

env:
CARGO_TERM_COLOR: always
GREPTIMEDB_TEST_ENDPOINT: localhost:4001
GREPTIMEDB_TEST_DATABASE: public

jobs:
integration-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
key: integration-tests

- name: Install Protocol Buffers compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
protoc --version

- name: Run format check
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build project
run: cargo build --release

- name: Run unit tests
run: cargo test --lib

- name: Start GreptimeDB with Docker Compose
run: |
docker compose -f docker-compose.test.yml up -d
timeout 60 bash -c 'until curl -f http://localhost:4000/health; do sleep 1; done'
echo "GreptimeDB is ready!"

- name: Run integration tests
run: cargo test --test integration --features integration-tests --verbose
env:
RUST_LOG: info

- name: Cleanup
run: docker compose -f docker-compose.test.yml down -v
if: always()
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/Cargo.lock
.DS_Store
40 changes: 33 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,50 @@ license = "Apache-2.0"
description = "A rust client for GreptimeDB gRPC protocol"

[dependencies]
arrow = { version = "54.2", features = ["prettyprint"] }
arrow-array = { version = "54.2", default-features = false, features = ["chrono-tz"] }
arrow-flight = "54.2"
arrow-ipc = { version = "54.2", default-features = false, features = ["lz4", "zstd"] }
arrow-schema = { version = "54.2", features = ["serde"] }
async-stream = "0.3"
async-trait = "0.1"
base64 = "0.22"
dashmap = "6.1"
enum_dispatch = "0.3"
flatbuffers = "24"
futures = "0.3"
futures-util = "0.3"
greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", tag = "v0.9.0" }
greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", rev = "454c52634c3bac27de10bf0d85d5533eed1cf03f" }
hyper = "1.1"
lazy_static = "1.4"
parking_lot = "0.12"
prost = "0.12"
prost = { version = "0.13", features = ["no-recursion-limit"] }
rand = "0.9"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["float_roundtrip"] }
snafu = "0.8"
tokio = { version = "1", features = ["rt", "time"] }
tokio = { version = "1.40", features = ["full"] }
tokio-stream = { version = "0.1", features = ["net"] }
tonic = { version = "0.11", features = ["tls", "tls-roots", "gzip", "zstd"] }
tower = "0.4"
tokio-util = { version = "0.7", features = ["io-util", "compat"] }
tonic = { version = "0.12", features = ["tls", "gzip", "zstd"] }
tower = "0.5"
derive_builder = "0.20"

[build-dependencies]
tonic-build = "0.9"
tonic-build = "0.11"

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
hyper-util = "0.1"
tokio = { version = "1.40", features = ["full"] }
derive-new = "0.7"

# Integration tests configuration
[[test]]
name = "integration"
path = "tests/integration/integration_test.rs"
harness = true
required-features = ["integration-tests"]

[features]
default = []
integration-tests = []
Loading