Skip to content

Feat: Add Kafka integration for Parseable server #936 . #1047

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

Merged
merged 97 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
4cc28cd
Feat: Add Kafka integration for Parseable server #936 .
hippalus Dec 21, 2024
06364b5
Merge remote-tracking branch 'origin' into kafka-integration
hippalus Dec 21, 2024
f085a79
fix conflicts
hippalus Dec 21, 2024
d32eae5
update cli.rs
hippalus Dec 21, 2024
693b9c9
remove unused fn from metadata.rs
hippalus Dec 21, 2024
3cc6b0e
add Copyright
hippalus Dec 21, 2024
12f0358
fix deepsource issues
hippalus Dec 21, 2024
0f6ca53
fix deepsource issues on shutdown.rs
hippalus Dec 21, 2024
58cc468
Add .idea to .gitignore
hippalus Dec 21, 2024
aff48a2
Add Kafka cluster setup to docker-compose files and refactor Dockerfi…
hippalus Dec 22, 2024
9ce1031
feat(metrics): add KafkaMetricsCollector for Prometheus integration .
hippalus Dec 23, 2024
6719a0e
Merge branch 'main' into kafka-integration
hippalus Dec 23, 2024
d8d0558
fix kafka metrics collector registeration
hippalus Dec 24, 2024
6ad0805
Merge branch 'main' into kafka-integration
hippalus Dec 26, 2024
4d13ee2
Refactor connector configurations to adapt parseable cli options.
hippalus Dec 26, 2024
d26d4de
Refactor metrics.rs to reduce cyclomatic complexity.
hippalus Dec 26, 2024
7604bc5
Refactor chunk size configuration
hippalus Dec 26, 2024
3a0fbb0
use comment instead todo! macro
hippalus Dec 26, 2024
7f94f3a
add license header
hippalus Dec 26, 2024
bfb4071
cargo update
hippalus Dec 26, 2024
73a8659
add resource limits for docker containers
hippalus Dec 26, 2024
9afc8d9
Merge branch 'main' into kafka-integration
hippalus Dec 27, 2024
bb3b5cb
scale down kafka broker to single node since OOM on integration test …
hippalus Dec 27, 2024
2df4727
add Install dependencies step to coverage.yaml
hippalus Dec 27, 2024
839bef8
improve logging and err handling
hippalus Dec 28, 2024
935fc40
change log rate
hippalus Dec 28, 2024
a44582d
comment out kafka-ui in docker-compose
hippalus Dec 28, 2024
8937c4d
refactor py script
hippalus Dec 28, 2024
0064727
refactor py script
hippalus Dec 28, 2024
5355634
update dist-test with LOG_RATE=500 TOTAL_LOGS=50000
hippalus Dec 28, 2024
32c17bd
update dist-test with topic REPLICATION_FACTOR=3
hippalus Dec 28, 2024
cc236d0
Separate kafka and standard dockerfiles. Add conditional compilation …
hippalus Dec 30, 2024
7be0ca8
Merge branch 'main' into kafka-integration
hippalus Dec 31, 2024
aade3a8
fix rust fmt
hippalus Dec 31, 2024
9ba40b5
Use dedicated runtime for KafkaSinkConnector to ensure true parallelism.
hippalus Jan 2, 2025
ecbd655
Merge branch 'main' into kafka-integration
hippalus Jan 4, 2025
5c67134
add schema version when deserialize ParseableEvent
hippalus Jan 4, 2025
ce2fca0
rename Event as ParseableEvent
hippalus Jan 4, 2025
835e9b9
-v flag to clean up volumes when stopping containers. Remove the erro…
hippalus Jan 4, 2025
3b7e3bb
Merge branch 'main' into kafka-integration
hippalus Jan 5, 2025
2364abb
Merge branch 'main' into kafka-integration
hippalus Jan 6, 2025
06c97f3
Merge branch 'main' into kafka-integration
hippalus Jan 6, 2025
4ecba10
Merge remote-tracking branch 'origin/kafka-integration' into kafka-in…
hippalus Jan 6, 2025
bb12d04
fix ParseableSinkProcessor.deserialize
hippalus Jan 6, 2025
3fa6029
Merge branch 'main' into kafka-integration
hippalus Jan 6, 2025
cd62476
Merge branch 'main' into kafka-integration
hippalus Jan 7, 2025
84135ed
Merge branch 'main' into kafka-integration
hippalus Jan 7, 2025
736af65
fix ParseableSinkProcessor.deserialize
hippalus Jan 7, 2025
c5f61c2
Merge branch 'main' into kafka-integration
hippalus Jan 7, 2025
62b6b33
Merge branch 'main' into kafka-integration
hippalus Jan 7, 2025
5d90cd4
Merge branch 'main' into kafka-integration
hippalus Jan 8, 2025
803983f
Merge branch 'main' into kafka-integration
hippalus Jan 8, 2025
bd0043e
Merge branch 'main' into kafka-integration
hippalus Jan 9, 2025
574d4cd
Merge branch 'main' into kafka-integration
hippalus Jan 12, 2025
f1d2606
update build.rs
hippalus Jan 12, 2025
e399f0b
fix comment
hippalus Jan 12, 2025
d5256fd
fmt
hippalus Jan 12, 2025
7e878e2
kafka-streams-thread name
hippalus Jan 12, 2025
595baaa
Introduced haproxy to support Kafka consumer rebalance testing and di…
hippalus Jan 12, 2025
a126913
Merge branch 'main' into kafka-integration
hippalus Jan 12, 2025
7eddf03
Update log generator to send kube logs to kafka
hippalus Jan 12, 2025
92d41cf
Merge remote-tracking branch 'origin/main' into kafka-integration
Jan 18, 2025
1226fb2
fix: missing subcommand name
Jan 18, 2025
5b5e7b0
remove unused code
Jan 18, 2025
ee75e4a
Merge pull request #2 from de-sh/kafka-integration
hippalus Jan 21, 2025
895929f
Merge branch 'main' into kafka-integration
hippalus Jan 21, 2025
63b9bc5
Merge branch 'main' into kafka-integration
hippalus Jan 26, 2025
13c23e9
Refactor connector cli options and processor.rs to handle batch events.
hippalus Jan 27, 2025
1e23d37
up step rust to 1.84
hippalus Jan 27, 2025
033597a
Merge branch 'main' into kafka-integration
hippalus Jan 27, 2025
ddea62e
Add RUST_LOG env and add feature flags to build.yaml workflow.
hippalus Jan 27, 2025
a0116af
add OpenSSL setup to build.yaml workflow.
hippalus Jan 27, 2025
b02b2a1
update build.yaml
hippalus Jan 27, 2025
689318f
update build.yaml
hippalus Jan 27, 2025
b471528
update build.yaml
hippalus Jan 27, 2025
f82773c
Merge branch 'main' into kafka-integration
hippalus Jan 28, 2025
549ac42
configure kafka future and build workflow
hippalus Jan 28, 2025
4508698
install sasl
hippalus Jan 28, 2025
af476e4
install ca-cert
hippalus Jan 28, 2025
751ab01
install sasl2
hippalus Jan 28, 2025
4ba221e
install sasl2
hippalus Jan 28, 2025
b184ed5
build essential
hippalus Jan 28, 2025
5f2bf05
Use separate jobs for kafka and default build.
hippalus Jan 29, 2025
a1a7e8b
Use separate jobs for kafka and default build.
hippalus Jan 29, 2025
40a91f8
update kafka build dep
hippalus Jan 29, 2025
c2cebda
Merge branch 'main' into kafka-integration
nitisht Jan 30, 2025
f40f85c
Merge branch 'main' into kafka-integration
hippalus Jan 30, 2025
14a9d4b
remove aarch64-unknown-linux-gnu for kafka builds
hippalus Jan 30, 2025
f17dc5f
add topic validation and sasl-sys
hippalus Jan 30, 2025
6070418
disable x86_64-apple-darwin in kafka build
hippalus Jan 30, 2025
a961fbc
Merge branch 'main' into kafka-integration
hippalus Jan 31, 2025
478a766
Merge branch 'main' into kafka-integration
nitisht Feb 1, 2025
1a0414d
Merge branch 'main' into kafka-integration
nikhilsinhaparseable Feb 3, 2025
5e4a102
remove RUST_LOG=info
nikhilsinhaparseable Feb 3, 2025
9b81632
Merge branch 'main' into kafka-integration
hippalus Feb 3, 2025
9b30687
Apply suggestions from code review
nitisht Feb 4, 2025
4eaf7bf
Update docker-compose-distributed-test.yaml
nitisht Feb 4, 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
45 changes: 45 additions & 0 deletions .github/workflows/build-push-edge-kafka.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and push edge kafka tag

