Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4f9e237
feat: 🌈 rrdcached work in progress
fungiboletus Aug 26, 2025
3236511
style: ✨ please the linter
fungiboletus Aug 26, 2025
8b90b29
feat: ⬆️ Dependencies update
fungiboletus Oct 17, 2025
c3a953f
feat: 🔧 some clickhouse work
fungiboletus Oct 24, 2025
0536bf4
feat: ⬆️ dependencies update
fungiboletus Oct 24, 2025
2ae9ace
feat: 🔥 remove old vibecoded documentation
fungiboletus Oct 24, 2025
a8d6074
feat: 🚛 only http no ingestors
fungiboletus Oct 24, 2025
732b592
fix: ⚡️ optimise vibe coding shit
fungiboletus Oct 28, 2025
5b6179f
feat: 🌈 sensors pagination and prometheus reads in one single commit
fungiboletus Oct 28, 2025
bc8b822
feat: 🔧 old unstaged changes
fungiboletus Mar 10, 2026
c419a80
Merge branch 'rrdcached' into main
fungiboletus Mar 10, 2026
30eca01
Merge branch 'vibe-coding-2' into main
fungiboletus Mar 10, 2026
f7393e2
fix: resolve post-merge compilation and formatting issues
fungiboletus Mar 10, 2026
e8b8dfd
chore: add task tracking system and document branch merge outcomes
fungiboletus Mar 10, 2026
df74814
feat: 🌈 work in progress, this is a commit message
fungiboletus Mar 10, 2026
b0e6822
feat: Refactor InfluxDB and Prometheus integration tests
fungiboletus Mar 10, 2026
e4c6812
feat: 🌈 work in progress, again
fungiboletus Mar 10, 2026
b281c57
feat: 🌈 work in progress, again
fungiboletus Mar 10, 2026
a5f2d11
feat: 🐳 docker and kubernetes
fungiboletus Mar 10, 2026
d5d603e
feat: 🌈 work in progress, again
fungiboletus Mar 10, 2026
a9cb176
feat: 🔧 chores
fungiboletus Mar 10, 2026
f59a465
feat: 🙈 vibecoding like a madman: haters gonna hate
fungiboletus Mar 10, 2026
9f300d7
feat: 🔥 are we getting somewhere ?
fungiboletus Mar 16, 2026
79d8116
feat: 🙈 vibecoding again
fungiboletus Mar 16, 2026
5443da9
feat: 🙈 vibecodiiiiing
fungiboletus Mar 16, 2026
9a12f1f
feat: 😊 again
fungiboletus Mar 17, 2026
7aeb5b4
feat: ✨ rrdcached imprevements
fungiboletus Mar 17, 2026
9cca6ab
feat: ✨ clickhouse improvements
fungiboletus Mar 17, 2026
0127150
feat: 😬 updating depnedencies is hard
fungiboletus Mar 17, 2026
aa41e86
feat: 🌈 it starts to work
fungiboletus Mar 17, 2026
138c9dc
feat: ✨ work in progress vibe coding
fungiboletus Apr 13, 2026
f778b3c
feat: 🔥 remove previous sdk
fungiboletus Apr 13, 2026
bb5994c
chore: ⬆️ dependencies update
fungiboletus Apr 13, 2026
f9f6a5f
fix: 🐛🏗️ tentative to fix CI
fungiboletus Apr 13, 2026
b8cf790
fix: 🐛🏗️ tentative to fix CI again
fungiboletus Apr 14, 2026
39084fb
fix: 🔥 uncommit symlink…
fungiboletus Apr 14, 2026
c6c4978
fix: 🐛🏗️ tentative to fix CI again
fungiboletus Apr 14, 2026
016ebd9
feat: ✨ more code
fungiboletus Apr 14, 2026
956870a
fix: 🐛🏗️ tentative to fix CI again
fungiboletus Apr 14, 2026
4edce26
fix: 🐛🏗️ tentative to fix CI again
fungiboletus Apr 14, 2026
5993b2b
fix: 🐛🏗️ tentative to fix CI again
fungiboletus Apr 14, 2026
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
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[env]
DUCKDB_DOWNLOAD_LIB = { value = "1", force = false }
DUCKDB_CMAKE_BUILD_TYPE = { value = "Release", force = false }
12 changes: 12 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "sensapp",
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"remoteEnv": {
"DUCKDB_DOWNLOAD_LIB": "1",
"DUCKDB_CMAKE_BUILD_TYPE": "Release"
},
"containerEnv": {
"DUCKDB_DOWNLOAD_LIB": "1",
"DUCKDB_CMAKE_BUILD_TYPE": "Release"
}
}
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.git
.github
current_tasks
done
ideas
target
tmp
reference
docker
compose.test-services.yml
*.db
*.duckdb
*.sqlite
*.log
227 changes: 217 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ on:
pull_request:
release:
types: [published]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
DUCKDB_DOWNLOAD_LIB: "1"
DUCKDB_CMAKE_BUILD_TYPE: Release
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

Expand All @@ -29,7 +32,7 @@ jobs:
components: rustfmt, clippy

- name: Cache cargo-make
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.cargo/bin/cargo-make
key: cargo-make-${{ runner.os }}
Expand All @@ -43,9 +46,65 @@ jobs:
- name: Format check
run: cargo make fmt-check

security-audit:
name: Security Audit
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
channel: stable

- name: Cache cargo-make
uses: actions/cache@v5
with:
path: ~/.cargo/bin/cargo-make
key: cargo-make-${{ runner.os }}

- name: Install cargo-make
run: |
if ! command -v cargo-make &> /dev/null; then
cargo install cargo-make
fi

- name: Security audit
run: cargo make security-audit
continue-on-error: true

frontend:
name: Frontend Quality
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Type check
run: npm run typecheck

- name: Test
run: npm test

- name: Build
run: npm run build

test-matrix:
name: Test Suite
Expand All @@ -57,28 +116,62 @@ jobs:
os: [ubuntu-latest]
rust: [stable]
#rust: [stable, beta]
feature: [sqlite, postgres]
feature: [sqlite, postgres, clickhouse, duckdb, timescaledb, rrdcached]
include:
- feature: sqlite
test-env: "TEST_DATABASE_URL_SQLITE=sqlite://test.db"
- feature: postgres
test-env: "TEST_DATABASE_URL_POSTGRES=postgres://postgres:postgres@localhost:5432/sensapp"
test-env: "TEST_DATABASE_URL_POSTGRES=postgres://postgres:postgres@localhost:5432/sensapp-test"
- feature: clickhouse
test-env: "TEST_DATABASE_URL_CLICKHOUSE=clickhouse://default:password@localhost:8123/sensapp_test"
- feature: duckdb
test-env: "TEST_DATABASE_URL_DUCKDB=duckdb://test.duckdb"
- feature: timescaledb
test-env: "TEST_DATABASE_URL_TIMESCALEDB=timescaledb://postgres:postgres@localhost:5433/sensapp-test"
- feature: rrdcached
test-env: "TEST_DATABASE_URL_RRDCACHED=rrdcached://127.0.0.1:42217?preset=hoarder"

services:
postgres:
image: postgres:18
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: sensapp
POSTGRES_DB: sensapp-test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

clickhouse:
image: clickhouse/clickhouse-server:24.8
env:
CLICKHOUSE_DB: sensapp_test
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: password
options: >-
--health-cmd "clickhouse-client --password password --query 'SELECT 1'"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 8123:8123
- 9000:9000
timescaledb:
image: timescale/timescaledb:2.17.2-pg16
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: sensapp-test
options: >-
--health-cmd "pg_isready -U postgres -d sensapp-test"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 5433:5432
steps:
- name: Checkout repository
uses: actions/checkout@v6
Expand All @@ -90,7 +183,7 @@ jobs:
components: clippy

- name: Cache cargo-make
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.cargo/bin/cargo-make
key: cargo-make-${{ runner.os }}
Expand All @@ -104,6 +197,23 @@ jobs:
- name: Install sqlx-cli
run: cargo install sqlx-cli --no-default-features --features postgres,sqlite

- name: Start RRDCached test service
if: matrix.feature == 'rrdcached'
run: |
docker build -f docker/rrdcached/Dockerfile -t sensapp-rrdcached-test .
docker run -d --name sensapp-rrdcached -p 42217:42217 sensapp-rrdcached-test

for attempt in $(seq 1 30); do
if nc -z 127.0.0.1 42217; then
exit 0
fi

sleep 1
done

docker logs sensapp-rrdcached
exit 1

- name: Set up test environment
run: |
${{ matrix.test-env }}
Expand All @@ -117,9 +227,80 @@ jobs:
if: matrix.feature == 'sqlite'
run: cargo make migrate-sqlite

- name: Run migrations (TimescaleDB)
if: matrix.feature == 'timescaledb'
run: cargo make migrate-timescaledb

- name: Run tests
if: matrix.feature != 'rrdcached'
run: cargo make check-${{ matrix.feature }}

- name: Run RRDCached checks
if: matrix.feature == 'rrdcached'
run: |
export TEST_DATABASE_URL='rrdcached://127.0.0.1:42217?preset=hoarder'
cargo build --features rrdcached --no-default-features
cargo test --features rrdcached --no-default-features storage::rrdcached --lib
cargo test --features rrdcached --no-default-features http::influxdb::tests::test_publish_influxdb -- --exact
cargo test --features rrdcached --no-default-features http::influxdb::tests::test_publish_influxdb_with_numeric_enabled -- --exact
cargo test --features rrdcached --no-default-features --test rrdcached_integration

helm-validation:
name: Helm Validation
runs-on: ubuntu-latest
needs: quality-checks

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

- name: Set up Helm
uses: azure/setup-helm@v4

- name: Lint chart
run: helm lint charts/sensapp

- name: Render chart with SQLite defaults
run: helm template sensapp charts/sensapp

- name: Render chart with PostgreSQL override
run: >-
helm template sensapp charts/sensapp
--set storage.connectionString=postgres://postgres:postgres@postgres:5432/sensapp
--set persistence.enabled=false

docker-smoke:
name: Docker Smoke Build (${{ matrix.name }})
runs-on: ubuntu-latest
needs: quality-checks
strategy:
fail-fast: false
matrix:
include:
- name: runtime
features: postgres,sqlite,timescaledb,duckdb,clickhouse,rrdcached
- name: runtime-bigquery
features: postgres,sqlite,timescaledb,duckdb,clickhouse,rrdcached,bigquery

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

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

- name: Build image variant
uses: docker/build-push-action@v6
with:
context: .
push: false
platforms: linux/amd64
build-args: |
FEATURES=${{ matrix.features }}
NO_DEFAULT_FEATURES=true
cache-from: type=gha
cache-to: type=gha,mode=max

# Disabled temporarily due to timeout issues
# coverage:
# name: Test Coverage
Expand Down Expand Up @@ -154,7 +335,7 @@ jobs:
# uses: taiki-e/install-action@cargo-llvm-cov

# - name: Cache cargo-make
# uses: actions/cache@v4
# uses: actions/cache@v5
# with:
# path: ~/.cargo/bin/cargo-make
# key: cargo-make-${{ runner.os }}
Expand Down Expand Up @@ -183,7 +364,7 @@ jobs:
docker:
name: Docker Build & Push
runs-on: ubuntu-latest
needs: test-matrix
needs: [test-matrix, helm-validation, docker-smoke]
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || github.event_name == 'release')
permissions:
contents: read
Expand Down Expand Up @@ -226,10 +407,36 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
FEATURES=postgres,sqlite,timescaledb,duckdb,clickhouse,rrdcached
NO_DEFAULT_FEATURES=true
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}

helm-package:
name: Helm Package
runs-on: ubuntu-latest
needs: helm-validation
if: github.event_name != 'pull_request'

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

- name: Set up Helm
uses: azure/setup-helm@v4

- name: Package chart
run: |
mkdir -p dist
helm package charts/sensapp --destination dist

- name: Upload chart artifact
uses: actions/upload-artifact@v4
with:
name: sensapp-helm-chart
path: dist/*.tgz

release:
name: Release
runs-on: ubuntu-latest
Expand All @@ -249,7 +456,7 @@ jobs:
channel: stable

- name: Cache cargo-make
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.cargo/bin/cargo-make
key: cargo-make-${{ runner.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v3
- uses: actions/setup-python@v6
- uses: pre-commit/action@v3.0.0
env:
SKIP: no-commit-to-branch
Loading
Loading