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 store code #1259

Merged
merged 44 commits into from
Oct 28, 2024
Merged

chore: refactor store code #1259

merged 44 commits into from
Oct 28, 2024

Conversation

samayer12
Copy link
Collaborator

Description

Refactor the store.ts file.

End to End Test:
(See Pepr Excellent Examples)

Related Issue

Fixes #959

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

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 72.52747% with 25 lines in your changes missing coverage. Please review.

Project coverage is 78.01%. Comparing base (7260348) to head (cfb86da).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/controller/store.ts 14.81% 23 Missing ⚠️
src/lib/controller/index.ts 33.33% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (7260348) and HEAD (cfb86da). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (7260348) HEAD (cfb86da)
3 2
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1259      +/-   ##
==========================================
- Coverage   85.64%   78.01%   -7.64%     
==========================================
  Files          31       35       +4     
  Lines        1449     1669     +220     
  Branches      319      370      +51     
==========================================
+ Hits         1241     1302      +61     
- Misses        206      365     +159     
  Partials        2        2              
Files with missing lines Coverage Δ
src/lib/capability.ts 94.90% <100.00%> (ø)
src/lib/controller/storeCache.ts 100.00% <100.00%> (ø)
src/lib/k8s.ts 100.00% <100.00%> (ø)
src/lib/logger.ts 100.00% <100.00%> (ø)
src/lib/controller/index.ts 9.30% <33.33%> (ø)
src/lib/controller/store.ts 10.95% <14.81%> (-6.15%) ⬇️

... and 2 files with indirect coverage changes

@samayer12 samayer12 marked this pull request as ready for review October 23, 2024 20:15
@samayer12 samayer12 requested a review from a team as a code owner October 23, 2024 20:15
Copy link
Contributor

@schaeferka schaeferka left a comment

Choose a reason for hiding this comment

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

I wasn't sure if you meant to leave the "skip" tests in, so I left a comment on them.

A couple of months ago we had a discussion about fuzz testing. I'm not sure if it relates to the fuzzing items you removed, but it may be worth double checking.

@samayer12
Copy link
Collaborator Author

A couple of months ago we had a discussion about fuzz testing. I'm not sure if it relates to the fuzzing items you removed, but it may be worth double checking.

@schaeferka, the fuzzing that is on main didn't seem to provide any value to the unit tests for the refactored logger.test.ts test cases so I removed it. It looks like it was used to provide input to test against the "negative" case (i.e., should not redact) and I think the current tests cover that.

src/lib/capability.test.ts Outdated Show resolved Hide resolved
src/lib/controller/store.ts Outdated Show resolved Hide resolved
src/lib/logger.ts Outdated Show resolved Hide resolved
src/lib/controller/storeCache.test.ts Show resolved Hide resolved
@cmwylie19 cmwylie19 added this to the v0.39.0 milestone Oct 24, 2024
@samayer12 samayer12 self-assigned this Oct 24, 2024
btlghrants
btlghrants previously approved these changes Oct 24, 2024
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 reasonable. 👍

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.

LGTM

@btlghrants btlghrants merged commit b669f84 into main Oct 28, 2024
45 of 46 checks passed
@btlghrants btlghrants deleted the 959-refactor-store-code branch October 28, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

refactor the store to share code
4 participants