Skaha Platform Metrics#1082
Open
shinybrar wants to merge 22 commits into
Open
Conversation
When session LimitRange is enabled, max* fields on view=stats come from LimitRange spec.max; missing LimitRange returns 503 with a stable message. CADC-15749
Fetch platform metrics from SKAHA_METRICS_BACKEND_URL for view=stats cluster totals; wire production GetAction to HttpMetricsDAO. CADC-15750
Map Metrics fetch failures on view=stats to TransientException with a stable client message; other session endpoints are unaffected. CADC-15751
Platform stats no longer derive cluster totals from nodes or running pod sums; PodResourceUsage remains for session listings. CADC-15752
Validate view=stats JSON schema against live Skaha; optional fixture mode asserts cluster totals when SKAHA_METRICS_INTTEST_MODE=fixture. CADC-15753
Session create/delete coverage no longer calls view=stats; platform stats are covered by PlatformStatsIntTest. CADC-15754
Complete removal of node-based capacity for platform stats. CADC-15752
Avoid NumberFormatException when Metrics returns non-numeric CPU values.
Defer HttpMetricsDAO until view=stats so unset SKAHA_METRICS_BACKEND_URL does not break other session GETs. Use memory-count formatting for session RAM ceilings.
Centralize the kubernetes client-java version for the upcoming Metrics API refactor.
Platform test fixtures now live on PlatformMetricsFixtures.
Rename HttpMetricsDAO to PlatformMetricsDAO, add pod metrics DAO/mappers, and replace kubectl top with the metrics.k8s.io client for session usage.
Route session pod usage through MetricsDAO, document label selector and primary-container policy, and add mapper, soft-fail, and delegation tests.
Avoid NumberFormatException when the numeric prefix is not an integer.
Collapse platform and pod mappers into PlatformMetrics and PodMetrics, move test fixtures to test sources, and keep eight production metrics types.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1082 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CADC-15588:
GET /v1/session?view=statscluster totals from Metrics API, not nodes/pods.HttpMetricsDAO->SKAHA_METRICS_BACKEND_URL+/api/v1/metrics/platformcapacity/allocatedfrom Metrics; sessionmaxCPUCores/maxRAMfrom LimitRange (spec.max) ork8s-resources.jsondefaultLimit"Platform statistics unavailable"/"Session resource limits unavailable"PodResourceUsagestays for session listingsHttpMetricsDAO-> missing metrics URL no longer breaks/v1/session,/{id},view=interactive24G/20Gi), not bytes overload (0Gbug)0.0cores, noNumberFormatExceptionTest plan
./gradlew clean check(skaha)GetActionResourceStatsTest— 503 paths, lazy DAO, literal24G/20GiPlatformStatsIntTestvs live Skaha (optionalSKAHA_METRICS_INTTEST_MODE=fixture)Deploy note
Needs co-deployed Metrics +
SKAHA_METRICS_BACKEND_URLfor stats. Other session GETs OK without it.