Skip to content

feat(health): add Object Store metrics and config-based bucket discovery#229

Merged
retr0h merged 2 commits intomainfrom
feat/health-status-object-store-metrics
Mar 7, 2026
Merged

feat(health): add Object Store metrics and config-based bucket discovery#229
retr0h merged 2 commits intomainfrom
feat/health-status-object-store-metrics

Conversation

@retr0h
Copy link
Collaborator

@retr0h retr0h commented Mar 7, 2026

Summary

  • Add Object Store metrics (name, size) to the health status endpoint, OpenAPI spec, CLI display, and tests
  • Replace dynamic KeyValueStores()/ObjectStores() lister discovery with direct lookups of buckets configured in osapi.yaml via configuredKVBuckets() and configuredObjectBuckets() helpers
  • Eliminates stale/orphan buckets (e.g., pre-namespace job-queue, job-responses, orphan osapi-) from health status output and improves response time (~3.5s → ~740ms)

Test plan

  • All unit tests pass (go test ./...)
  • Health status endpoint returns only configured buckets with Object Store info
  • Verified against live NATS server — no stale buckets in output
  • SDK changes in osapi-sdk need separate PR after this merges

🤖 Generated with Claude Code

Replace hardcoded KV bucket handles in the health status endpoint with
direct lookups of buckets configured in osapi.yaml. This eliminates
stale/orphan buckets from the output and avoids scanning all NATS
buckets. Add Object Store metrics (name, size) to the status response,
OpenAPI spec, CLI display, and tests.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

Thank you for contributing to this project! 😊🕹️

Co-Authored-By: Claude <noreply@anthropic.com>
@retr0h retr0h merged commit db7def9 into main Mar 7, 2026
7 checks passed
@retr0h retr0h deleted the feat/health-status-object-store-metrics branch March 7, 2026 07:40
@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #229   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         182      182           
  Lines        6518     6537   +19     
=======================================
+ Hits         6517     6536   +19     
  Misses          1        1           
Files with missing lines Coverage Δ
internal/api/health/health_status_get.go 100.00% <100.00%> (ø)
internal/api/health/types.go 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd9d879...ede73a4. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant