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(ts): add typing to adjudicators used in validation and mutation processing #1402

Merged
merged 73 commits into from
Dec 5, 2024

Conversation

samayer12
Copy link
Collaborator

@samayer12 samayer12 commented Nov 7, 2024

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:
(See 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)
  • Other (security config, docs update, etc)

Checklist before merging

@samayer12 samayer12 self-assigned this Nov 7, 2024
@samayer12 samayer12 modified the milestone: v0.40.0 Nov 7, 2024
@samayer12 samayer12 force-pushed the 1397-type-adjudicators branch from 029545e to 627f291 Compare November 8, 2024 19:31
@samayer12 samayer12 force-pushed the 1397-type-adjudicators branch from 627f291 to a169536 Compare November 18, 2024 19:24
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 96.82540% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.18%. Comparing base (e4839a4) to head (51be324).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/filter/adjudicators.ts 94.59% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1402      +/-   ##
==========================================
+ Coverage   79.12%   79.18%   +0.05%     
==========================================
  Files          39       40       +1     
  Lines        1720     1734      +14     
  Branches      388      387       -1     
==========================================
+ Hits         1361     1373      +12     
- Misses        357      359       +2     
  Partials        2        2              
Files with missing lines Coverage Δ
src/lib/capability.ts 94.90% <ø> (ø)
src/lib/filter/adjudicators/defaultTestObjects.ts 100.00% <100.00%> (ø)
src/lib/helpers.ts 97.93% <100.00%> (-0.03%) ⬇️
src/lib/filter/adjudicators.ts 98.46% <94.59%> (-1.54%) ⬇️

src/lib/helpers.test.ts Outdated Show resolved Hide resolved
src/lib/helpers.test.ts Outdated Show resolved Hide resolved
src/lib/helpers.ts Outdated Show resolved Hide resolved
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.

What a hoss! Glad we talked it through synchronously at the community meet today.

@cmwylie19 cmwylie19 added this pull request to the merge queue Dec 5, 2024
Merged via the queue into main with commit 72ed2ef Dec 5, 2024
46 checks passed
@cmwylie19 cmwylie19 deleted the 1397-type-adjudicators branch December 5, 2024 00:37
github-merge-queue bot pushed a commit that referenced this pull request Dec 16, 2024
## Description

Collectively, the Pepr team has reviewed some large PRs lately (e.g.,
#1262, #1543, #1539, #1396, #1402, #1407). We prefer several smaller PRs
to reduce the amount of time spent in code-review and to encourage
working in small chunks. This script is an example of a pre-push hook
using Husky that warns devs when their branch may be too large.

This PR does not fulfill a need in the backlog, and does not _need_ to
be merged. Rather, it's offered as an example to how a Pepr developer
might use a similar script for their local development.

## Related Issue

None.

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants