vmware-labs / reconciler-runtime

⚠️ Maintenance suspended. Please, migrate to the active fork reconciler.io/runtime. See https://github.com/reconcilerio/runtime/releases/tag/v0.20.0 for instructions. This repository will be archived eventually.
Other
81 stars 18 forks source link

Require ListOptions when SkipOwnerReference is true #493

Closed scothis closed 4 months ago

scothis commented 4 months ago

The most common reason to disable owner references for a child resource is when that resource is in a different namespace. In that case, the default ListOptions (filter by the parent's namespace) is ineffective and will orphan the child resource.

We now validate that ListOptions is defined when SkipOwnerReference is true and fail fast.

Fixes #488

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.18%. Comparing base (36a3451) to head (8d95557).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #493 +/- ## ========================================== + Coverage 61.12% 61.18% +0.06% ========================================== Files 28 28 Lines 2562 2566 +4 ========================================== + Hits 1566 1570 +4 Misses 909 909 Partials 87 87 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

vmwclabot commented 3 months ago

@scothis, VMware has approved your signed contributor license agreement.