• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperglass-community / hyperglass / 44866290626
87%

Build:
DEFAULT BRANCH: main
Ran 21 Nov 2026 04:29AM UTC
Jobs 2
Files 438
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Nov 2026 04:28AM UTC coverage: 85.355% (+0.2%) from 85.11%
44866290626

push

github

web-flow
feat(api): add a health check endpoint and healthcheck command (#524)

* feat(api): add a health check endpoint and healthcheck command

Operators and container runtimes had no reliable way to tell whether
hyperglass can serve queries. The UI root keeps answering 200 through a
Redis outage, and the Compose file worked around that by fetching
/api/info, which only covers part of the picture and has no IPv6 or
custom-host support.

GET /api/health checks Redis with a dedicated short-timeout connection in
a worker thread (the shared pool has no timeouts, so an unreachable Redis
could hang the check), then that configuration state is loaded or can be
recovered, then that the UI is built (or disabled). It answers 200 or 503
and logs failure details instead of returning them. The handler replaces
the app-wide state recovery hook, which reads Redis through the shared
pool, and runs recovery itself after the bounded probe.

`hyperglass healthcheck` requests the endpoint on the configured listen
address, maps 0.0.0.0 and :: to the loopback address of the same family,
and bypasses HTTP proxies. The image gets a HEALTHCHECK using it, with a
10 minute start period because the UI is built on first boot before the
server listens. The Compose healthcheck is removed in favour of the
image's, so an older image without the command shows no health status
rather than permanently unhealthy.

Part of #519.

* fix(api): share health check runs and keep the Compose health check

/api/health is unauthenticated, and every request opened a new Redis
connection and used two jobs on the shared thread pool. A client that
floods it could open connections to Redis faster than they close.

- Each worker now runs the checks at most once per second. Requests that
  arrive during a run wait for it, and requests in the next second reuse
  its result. A request that disconnects does not cancel the shared run.
- The Redis probe reuses one client with the short timeouts, so repeated
  probe... (continued)

465 of 754 branches covered (61.67%)

Branch coverage included in aggregate %.

337 of 338 new or added lines in 5 files covered. (99.7%)

17358 of 20127 relevant lines covered (86.24%)

6.68 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
99.43
hyperglass/util/tests/test_health_endpoint.py
Jobs
ID Job ID Ran Files Coverage
1 backend - 44866290626.1 21 Nov 2026 04:31AM UTC 314
87.54
GitHub Action Run
2 frontend - 44866290626.2 21 Nov 2026 04:29AM UTC 124
70.29
GitHub Action Run
Source Files on build 44866290626
  • Tree
  • List 438
  • Changed 6
  • Source Changed 4
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #44866290626
  • 8398ce88 on github
  • Prev Build on main (#44853102343)
  • Next Build on main (#44871735296)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc