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

chore: refactor complex implementation of request-processing filters #1333

Merged
merged 56 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
ad34c61
Sort imports
samayer12 Oct 24, 2024
04bc01a
Create wrapper to translate adjudicators into filters
samayer12 Oct 24, 2024
4fb0480
Use filterchain function in tests
samayer12 Oct 24, 2024
0bed132
Use it() instead of test()
samayer12 Oct 24, 2024
a5da313
Support namespace regex filter
samayer12 Oct 24, 2024
531175b
support namespace test cases with filter chain
samayer12 Oct 24, 2024
dc85c20
Support deletion timestamp tests
samayer12 Oct 24, 2024
e8398e7
Support label and annotation test cases
samayer12 Oct 24, 2024
2fe80ec
Support kind filter tests
samayer12 Oct 24, 2024
231efee
Support group and version filters
samayer12 Oct 24, 2024
b1e72f9
Add support for ignored namespaces on filter chain
samayer12 Oct 24, 2024
6e2f724
Replace shouldSkipRequest() with FilterChain implementation
samayer12 Oct 24, 2024
b6659fd
Merge branch 'main' into 1248-refactor-complexity-warnings
samayer12 Oct 24, 2024
343ffdf
Initial attempt to consolidate filter-generation logic
samayer12 Oct 24, 2024
adb2bf3
Fix log message format
samayer12 Oct 25, 2024
a9cce0f
Review log messags & fix tests
samayer12 Oct 25, 2024
662f7a2
Support ignore array operations
samayer12 Oct 25, 2024
a37790e
Rename obj to kubernetesObject
samayer12 Oct 25, 2024
6fed3fb
Add more standardized log messages
samayer12 Oct 25, 2024
23337da
Apply standard log message to filters with shared contents
samayer12 Oct 25, 2024
7456b5d
Extract request selection logic to shared function
samayer12 Oct 25, 2024
4d1ff59
Move filtering code to 'filter' directory
samayer12 Oct 25, 2024
0ffdd80
Move FilterChain to own file
samayer12 Oct 25, 2024
3584e68
Rename file that only exports one function
samayer12 Oct 25, 2024
91896e8
Support multiple logging flows in bindingKubernetesObject Log
samayer12 Oct 25, 2024
7abc3d0
Rename file for clarity
samayer12 Oct 25, 2024
e55ee47
Move filter types to types
samayer12 Oct 25, 2024
093dc0c
Support all logging with defined helper functions
samayer12 Oct 25, 2024
fc273b0
Remove complexity suppression
samayer12 Oct 25, 2024
cde5094
Remove TODO
samayer12 Oct 25, 2024
541cebb
Reorganize tests
samayer12 Oct 25, 2024
0b09f22
Create default test inputs
samayer12 Oct 25, 2024
535d450
Consolidate test setup
samayer12 Oct 25, 2024
69f5a45
Consolidate more test setup
samayer12 Oct 25, 2024
9385b6d
Merge branch 'main' into 1248-refactor-complexity-warnings
samayer12 Oct 25, 2024
c5bbcfc
Merge branch 'main' into 1248-refactor-complexity-warnings
samayer12 Oct 28, 2024
4c4158b
Merge branch 'main' into 1248-refactor-complexity-warnings
samayer12 Oct 28, 2024
28fda9f
Note some TODO items
samayer12 Oct 28, 2024
d82ce85
Merge branch 'main' into 1248-refactor-complexity-warnings
samayer12 Oct 28, 2024
007baf4
Add missing filters
samayer12 Oct 29, 2024
632a84a
Ignore .DS_Store everywhere
samayer12 Oct 29, 2024
3903fee
Stop filtering after first failure
samayer12 Oct 29, 2024
db49882
Refactor log message generation
samayer12 Oct 29, 2024
3155e43
Create skeleton for new unit tests
samayer12 Oct 29, 2024
fce8eee
Move some functions to use a common logger
samayer12 Oct 29, 2024
75dd70f
Remove dangling logging logic
samayer12 Oct 29, 2024
d8476c9
Set functions to take input, then criteria
samayer12 Oct 29, 2024
0d2a906
Rename adjudicator variables for clarity
samayer12 Oct 29, 2024
b000c54
Fix issue with namespace logging
samayer12 Oct 29, 2024
b649d19
Add tests to ensure filter chain stops after a failure
samayer12 Oct 29, 2024
6453783
Unify all logging under commonLogMessage
samayer12 Oct 29, 2024
4cc76a7
Present common log message in a less-complex way
samayer12 Oct 29, 2024
f1d94ff
Add test for unsupported subject types
samayer12 Oct 29, 2024
048e707
Ensure that at least one character is logged in regex matcher
samayer12 Oct 29, 2024
39d2b85
Merge branch 'main' into 1248-refactor-complexity-warnings
samayer12 Oct 29, 2024
2b6ea1e
Merge branch 'main' into 1248-refactor-complexity-warnings
cmwylie19 Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pepr-test-module
pepr-upgrade-test
*.tgz
coverage/
src/.DS_Store
.DS_Store
# Test binary, build with `go test -c`
*.test

Expand Down
Loading
Loading