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

opendefensecloud / solution-arsenal / 38252565828
79%

Build:
DEFAULT BRANCH: main
Ran 12 Oct 2026 01:21PM UTC
Jobs 1
Files 94
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

12 Oct 2026 12:59PM UTC coverage: 78.672% (-0.03%) from 78.697%
38252565828

push

github

web-flow
fix(controller): requeue Targets when a bound Registry changes (#852)

## What
A change on a Registry now also requeues the Targets bound to it via
RegistryBinding, not only the ones using it as `renderRegistryRef`.

Part of #565.

## Why
`mapRegistryToTargets` only followed `renderRegistryRef` -> when a
provider changes `hostname` or rotates `targetPullSecretName` on a bound
Registry, the Targets keep their RenderTasks with the old pull secret
until something else happens to trigger a reconcile. Pre-existing, also
same-namespace, but with cross-ns RegistryBindings (#565) the provider
rotates secrets in its own ns and the user's Targets would never notice.

The map func now also lists the RegistryBindings in the Registry's
namespace via the existing `indexRegistryBindingByRegistryName` and
enqueues each binding's Target (`registryBindingTargetKey`, so
`targetRef.namespace` is followed). A failed list is logged and the rest
of the mapping keeps going. Duplicate requests are fine,
`EnqueueRequestsFromMapFunc` dedupes them per event.

## Testing
envtest, red first, then green:

```
make test testargs="--focus='targetPullSecretName.changes|mapRegistryToTargets' ./pkg/controller"
Ran 2 of 145 Specs -- 1 Passed | 1 Failed   (before the fix)

make test testargs="--focus='RegistryBinding|mapRegistryToTargets|cross-namespace.Registry' ./pkg/controller"
Ran 25 of 145 Specs -- 25 Passed | 0 Failed
```

The map func spec is the actual gate: it fails without the fix. The
envtest spec (rotate `targetPullSecretName`, RenderTask picks up the new
secret) also passed before the fix because another watch happened to
requeue the Target, so it covers the end-to-end behavior but not the
regression on its own. `go vet ./pkg/...` and `make lint` clean.

## Checklist
- [x] Tests added/updated (map func spec, pull secret rotation spec)
- [x] No breaking changes (or upgrade path documented above)
- [x] Readable commit history (squashed and cleaned up as desired)
- [x] AI code r... (continued)

9 of 11 new or added lines in 1 file covered. (81.82%)

4 existing lines in 2 files now uncovered.

5094 of 6475 relevant lines covered (78.67%)

39.99 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
77.39
0.25% pkg/controller/target_controller.go

Coverage Regressions

Lines Coverage ∆ File
2
73.11
-1.68% pkg/controller/component_controller.go
2
71.88
-3.13% pkg/controller/registrybinding_controller.go
Jobs
ID Job ID Ran Files Coverage
1 38252565828.1 12 Oct 2026 01:21PM UTC 94
78.67
GitHub Action Run
Source Files on build 38252565828
  • Tree
  • List 94
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38252565828
  • 7a2b61d2 on github
  • Prev Build on main (#38218577828)
  • Next Build on main (#38277746211)
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