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

stacklok / toolhive / 24124391614 / 1
66%
main: 66%

Build:
DEFAULT BRANCH: main
Ran 08 Apr 2026 08:00AM UTC
Files 607
Run time 13s
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

08 Apr 2026 07:54AM UTC coverage: 65.19% (+0.005%) from 65.185%
24124391614.1

push

github

web-flow
Update Redis metadata when backend sessions expire (RC-16) (#4404)

* Update Redis metadata when backend sessions expire (RC-16)

Add RemoveBackendFromMetadata to the MultiSession interface and implement
it on defaultMultiSession to clear the per-backend session ID key and
rebuild MetadataKeyBackendIDs when a backend disconnects or expires.

Add NotifyBackendExpired to sessionmanager.Manager to call
RemoveBackendFromMetadata and flush the updated metadata to storage
(Redis when configured), keeping Redis consistent with the actual set
of connected backends.

Closes #4213

* Evict local cache on NotifyBackendExpired; fix DataStorage tests

NotifyBackendExpired now evicts the session from the node-local
multiSessions cache after a successful storage update, and forgets
the singleflight key to prevent a concurrent restore from
re-populating the cache with stale data. This ensures same-pod
requests trigger RestoreSession with the updated metadata (without
the expired backend), not just cross-pod ones.

On storage error the cache is intentionally not evicted to avoid
serving requests against metadata that still describes the expired
backend.

Also update session_data_storage_test.go to match the API renamed in
the "fixes from review" commit: Upsert→Store, Create→Exists. Add
contract tests for Exists (false when absent, true when present, does
not refresh TTL for either local and Redis implementations). Remove
the error-return assertion from NewLocalSessionDataStorage.

* fixes from review

---------

Co-authored-by: taskbot <taskbot@users.noreply.github.com>

54873 of 84174 relevant lines covered (65.19%)

61.81 hits per line

Source Files on job 24124391614.1
  • Tree
  • List 607
  • Changed 10
  • Source Changed 2
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24124391614
  • 3a6c0c1b on github
  • Prev Job for on main (#24103047720.1)
  • Next Job for on main (#24126081599.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc