-
Notifications
You must be signed in to change notification settings - Fork 17
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
chore: refactor complex implementation of request-processing filters #1333
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1333 +/- ##
==========================================
+ Coverage 78.02% 79.36% +1.34%
==========================================
Files 35 38 +3
Lines 1670 1793 +123
Branches 371 363 -8
==========================================
+ Hits 1303 1423 +120
- Misses 365 368 +3
Partials 2 2
|
To troubleshoot CI issues locally, download the controller and image artifact from build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice this looks good now. Glad you got to get into the filter code.
## Description Reverts filter-chaining from #1333 due to regressions, but keeps subsequent work. End to End Test: <!-- if applicable --> (See [Pepr Excellent Examples](https://github.com/defenseunicorns/pepr-excellent-examples)) ## Related Issue Relates to #1248 Closes #1389 ## Type of change - [x] 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 - [x] Unit, [Journey](https://github.com/defenseunicorns/pepr/tree/main/journey), [E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples), [docs](https://github.com/defenseunicorns/pepr/tree/main/docs), [adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or updated as needed - [x] [Contributor Guide Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request) followed
… processing (#1402) ## Description The adjudicators are untyped, which caused complications when merging PR #1333. We should use TypeScript to enforce typing so that any refactors to filtering are based upon a solid foundation that does not require intermediate kludges with the typing system. End to End Test: <!-- if applicable --> (See [Pepr Excellent Examples](https://github.com/defenseunicorns/pepr-excellent-examples)) ## Related Issue Relates to #1248, #1406, #1407, #1408, #1409, #1397 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Other (security config, docs update, etc) ## Checklist before merging - [x] Unit, [Journey](https://github.com/defenseunicorns/pepr/tree/main/journey), [E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples), [docs](https://github.com/defenseunicorns/pepr/tree/main/docs), [adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or updated as needed - [x] [Contributor Guide Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request) followed --------- Co-authored-by: Case Wylie <[email protected]>
Description
This PR is part of the effort to reduce complexity in the code. Instead of using ternaries that are chained together, this refactor introduces a FilterChain analagous to what you might see in the Spring Framework to achieve the same outcome, improving readability and maintenance.
Related Issue
Relates to #1248
Type of change
Checklist before merging