refactor: the observability services run in every stack, so local and production start the same services

Merged
HA
8d ago
+27-38

Summary

Production's .env set COMPOSE_PROFILES=observability, so production ran Grafana, Loki, OpenSearch, VictoriaMetrics, Jaeger and both collectors while a local stack ran without them unless asked. That was a behavior difference between local and production deploys, where only keys and credentials should differ. Follows #455.

Changes

The eight observability services lose profiles: ["observability"], so docker compose up -d starts them everywhere, and the deploy stops writing COMPOSE_PROFILES. Compose leaves profiles out of its config hash (hash.go), so the release recreates nothing on production. Kafdrop stays under the debug profile, since production never runs it. CI's E2E stacks now start the observability services too. The docs drop the profile everywhere.

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 (uv run python -m scripts.export_openapi in backend/, then npm run generate:api in frontend/), never edited by hand
  • Manual testing performed

Validation: docker compose config --services lists the observability services with no profile set and Kafdrop only with --profile debug, and mkdocs build --strict passes.

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

Makes the observability services part of every compose stack, so local and production now start the same services: Grafana, Jaeger, Loki, OpenSearch, VictoriaMetrics, and both OTel collectors come up with docker compose up -d.

Changes

  • Removes the observability profile from all eight services; production's deploy no longer writes COMPOSE_PROFILES=observability.
  • Compose leaves profiles out of its config hash, so the production release recreates no containers.
  • Kafdrop stays under the debug profile, and CI's E2E stacks now start the observability services.
  • Documentation drops every mention of the profile.