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

opendefensecloud / solution-arsenal / 33161845621
78%

Build:
DEFAULT BRANCH: main
Ran 28 Aug 2026 10:16AM UTC
Jobs 1
Files 89
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

28 Aug 2026 10:02AM UTC coverage: 80.294% (+0.06%) from 80.237%
33161845621

push

github

web-flow
chore: adapt to backoff v7 (#780)

## What

Adopt the backoff v6 error model in the discovery pipeline's logs: a
small
`RetryFailure` helper plus its use at the two places a retried operation
can fail.

Closes #685

## Why

The v5 → v7 move (#674 and `7b9ecdcf`) was an import-path swap, which
satisfied the
first AC. This is the second one — "refactor/update code as necessary".

v6 replaced the error model and we were using none of it: `Retry` now
wraps every
failure in a `*backoff.RetryError` carrying the last operation error
plus a `Cause`
(`ErrPermanent` / `ErrExhausted` / `ErrMaxElapsedTime` / a context
cause). Logging that
whole error yields `backoff: permanent error (last error: …)`, which
buries the actual
failure and leaves the reason unqueryable. A permanent 401/404 needs
someone to fix
credentials; an exhausted budget is transient and the next scan retries.
Both logged
identically before.

## Testing

`go build`, `go vet` and `go test ./pkg/discovery/` clean — 57/57 specs,
including five
new ones covering the `RetryFailure` mapping.

`make lint` flagged `ST1008` on the helper's original signature (error
returned first);
fixed by returning `(fields, logErr)`. Worth one more `make lint` before
merge, since I
have not re-run it since that change.

## Notes for reviewers

- **No control-flow change.** Processor errors are log-only
(`runner.go`), and only the
webhook server's `Serve` failure reaches `errChan`. This is log and test
quality.
- The classification lives in `runner.processEvent`, where every
processor's error is
already logged, so `apiwriter` is covered without a second log line for
one failure.
`handler.go` gets it too, as that's where the component-version context
is.
- **The returned error still wraps the whole chain**, not just
`LastErr`. Wrapping only
  the operation error would drop the cause sentinel and break
`errors.Is(err, backoff.ErrPermanent)` for callers. The cause goes in a
log field
  instead, where it is queryable.
- `r... (continued)

23 of 37 new or added lines in 3 files covered. (62.16%)

5525 of 6881 relevant lines covered (80.29%)

42.69 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
64.62
-3.68% pkg/discovery/handler/handler.go
6
75.0
pkg/discovery/retry.go
Jobs
ID Job ID Ran Files Coverage
1 33161845621.1 28 Aug 2026 10:16AM UTC 89
80.29
GitHub Action Run
Source Files on build 33161845621
  • Tree
  • List 89
  • Changed 6
  • Source Changed 2
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33161845621
  • 780adfbb on github
  • Prev Build on main (#33153662834)
  • Next Build on main (#33346920044)
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