Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: withdeletiontimestamp filter #1026

Merged
merged 15 commits into from
Aug 30, 2024
Merged

feat: withdeletiontimestamp filter #1026

merged 15 commits into from
Aug 30, 2024

Conversation

cmwylie19
Copy link
Collaborator

@cmwylie19 cmwylie19 commented Aug 3, 2024

Description

Adds a new filter .WithDeletionTimestamp to aid Operator developers as they use ownerRefs. Decide if .HasDeletionTimestamp needs to be done.

Needs:

Related Issue

Fixes #1018
Fixes: #1027

Relates to #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Copy link

codecov bot commented Aug 3, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 85.65%. Comparing base (8cd1cb1) to head (c104c81).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/capability.ts 0.00% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1026      +/-   ##
==========================================
- Coverage   85.90%   85.65%   -0.26%     
==========================================
  Files          26       26              
  Lines        1022     1032      +10     
  Branches      219      222       +3     
==========================================
+ Hits          878      884       +6     
- Misses        133      137       +4     
  Partials       11       11              
Files with missing lines Coverage Δ
src/lib/filter.ts 81.03% <100.00%> (+1.40%) ⬆️
src/lib/helpers.ts 97.00% <100.00%> (+0.03%) ⬆️
src/lib/types.ts 100.00% <ø> (ø)
src/lib/capability.ts 34.82% <0.00%> (-1.29%) ⬇️

@cmwylie19 cmwylie19 changed the title chore: WithDeletionTimestamp feat: withdeletiontimestamp filter Aug 3, 2024
@cmwylie19 cmwylie19 changed the title feat: withdeletiontimestamp filter wip-feat: withdeletiontimestamp filter Aug 3, 2024
@cmwylie19
Copy link
Collaborator Author

Codecov Report

Attention: Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.

Project coverage is 85.55%. Comparing base (5c0b2d9) to head (073ea49).

Files Patch % Lines
src/lib/capability.ts 0.00% 5 Missing ⚠️
Additional details and impacted files

false positive, this is tested in other ways and does not drop the overall coverage.

@cmwylie19 cmwylie19 changed the title wip-feat: withdeletiontimestamp filter feat: withdeletiontimestamp filter Aug 4, 2024
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
@cmwylie19 cmwylie19 added this to the v0.35.0 milestone Aug 5, 2024
@cmwylie19 cmwylie19 self-assigned this Aug 16, 2024
@cmwylie19 cmwylie19 modified the milestones: v0.35.0, v0.36.0 Aug 22, 2024
@cmwylie19 cmwylie19 added the uds Tracked by UDS project. Adds to UDS Inbox when applied. label Aug 22, 2024
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
src/lib/types.ts Outdated Show resolved Hide resolved
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
src/lib/helpers.ts Outdated Show resolved Hide resolved
src/lib/filter.ts Outdated Show resolved Hide resolved
src/lib/filter.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@samayer12 samayer12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from a stylistic choice on multiple && statements vs. Optional Chaining with? things look good. I'll still have to get more familiar with our tests

Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Co-authored-by: Barrett <81570928+btlghrants@users.noreply.github.com>
Copy link
Collaborator

@btlghrants btlghrants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit -- glad we chatted it through.

@cmwylie19
Copy link
Collaborator Author

CodeCov is false positive, the coverage remains at 85.

@cmwylie19 cmwylie19 merged commit a5ae3cc into main Aug 30, 2024
14 of 15 checks passed
@cmwylie19 cmwylie19 deleted the 1018 branch August 30, 2024 17:13
btlghrants added a commit that referenced this pull request Sep 10, 2024
## Description

Adds a new filter `.WithDeletionTimestamp` to aid Operator developers as
they use `ownerRefs`. Decide if `.HasDeletionTimestamp` needs to be
done.

Needs:
- [x] e2e test
(defenseunicorns/pepr-excellent-examples#61)
- [x] docs 

## Related Issue

Fixes #1018 
Fixes: #1027 
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Co-authored-by: Barrett <81570928+btlghrants@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
uds Tracked by UDS project. Adds to UDS Inbox when applied.
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Adds docs around the Pepr filters .WithDeletionTimestamp Filter
3 participants