on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
- 'helm/**'
- 'assets/**'
- '**.md'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: parseable/parseable

- name: Build and push
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: ./Dockerfile.kafka
push: true
tags: parseable/parseable:edge-kafka
platforms: linux/amd64,linux/arm64
165 changes: 120 additions & 45 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Ensure parseable builds on all release targets

on:
pull_request:
paths-ignore:
Expand All @@ -6,68 +8,141 @@ on:
- "assets/**"
- "**.md"

name: Ensure parseable builds on all release targets
jobs:
build-linux:
name: Build for ${{matrix.target}}
runs-on: ubuntu-latest
# Default build without Kafka
build-default:
name: Build Default ${{matrix.target}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu # linux(arm)
- x86_64-unknown-linux-gnu # linux(64 bit)
include:
# Linux builds
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
# macOS builds
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
# Windows build
- os: windows-latest
target: x86_64-pc-windows-msvc

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- uses: actions-rs/toolchain@v1
- name: Cache dependencies
uses: actions/cache@v4
with:
toolchain: stable
profile: minimal # minimal component installation (ie, no documentation)
target: ${{ matrix.target }}
override: true
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ matrix.target }}-default-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
use-cross: ${{ runner.os == 'Linux' }}
command: build
args: --target ${{matrix.target}}
args: --target ${{ matrix.target }} --release

build-windows:
name: Build for windows
runs-on: windows-latest
# Kafka build for supported platforms
build-kafka:
name: Build Kafka ${{matrix.target}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Linux builds
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal # minimal component installation (ie, no documentation)
default: true
override: true
# Linux-specific dependencies
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
pkg-config \
cmake \
clang \
zlib1g-dev \
libzstd-dev \
liblz4-dev \
libssl-dev \
libsasl2-dev \
python3 \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu

# Install cross-compilation specific packages
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
sudo apt-get install -y \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
libc6-dev-arm64-cross \
libsasl2-dev:arm64 \
libssl-dev:arm64 \
pkg-config-aarch64-linux-gnu
fi

- name: Build on windows
run: cargo build --target x86_64-pc-windows-msvc

build-macos:
name: Build for ${{matrix.target}}
runs-on: macos-latest
strategy:
matrix:
target:
- aarch64-apple-darwin # macos(arm)
- x86_64-apple-darwin # macos(intel 64 bit)
# macOS-specific dependencies
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
brew install \
cmake \
llvm \
pkg-config \
zstd \
lz4 \
[email protected] \
cyrus-sasl \
python3

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}

- name: Build on ${{ matrix.target }}
run: cargo build --target ${{ matrix.target }}
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ matrix.target }}-kafka-${{ hashFiles('**/Cargo.lock') }}

- name: Build with Kafka
uses: actions-rs/cargo@v1
with:
use-cross: ${{ runner.os == 'Linux' }}
command: build
args: --target ${{ matrix.target }} --features kafka --release
env:
LIBRDKAFKA_SSL_VENDORED: 1
PKG_CONFIG_ALLOW_CROSS: "1"
PKG_CONFIG_PATH: "/usr/lib/aarch64-linux-gnu/pkgconfig"
SASL2_DIR: "/usr/lib/aarch64-linux-gnu"
OPENSSL_DIR: "/usr/lib/aarch64-linux-gnu"
OPENSSL_ROOT_DIR: "/usr/lib/aarch64-linux-gnu"
OPENSSL_STATIC: "1"
SASL2_STATIC: "0"
14 changes: 12 additions & 2 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand All @@ -24,13 +24,23 @@ jobs:
with:
tool: cargo-hack, cargo-llvm-cov, nextest

- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libsasl2-dev \
libssl-dev \
pkg-config \
build-essential
if: runner.os == 'Linux'

- name: Check with clippy
run: cargo hack clippy --verbose --each-feature --no-dev-deps -- -D warnings

- name: Tests
run: cargo hack --each-feature llvm-cov --no-report nextest

- name: Genrate coverage report
- name: Generate coverage report
run: cargo llvm-cov report --lcov --output-path coverage.lcov

- name: Upload Coverage Report
Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,45 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Start compose
run: docker compose -f docker-compose-test.yaml up --build --exit-code-from quest
- name: Stop compose
if: always()
run: docker compose -f docker-compose-test.yaml down
run: docker compose -f docker-compose-test.yaml down -v

docker-compose-distributed-test:
name: Quest Smoke and Load Tests for Distributed deployments
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Start compose
run: docker compose -f docker-compose-distributed-test.yaml up --build --exit-code-from quest
- name: Stop compose
if: always()
run: docker compose -f docker-compose-distributed-test.yaml down
run: docker compose -f docker-compose-distributed-test.yaml down -v

docker-compose-test-with-kafka:
name: Quest Smoke and Load Tests for Standalone deployments with Kafka
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start compose
run: docker compose -f docker-compose-test-with-kafka.yaml up --build --exit-code-from quest
- name: Stop compose
if: always()
run: docker compose -f docker-compose-test-with-kafka.yaml down -v

docker-compose-distributed-test-with-kafka:
name: Quest Smoke and Load Tests for Distributed deployments with Kafka
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start compose
run: docker compose -f docker-compose-distributed-test-with-kafka.yaml up --build --exit-code-from quest
- name: Stop compose
if: always()
run: docker compose -f docker-compose-distributed-test-with-kafka.yaml down -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ parseable
parseable_*
parseable-env-secret
cache
.idea
Loading
Loading