Commit Graph
48 Commits
Author SHA1 Message Date
moebiusbandandClaude Opus 4.8 0724b2dc60 Adopt cc-lib hierarchical JobData/Statistics structs
cc-lib changed JobData, ScopedJobStats and Job.Statistics from flat maps
to structs (a .Metrics map plus array-valued Groups) to represent
filesystem (and future interconnect) metric groups. Migrate all
construction, indexing and iteration to the new API across the archive
backends, metricstore query path, metric dispatcher, archiver, importer,
tagger, taskmanager, repository and API layers.

Semantics: DecodeJobStats now projects JobData.Groups into
ScopedJobStats.Groups, and the archiver derives per-filesystem node-scope
statistics into Job.Statistics.Groups. deepCopy, resampling and the
metric/scope filter are group-aware. The metricstore internal storage
(buffers, selector tree, checkpoint/parquet) is unchanged; all conversion
stays at the LoadData/archive-codec seam.

Note: requires the corresponding cc-lib release; bump the cc-lib
dependency version once tagged (a local go.mod replace was used during
development and is intentionally not committed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 19:14:12 +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 6f7e262f3f Fix issues after security audit
Entire-Checkpoint: bc18358a9343
2026-06-04 18:33:30 +02: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
moebiusband 14c487c9e4 Update test inputs 2023-08-18 09:31:57 +02:00
moebiusband 27894ea0a9 Restructure tests 2023-05-04 07:00:30 +02:00