Commit Graph
52 Commits
Author SHA1 Message Date
moebiusbandandClaude Opus 5 a5c1fdf21f fix: forward resample algorithm to metric store for running jobs
Only archived job data and internal-store node-list data honoured the
selected resample algorithm. For running jobs the algorithm was dropped:
MetricDataRepository.LoadData had no such parameter, so the memory store
fell back to an empty string, which cc-lib's GetResampler maps to LTTB.
The external store client was worse - its APIQueryRequest had no
ResampleAlgo field at all, and LoadNodeListData accepted the parameter
without using it.

Add resampleAlgo to the LoadData interface (mirroring LoadNodeListData),
forward it from metricdispatch, and set it on both stores' requests. The
field is tagged omitempty, so the wire format is unchanged when empty -
verify the deployed cc-metric-store accepts it before relying on it there.

The REST job endpoints pass a non-zero resolution and therefore do
resample, so they now request the configured default instead of an empty
string. Add config.ResampleAlgo() for that, since "" is not a neutral
value at this layer.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 12:17:03 +02:00
moebiusbandandClaude Opus 5 4cfbecd818 Merge branch 'feat/565-add-metric-tooltip' into metric-store-tickets
Resolve conflicts in the generated GraphQL code by regenerating it against
the merged schema. cc-lib v2.13.0 adds Tooltip to schema.MetricConfig and
schema.GlobalMetricListItem, so gqlgen now binds the tooltip field directly
and the hand-written globalMetricListItem/metricConfig resolvers introduced
on the tooltip branch are no longer needed.

Also migrate to the cc-lib v2.13.0 metric container types, which changed
from bare maps to structs carrying array-valued metric groups:

  schema.JobData          map -> {Metrics, Groups}
  schema.ScopedJobStats   map -> {Metrics, Groups}
  job.Statistics          map -> schema.JobStatisticsSet{Metrics, Groups}

Callers index .Metrics, return the zero struct instead of nil, and
deepCopy/DecodeJobStats now also carry the Groups payload through.
archive.GetStatistics returns the full JobStatisticsSet so group
statistics survive the round trip.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 10:22:22 +02:00
moebiusband ffbe171327 Merge branch 'main' into feature/526-average-resample 2026-06-18 07:17:41 +02:00
moebiusbandandClaude Opus 4.8 2b01b57495 feat: replace gorilla/sessions with alexedwards/scs/v2
Browser sessions are now server-side, stored in the SQLite database via
scs/sqlite3store (new `sessions` table, DB migration to version 12) instead
of gorilla/sessions client-side cookie storage. Only an opaque random token
is kept in the cookie; session data lives server-side and survives restarts.

Session middleware is wired as a hybrid to avoid buffering large responses:
scs.LoadAndSave on the login/logout write paths, and a non-buffering
read-only LoadSession middleware on the secured/config/frontend read paths
so the large GraphQL /query responses stream unbuffered. JWT-only APIs
(/api, /userapi, /api/metricstore) and static files are left unwrapped.

The session cookie Secure flag is now derived from the server config (set
when cc-backend terminates TLS itself); previously it was effectively never
set. The SESSION_KEY env var is removed as server-side tokens need no
signing secret. The dormant Bearer-JWT branch in the frontend urql client
is removed; the web UI authenticates GraphQL via the session cookie.

Closes #558

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: b51075f43cc7
2026-06-17 07:54:26 +02:00
moebiusband 5d8d4e228e Merge branch 'main' into feature/526-average-resample 2026-06-17 06:30:54 +02:00
moebiusband 6f7e262f3f Fix issues after security audit
Entire-Checkpoint: bc18358a9343
2026-06-04 18:33:30 +02:00
moebiusband c0d2d65f96 Introduce average resampler support
Fixes #526

Entire-Checkpoint: 893a1de325b5
2026-03-19 21:16:48 +01:00
moebiusband 82e79b074a Reverse Lookup order in stop job request 2026-02-21 13:51:31 +01:00
moebiusband f6aa40d927 Migrate from gorilla to chi web framework. add 404 handler 2026-02-07 17:48:12 +01:00
moebiusband 95689e3c99 Add API endpoint for getUsedNodes
Needed by dynamic memory management for external ccms
2026-01-28 07:05:29 +01:00
moebiusband b307e885ce feat: Add support for multiple external metric stores 2026-01-27 10:02:07 +01:00
moebiusband f41301036b Move metricstore from internal to pkg 2026-01-23 07:49:47 +01:00
moebiusband 1d4c79c821 Unify JSON attribute naming ot use kebab style case. Cleanup configuration. 2026-01-20 09:47:13 +01:00
moebiusband 5281f3bb60 Remove obsolete config option disable-archive 2026-01-19 16:42:30 +01:00
moebiusband c8627a13f4 Remove obsolete slusters config section 2026-01-14 11:17:49 +01:00
moebiusband 4cec933349 Remove obsolete cluster config section 2026-01-13 06:28:33 +01:00
moebiusband 11ec2267da Major refactor of metric data handling
- make the  internal memory store required and default
- Rename memorystore to metricstore
- Rename metricDataDispatcher to metricdispatch
- Remove metricdata package
- Introduce metricsync package for upstream metric data pull
2025-12-25 08:42:54 +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 97a322354f Refactor 2025-12-15 14:06:33 +01:00
moebiusband d24d85b970 Adapt tests to new API 2025-12-11 09:39:38 +01:00
moebiusband 8d44ac90ad Fix: Busywait loop in archiver and slow shutdown
Remove unblocking default in select
Add shutdown handler with context and timeout
2025-12-11 09:29:10 +01:00
moebiusband f141ca926f Increase archive version. Fix unit tests. 2025-11-20 14:28:06 +01:00
moebiusband 440cd59e50 Revert hpc_cluster to cluster. Refactor. 2025-10-16 14:32:06 +02:00
Aditya Ujeniya af43901ca3 Trial and Test MetricStore components 2025-09-08 22:54:13 +02:00
moebiusband 86453e7e11 Port to new job structs
Backup commit: Does not build.
2025-08-05 10:23:54 +02:00
moebiusband 0754ba5292 Port configuration to ccConfig scheme
Decentralize config validation
Modularize configuration handling
2025-07-07 13:09:12 +02:00
moebiusband 639e1b9c6d Port to cc-lib. Extend legal header. 2025-06-30 12:06:35 +02:00
moebiusband 3efee22536 Remove jobMeta and use job struct everywhere 2025-05-28 15:59:21 +02:00
moebiusband 99f8187092 Port tests to new architecture 2025-05-19 09:17:16 +02:00
moebiusband f30b784f45 Attempt to fix api test
Tests still fail
2025-05-16 17:38:00 +02:00
moebiusband 161f0744aa fix: enforce apiAllowedIPs config option
Fixes #385
2025-04-28 09:54:22 +02:00
moebiusband bc89025924 Revert to blocking startJob REST api
Fixes #316
2024-12-18 11:45:56 +01:00
moebiusband 28539e60b0 Regenerate Swagger, fix tests, cleanup 2024-11-26 07:02:53 +01:00
moebiusband 3ab26172c4 Port tests to new job archive version 2024-11-16 07:03:29 +01:00
Christoph Kluge 8e3327ef6a Merge branch 'sample_resolution_select' into dev 2024-09-24 17:43:15 +02:00
Christoph Kluge 0b7cdde4a0 Merge branch 'dev' into sample_resolution_select
- Moved resample changes to metricDataDispatcher
- Added res argument to archiver, updateFootprintService
2024-09-05 17:26:43 +02:00
Christoph Kluge d5382aec4f Merge branch 'dev' into 275_add_tag_scope 2024-09-05 16:44:41 +02:00
moebiusband f305863616 Bugs fixed in unit tests and archiver init 2024-08-28 12:26:35 +02:00
moebiusband db5809d522 Move rest of archiveing code into new archive package 2024-08-28 11:13:54 +02:00
moebiusband e7231b0e13 Finish refactoring
Add new packages:
- metricDataDispatcher
- archiver
2024-08-28 10:03:04 +02:00
Aditya Ujeniya ceb3a095d8 Sampling Feature for archived and fresh data 2024-08-22 14:29:51 +02:00
Christoph Kluge 9b5c6e3164 fix StartJobTest, add tag_scope to migration 2024-08-05 10:37:42 +02:00
moebiusband 801607fc16 Refactor main
Convert components to Singletons
Restructure main package
Reduce dependencies
2024-07-16 12:08:10 +02:00
Christoph Kluge 0a604336c4 Fix other apitest subtests 2024-07-05 15:42:08 +02:00
Christoph Kluge be9df7649f fix: setup user in api test config 2024-07-05 15:25:24 +02:00
Christoph Kluge 63fb923995 fix: fix api test router init 2024-07-05 13:16:21 +02:00
Christoph Kluge 61eebc9fbd Rework initial commit
- moved frontend configuration api to new subrouter for compatibility
2024-07-03 17:24:26 +02:00
moebiusband fb8bbea99d Remove year in copyright notice 2024-04-11 23:04:30 +02:00