Skip to content

refactor: each observability service's config sits in a root folder named after it, out of backend/ - #454

Merged
HardMax71 merged 1 commit into
mainfrom
max/observability-out-of-backend
Oct 23, 2026
Merged

HardMax71 merged 1 commit into
mainfrom
max/observability-out-of-backend

Conversation

@HardMax71

@HardMax71 HardMax71 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

backend/ held the config of six other containers. None of it goes into the backend image, but CI's backend/** filter counted a dashboard edit as a backend change: #431 changed one datasource line and ran 13 jobs, image builds and all E2E included.

Changes

Each config moves with git mv to a root folder named after its compose service (grafana/, host-metrics/, loki/, opensearch/, otel-collector/, victoria-metrics/), and .trivyignore to the root, since it covers both images. Mounts, the deploy's restart paths, the labeler and the docs follow. The contract test gets its own CI job, so a dashboard edit runs only that and the docs build.

The first release recreates the six services and then restarts them once more. OpenSearch misses lines during both gaps; Loki keeps them.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or tooling changes

Test Plan

  • Backend unit tests pass (cd backend && uv run pytest tests/unit)
  • Frontend unit tests pass (cd frontend && npm run test)
  • Backend E2E tests pass (docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')
  • Frontend E2E tests pass (cd frontend && npm run test:e2e)
  • API spec and client regenerated if routes or schemas changed (./deploy.sh openapi, then ./deploy.sh types), never edited by hand
  • Manual testing performed

Validation: the contract tests read all 13 dashboards, the alert rules and the collector config from the new paths and pass, mkdocs build --strict passes, and actionlint finds nothing new. The services started from the branch loaded their configs: 13 dashboards, 13 alert rules and 4 datasources in Grafana, OpenSearch's template and policy, Loki's 30-day retention, the VictoriaMetrics scrape job and 8 host series.

Checklist

  • My code follows the project's style guidelines
  • I have run pre-commit run --all-files and all checks pass
  • I have added tests that prove my fix/feature works
  • I have updated documentation if needed
  • My changes don't introduce new warnings

Summary by cubic

Moves each observability service's config out of backend/ into a root folder named after its compose service (grafana/, host-metrics/, loki/, opensearch/, otel-collector/, victoria-metrics/). A dashboard edit under backend/ previously counted as a backend change and ran every CI job, from image builds to all E2E; now it triggers only the docs build and the contract tests.

  • Grafana contract tests get their own CI job, run only when backend/ or a service config folder changes.
  • .trivyignore moves to the repo root, since it covers both images.
  • Compose mounts, the deploy restart paths, the labeler and the docs follow the new locations.

Deployment

  • The first release recreates the six services and then restarts them once more; OpenSearch misses lines during both gaps while Loki keeps them.

Written for commit 62c779b. Summary will update on new commits.

View guided diff Turn on auto-fix

…amed after it, out of backend/

Grafana, Loki, OpenSearch, VictoriaMetrics and both collectors read their config through compose mounts; none of it is in the backend image. In backend/ a dashboard edit counted as a backend change and ran every CI job. The Grafana contract tests get their own job for backend and service config changes, and .trivyignore moves to the root since it covers both images.
@HardMax71
HardMax71 enabled auto-merge (squash) October 23, 2026 17:33
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f9b233f2-9c5b-4c03-877e-a4820a8638d9
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added documentation Improvements or additions to documentation area: observability Metrics, dashboards, alerts, logs, traces, OTel collector area: deploy Compose, images, release workflow, production host area: ci GitHub workflows, test infrastructure, repo tooling labels Oct 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Flag Coverage Δ
backend-e2e 82.04% <ø> (ø)
backend-unit 77.87% <ø> (ø)
frontend-unit 92.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Backend 94.73% <ø> (ø)
Frontend 92.25% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@HardMax71
HardMax71 merged commit ca84231 into main Oct 23, 2026
24 checks passed
@HardMax71
HardMax71 deleted the max/observability-out-of-backend branch October 23, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci GitHub workflows, test infrastructure, repo tooling area: deploy Compose, images, release workflow, production host area: observability Metrics, dashboards, alerts, logs, traces, OTel collector documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants