Commit Graph
30 Commits
Author SHA1 Message Date
moebiusbandandClaude Opus 5 ecb1ba2bbe feat(fleet): add service type enum and infra scope
Replace the free-form service_type string with a ServiceType enum (ccms,
ccmc, ccb, cces, ccsa, ccnc, ccem). The short code is the canonical value
stored in the DB, the config-tree directory name and a NATS discovery
subject token; Description() gives the human-readable name.

Add a second scope alongside per-node agents: ScopeInfra covers
cluster-independent monitoring infrastructure services, which are
identified by (hostname, service_type) and carry an empty cluster.
InfraRegistry is the ScopeInfra sibling of Registry and shares the same
table, state machine and config-revision handshake. It deliberately
exposes no StartSweep: MarkStale ages rows by last_heartbeat regardless
of scope, so a single sweep goroutine per process covers both scopes.

On the repository side ServiceDB gains a Scope column and the two
queries the discovery publisher and infra enumeration need, ListActive()
and ListByScope(). ResetConnection() now also resets the fleet
repository singleton so tests get a fresh handle.

Migration 13 is edited in place rather than superseded by a new
migration: the service table is unreleased, so no existing deployment
has it yet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 08:06:50 +02:00
moebiusband 51517f8031 Reduce insert pressure in db. Increase sqlite timeout value
Entire-Checkpoint: a1e2931d4deb
2026-03-16 11:17:47 +01:00
moebiusband 0e27624d73 Add flag to optimize db. Remove ANALYZE on startup.
Entire-Checkpoint: d49917ff4b10
2026-03-12 20:12:49 +01:00
moebiusband 00d2f97c4c fix: Large heap allocations in sqlite driver. Sanitize sqlite config and make it configurablex. Allow to cancel queries. 2026-03-11 11:14:37 +01:00
moebiusband eba3995610 Add Analyse on db startup
Entire-Checkpoint: ea70a955214d
2026-03-11 05:28:52 +01:00
moebiusband 1d4c79c821 Unify JSON attribute naming ot use kebab style case. Cleanup configuration. 2026-01-20 09:47:13 +01:00
moebiusband 8576ae458d Switch to cc-lib v2 2025-12-24 09:24:18 +01:00
moebiusband 64fef9774c Add unit test for NATS API 2025-12-23 09:22:57 +01:00
moebiusband 1cd4a57bd3 Remove support for mysql/mariadb 2025-12-20 11:13:41 +01:00
moebiusband f141ca926f Increase archive version. Fix unit tests. 2025-11-20 14:28:06 +01:00
moebiusband 8f4ef1e274 Refactor repository
Fix issues
Improve transaction API
Make hardcoded constants configurable
Make error messages consistent and always add context info
2025-11-20 06:58:45 +01:00
moebiusband dd48f5ab87 fix: Optimize sqlite settings 2025-07-02 09:12:07 +02:00
moebiusband 639e1b9c6d Port to cc-lib. Extend legal header. 2025-06-30 12:06:35 +02:00
Christoph Kluge bd0cc69668 Review fatalf log calls and messages 2025-02-27 18:10:04 +01:00
moebiusband bc89025924 Revert to blocking startJob REST api
Fixes #316
2024-12-18 11:45:56 +01:00
moebiusband 81b8d578f2 feat: Add buffered channel with worker thread for job start API
Fixes #293
Refactoring on the way
2024-11-25 16:44:50 +01:00
moebiusband fb8bbea99d Remove year in copyright notice 2024-04-11 23:04:30 +02:00
moebiusband 918f1993f2 Add loglevel access. Fix timer labels. 2023-06-09 15:02:22 +02:00
moebiusband 96d036a128 Enable SQL hooks for statement debugging 2023-06-05 16:38:58 +02:00
moebiusband 012b131b23 Refactor for benchmarking 2023-06-01 13:57:35 +02:00
moebiusband 0f87f651f9 Refactor DB connection settings 2023-06-01 08:03:12 +02:00
Jan Eitzinger 500ae29d25 Synchronize DB Schema with json schema
Rework tests
2023-04-21 12:59:27 +02:00
moebiusband 999609a17a Add backend type and adopt cast expressions
Fixes #67
2023-02-21 15:22:05 +01:00
moebiusband 63f8555af7 Add migration support for mysql 2023-02-21 14:45:59 +01:00
moebiusband 8ffb562d6b Introduce db migration support 2023-02-21 10:57:22 +01:00
moebiusband aef821fa7e Add SQL hook for logging and timing 2023-02-13 13:52:17 +01:00
Christoph Kluge 79a949b55e Rework pkg/log, add 'loglevel' and 'logdate' flags, streamline
- removes some previously added manual location strings: now handled by pkg/log depending on loglevel
- kept manual string locations on fmt print functions
- add 'notice' and 'critical' loglevels
- add 'Panic' and 'Panicf' functions to log panics
- adresses issue #26
2023-01-23 18:48:06 +01:00
Christoph Kluge 24a4244f19 add more information to existing errors logs and panics
- '$ROOT/$FILE' for better localization in the code
- add text where none was given
- fix unnecessary sprintf nesting in influxv2 and prometheus metricrepo logging
2023-01-19 16:59:14 +01:00
Jan Eitzinger 26df1e7c14 Add copyright and license header. Update license year 2022-07-29 06:29:21 +02:00
Jan Eitzinger 81819db436 Refactor directory structure 2022-06-21 17:52:36 +02:00