Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Require ListOptions when SkipOwnerReference is true #493

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Require ListOptions when SkipOwnerReference is true #493

merged 1 commit into from
Mar 7, 2024

Conversation

scothis
Copy link
Contributor

@scothis scothis commented Mar 6, 2024

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

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.

Signed-off-by: Scott Andrews <[email protected]>
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mamachanko mamachanko merged commit e9224d1 into vmware-labs:main Mar 7, 2024
4 checks passed
@scothis scothis deleted the require-listoptions branch March 8, 2024 03:21
@vmwclabot
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues related to Child Resources having no owner references
3 participants