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

stacklok / toolhive / 33774081341
70%

Build:
DEFAULT BRANCH: main
Ran 03 Sep 2026 03:50PM UTC
Jobs 1
Files 906
Run time 3min
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

03 Sep 2026 03:41PM UTC coverage: 69.915% (-0.006%) from 69.921%
33774081341

push

github

web-flow
Release per-issuer JWKS refresh workers on auth-server shutdown (#6493)

* Release JWKS refresh workers on auth-server close

MultiIssuerTokenValidator started one jwk.Cache per trusted issuer, each
with an httprc worker pool rooted at context.Background() and stopped by
nothing — so every auth-server reconstruction in a long-lived process
leaked roughly three goroutines per configured issuer, unbounded. This
is the goroutine half of #6479; #6480 fixed only the HTTP-connection
half.

Implements changes for issue #6482:
- Add MultiIssuerTokenValidator.Close, which shuts down each per-issuer
  jwk.Cache (waiting for its workers to drain) and cancels the
  validator-scoped context the pools are now rooted in
- Root the caches in that validator-scoped context instead of
  context.Background()
- Clean up already-started caches on a partial construction failure
- Build the shared validator up front in buildProvider whenever trusted
  issuers exist, return it, and hold it on the server so Close and
  newServer's deferred error path both release it
- Update the CloseIdleConnections Scope note: Close now releases the
  workers; that function deliberately does not, to stay safe on a live
  server

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Address code review feedback

- Close the validator in the newMultiValidator test helper via t.Cleanup
  so the suite no longer leaks a JWKS worker pool per issuer across its
  call sites (the leak class this change fixes in production)
- Cancel the validator-scoped context first in Close, then drain each
  cache, so a slow-draining pool is already unwinding before its Shutdown
  is reached and Close no longer serializes on each pool's full timeout;
  this also matches the construction-failure path's ordering

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Require a shared validator for trusted-issuer factories

The exported tokenexchange.Factory and JWTBearerIssuanceFacto... (continued)

57 of 87 new or added lines in 4 files covered. (65.52%)

11 existing lines in 4 files now uncovered.

77663 of 111082 relevant lines covered (69.92%)

92.24 hits per line

Uncovered Changes

Lines Coverage ∆ File
20
81.11
-4.05% pkg/authserver/server_impl.go
7
88.44
-0.61% pkg/authserver/server/tokenexchange/multi_issuer_validator.go
3
84.11
1.91% pkg/authserver/server/tokenexchange/jwt_bearer_handler.go

Coverage Regressions

Lines Coverage ∆ File
6
19.87
-3.97% pkg/client/manager.go
2
68.8
-0.85% pkg/ignore/processor.go
2
59.42
0.0% pkg/workloads/manager.go
1
81.11
-4.05% pkg/authserver/server_impl.go
Jobs
ID Job ID Ran Files Coverage
1 33774081341.1 03 Sep 2026 03:50PM UTC 906
69.92
GitHub Action Run
Source Files on build 33774081341
  • Tree
  • List 906
  • Changed 10
  • Source Changed 5
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33774081341
  • a919f589 on github
  • Prev Build on main (#33764673379)
  • Next Build on main (#33774717838)
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