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

opendefensecloud / solution-arsenal / 27348406272
75%

Build:
DEFAULT BRANCH: main
Ran 11 Jun 2026 01:12PM UTC
Jobs 1
Files 30
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

11 Jun 2026 12:57PM UTC coverage: 74.122% (+0.008%) from 74.114%
27348406272

push

github

web-flow
fix(controller): silently dropped cross-namespace releases in bootstrap chart (#570)

## What
Fix a bug where two same-named Releases from different namespaces
silently overwrite each other in the bootstrap chart.

## Why
`buildBootstrapInput` keyed the bootstrap `Releases` map on `ri.name` —
the bare Kubernetes Release object name. With cross-namespace
ReleaseBindings (#541) two Releases named `my-release` from different
namespaces can both survive conflict resolution and target the same
Target, colliding on the map key and dropping one deployment silently.

Fix: key on `uniqueName` instead — already guaranteed unique among
accepted releases by the resolver. Also extract the derivation rule into
a shared `effectiveUniqueName()` helper (was duplicated in both
controllers), and add a guard that returns an explicit error if
`uniqueName` is empty.

## Testing
- New `buildBootstrapInput` tests: cross-namespace collision (via full
`resolveReleaseConflicts` path) and explicit error on empty
`uniqueName`.
- `make test` / `make lint` — clean.

## Notes for reviewers
- **Upgrade path:** bootstrap map keys change from the Release object
name to `uniqueName`. Existing Targets where the two differ will have
inner FluxCD HelmReleases recreated on next bootstrap render.
- `effectiveUniqueName(rel, cv)` lives in `helpers.go`; both controllers
use it.
- Docs updated: `rendering-pipeline.md` and ADR-004 now document why
`uniqueName` is the bootstrap identity and why the object name is
unsuitable.

## Checklist
- [x] Tests added/updated
- [x] No breaking changes (or upgrade path documented above)
- [x] Readable commit history (squashed and cleaned up as desired)
- [x] AI code review considered and comments resolved

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Prevented release overwrites when releases share the same Kubernetes
object name across namespaces by keying bootstrap inputs by a stable
... (continued)

16 of 16 new or added lines in 3 files covered. (100.0%)

6 existing lines in 2 files now uncovered.

2638 of 3559 relevant lines covered (74.12%)

31.99 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
72.1
-0.39% pkg/controller/target_controller.go
2
77.91
0.39% pkg/controller/profile_controller.go
Jobs
ID Job ID Ran Files Coverage
1 27348406272.1 11 Jun 2026 01:11PM UTC 30
74.12
GitHub Action Run
Source Files on build 27348406272
  • Tree
  • List 30
  • Changed 5
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27348406272
  • fe06338b on github
  • Prev Build on main (#27343327608)
  • Next Build on main (#27404628011)
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