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

hyperglass-community / hyperglass / 45114421767
89%

Build:
DEFAULT BRANCH: main
Ran 23 Nov 2026 04:55AM UTC
Jobs 2
Files 445
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

23 Nov 2026 04:52AM UTC coverage: 86.955% (+0.08%) from 86.88%
45114421767

push

github

web-flow
fix(api): answer 503 with a JSON body while Redis is unreachable (#538)

* fix(api): answer 503 with a JSON body while Redis is unreachable

A Redis connection error or timeout, raised by the state hook or later in a
request, reached default_handler, which read params from the same Redis,
raised again and left Litestar to send a plain-text 500. default_handler
now answers those errors with 503 and the fixed message used when state
is missing, and falls back to that message when params cannot be read.

* fix(api): count a Redis outage on a query in the query error metrics

Since #526, every query failure is recorded through record_query_error in
the exception handler that answers it. unavailable_handler, which answers
503 while Redis is unreachable, did not call it, so a Redis outage on
POST /api/query was not counted in hyperglass_queries_total or
hyperglass_query_errors_total. It is now, with the internal_error reason.

The forced-refresh tests from #566 expected 500 for Redis failing after
the device run; on this branch that is a 503, and it is still counted.

* fix(api): count a Redis outage as service_unavailable in the query error metrics

A Redis outage was recorded with reason internal_error, so alerts on that
reason would fire for an unreachable store rather than a server bug, while
the response is a 503. error_reason() now returns service_unavailable for
redis-py ConnectionError and TimeoutError, the same exceptions answered
with 503. REDIS_UNAVAILABLE moves to the metrics module, which the error
handlers already import, so both share one definition. Other Redis errors,
such as a command error, stay internal_error.

581 of 842 branches covered (69.0%)

Branch coverage included in aggregate %.

139 of 139 new or added lines in 5 files covered. (100.0%)

1 existing line in 1 file now uncovered.

18636 of 21258 relevant lines covered (87.67%)

14.49 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
96.3
-1.07% hyperglass/api/metrics.py
Jobs
ID Job ID Ran Files Coverage
1 frontend - 45114421767.1 23 Nov 2026 04:55AM UTC 125
76.28
GitHub Action Run
2 backend - 45114421767.2 23 Nov 2026 04:57AM UTC 320
88.55
GitHub Action Run
Source Files on build 45114421767
  • Tree
  • List 445
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #45114421767
  • 9532a3a1 on github
  • Prev Build on main (#45114001458)
  • Next Build on main (#45115442842)
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