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

stacklok / toolhive / 25732466600
66%

Build:
DEFAULT BRANCH: main
Ran 12 May 2026 11:54AM UTC
Jobs 1
Files 727
Run time 2min
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

12 May 2026 11:48AM UTC coverage: 65.127% (+0.08%) from 65.048%
25732466600

push

github

web-flow
Collapse registry provider error ladder into a helper (#5261)

The same `errors.As` ladder for `*LegacyFormatError`,
`*UnavailableError`, plus the `auth.ErrRegistryAuthRequired` check was
copy-pasted across `getCurrentProvider`, `listRegistries`,
`getRegistry`, `listServers`, and `getRegistryProvider`. Each new
error code that needs structured handling had to be wired into five
places, and the existing v0.1 router did the same `errors.Is` check
inline instead of going through `isRegistryAuthError`.

Extract a single `writeProviderError(w, err) bool` helper that
handles all three known failure modes and returns whether a response
was written. Each callsite collapses to two lines and a generic
fallback. Drop the now-unused `errors` and `registry/auth` imports
from `registry_v01.go`.

Also lower the legacy-format log to `slog.Warn`: it signals a user
misconfiguration that the API has already translated into a 502 with
an actionable hint, not a server-side failure that on-call should
investigate. The upstream-unavailable path stays at `slog.Error`
since it usually does indicate a real outage.

Improves on #5260

15 of 23 new or added lines in 2 files covered. (65.22%)

2 existing lines in 1 file now uncovered.

64179 of 98544 relevant lines covered (65.13%)

62.51 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
51.16
3.88% pkg/api/v1/registry.go
1
89.83
16.22% pkg/api/v1/registry_v01.go

Coverage Regressions

Lines Coverage ∆ File
2
96.46
0.0% pkg/authserver/storage/memory.go
Jobs
ID Job ID Ran Files Coverage
1 25732466600.1 12 May 2026 11:54AM UTC 727
65.13
GitHub Action Run
Source Files on build 25732466600
  • Tree
  • List 727
  • Changed 10
  • Source Changed 2
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25732466600
  • 50c583f8 on github
  • Prev Build on main (#25732412599)
  • Next Build on main (#25732510031)
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