Repository navigation
[ISSUE #7695] Fix namespace-scoped instance history - #7855
Conversation
|
The HTTP integration job failed with a 180-second SocketTimeoutException This appears unrelated to the namespace history changes. |
Aias00
left a comment
There was a problem hiding this comment.
Good improvement to scope instance state history per namespace. The previous global stateHistoryMap collapsed counts across all namespaces; the new namespaceStateHistoryMap keyed by namespace — with a historyLock guarding both reads and writes, and a retainAll cleanup of namespaces that have no tracked instances — keeps the global aggregate and the per-namespace curves correct.
Highlights:
- Tests cover namespace scoping, the 20-sample cap, namespace removal when instances disappear, and cross-namespace state separation.
getInstanceDataVisual(...)now reads the namespace-specific history under the same lock, so the global view and per-namespace view stay consistent.
CI note: pr_build is green. The two failing e2e checks (e2e and e2e-case e2e-http-sync-compose) are infrastructure flakes — their annotations show workflow-level exit code 1 / exit code 255 failures tied to the Node 20→24 forced runner migration, not assertion failures, and they do not touch the admin-side InstanceCheckService logic in this PR. They should recover on re-run.
Approving.
|
Ping on state: this PR is approved on the code, but the required checks are red and it cannot be merged yet. The failing jobs are No code change is expected from you. Once the shared e2e problem is resolved, please rerun the failed jobs (or push a trivial rebase) so the required checks go green, and this can be merged. |
|
@ymy4171 This PR is approved, but 9 checks are red: I inspected these lanes today and they fail for infrastructure reasons rather than on the diff — the Please rebase onto |
dff081d to
95ed959
Compare
|
Rebased onto the latest master and resolved the conflicts. Could you please review the updated revision when convenient? |
Aias00
left a comment
There was a problem hiding this comment.
Approved. Bucketing the instance state history by namespaceId (namespaceStateHistoryMap + historyLock) keeps per-namespace status timelines isolated, which is correct for multi-tenant deployments. Note: this edits InstanceCheckService.collectStateData()/constructor and overlaps with #7971 (retention cleanup) - please coordinate the rebase so the two changes land cleanly. Thanks!
Fixes #7695
Description
Instance history charts currently return global state counts when a
namespace is selected, while pie charts are filtered by namespace.
This PR adds separate histories per namespace and state while preserving
the aggregate view when no namespace is specified.
Validation
expected 2, actual 5.
cleanup, empty results, and per-state pie/history counts.
2053 tests run, 0 failures, 0 errors, 1 skipped.
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true.