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

hyperglass-community / hyperglass / 44925020736
87%

Build:
DEFAULT BRANCH: main
Ran 21 Nov 2026 04:38PM UTC
Jobs 2
Files 444
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:31PM UTC coverage: 86.724% (+0.3%) from 86.449%
44925020736

push

github

web-flow
feat(api): let a forced query bypass the cache, at most once per interval (#566)

* feat(api): let a forced query bypass the cache, at most once per interval

POST /api/query accepts force: true. With cache.refresh.enable (off by
default) a forced query for a cached result runs on the device again and
replaces the entry, once the result is cache.refresh.min_interval seconds
old (default 30, below cache.timeout). A per-key Redis lease allows one
forced run at a time across workers and becomes a cooldown of
min_interval when the run ends, successful or not. Requests that are
refused get the cached result. Every response carries refresh_in.

* fix(api): time forced-refresh cooldowns in Redis and harden the lease

Every run of a query now sets <cache key>.refresh to a cooldown that
expires after cache.refresh.min_interval, in the transaction that writes
the result, and a forced query takes that key with SET NX. That replaces
the executed_at field, so no worker clocks are compared.

The lease outlives the device deadline (request_timeout - 1) by five
seconds, and a run whose lease expired still starts a cooldown. A Redis
error while starting the cooldown is logged instead of replacing the
query's result or error. During another request's forced run,
refresh_in is min_interval rather than the lease's remaining time plus
min_interval.

* fix(api): never let a run's cooldown replace another forced run's lease

A run that wrote its result set the refresh key to the cooldown
unconditionally. When the cached entry expired during a forced run, an
unforced run that finished first replaced the forced run's lease, so a
second forced run could start once that cooldown expired. The write now
starts the cooldown only over no key, a cooldown or the request's own
lease. Params are read once for the refresh settings.

* fix(ui): keep the refresh settings out of the UI parameters

UIParameters typed cache as the full Cache model, so validating the
projected parameters re-a... (continued)

526 of 794 branches covered (66.25%)

Branch coverage included in aggregate %.

461 of 463 new or added lines in 9 files covered. (99.57%)

18418 of 21050 relevant lines covered (87.5%)

11.06 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
96.61
hyperglass/api/refresh.py
Jobs
ID Job ID Ran Files Coverage
1 backend - 44925020736.1 21 Nov 2026 04:41PM UTC 319
88.48
GitHub Action Run
2 frontend - 44925020736.2 21 Nov 2026 04:38PM UTC 125
74.56
GitHub Action Run
Source Files on build 44925020736
  • Tree
  • List 444
  • Changed 9
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #44925020736
  • 0a10a9c6 on github
  • Prev Build on main (#44925009221)
  • Next Build on main (#44927609537)
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