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: named callbacks ADR #676

Merged
merged 16 commits into from
Aug 22, 2024
Merged

chore: named callbacks ADR #676

merged 16 commits into from
Aug 22, 2024

Conversation

cmwylie19
Copy link
Collaborator

Description

Pepr is a system of callbacks that produce logs. The callbacks are anonymous, so debugging which log comes from which callback can be confusing unless you manually write a name in the log message from within the callback. This consideration needs an ADR.

Related Issue

Fixes #675

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>
@jeff-mccoy
Copy link
Member

Could you show a compete example of what this would look like?

Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
adr/0008-named-callbacks.md Outdated Show resolved Hide resolved
adr/0008-named-callbacks.md Outdated Show resolved Hide resolved
adr/0008-named-callbacks.md Outdated Show resolved Hide resolved
adr/0008-named-callbacks.md Outdated Show resolved Hide resolved
cmwylie19 and others added 3 commits March 21, 2024 16:19
Added suggestion by @btlghrants

Co-authored-by: Barrett <81570928+btlghrants@users.noreply.github.com>
committing suggestion

Co-authored-by: Barrett <81570928+btlghrants@users.noreply.github.com>
Co-authored-by: Barrett <81570928+btlghrants@users.noreply.github.com>
adr/0008-named-callbacks.md Outdated Show resolved Hide resolved
@cmwylie19
Copy link
Collaborator Author

Was chatting with @brandtkeller about a Lula use-case where they need to validate that certain policies exist and it seems like this could be a useful mechanism to tell a compliance tool what a binding is responsible for.

When(a.Pod)
  .IsCreatedOrUpdated()
  .Validate(po => {
  // reject is running as root, or is privileged, etc
   })
  .Alias("reject:pods:runAsRoot:privileged:runAsGroup<10:allowPrivilegeEscalation")

going to go ahead and get this prioritized because the Lula team needs it.

@cmwylie19
Copy link
Collaborator Author

cmwylie19 commented Jun 5, 2024

We need to verify that we are able to inject the name of the .Alias into logs of the callback function.

If it were possible it would need to be done with the Log object

const Log = pino({
  transport,
  timestamp: pinoTimeFunction,
});

and import that into the mutate processor and set

Log.prefix = the bindings alias

@cmwylie19 cmwylie19 mentioned this pull request Jun 5, 2024
2 tasks
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.71%. Comparing base (26b4e95) to head (9028c61).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #676   +/-   ##
=======================================
  Coverage   85.71%   85.71%           
=======================================
  Files          26       26           
  Lines        1008     1008           
  Branches      212      197   -15     
=======================================
  Hits          864      864           
- Misses        133      142    +9     
+ Partials       11        2    -9     

see 3 files with indirect coverage changes

@schaeferka schaeferka marked this pull request as draft August 22, 2024 03:13
schaeferka
schaeferka previously approved these changes Aug 22, 2024
Copy link
Collaborator

@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.

The new Alias function matches what is described in the ADR


## Status

Delayed - Revisiting this in the future and recommending that named callbacks be used in the interim.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Accepted

@schaeferka schaeferka marked this pull request as ready for review August 22, 2024 03:34
Copy link
Collaborator Author

@cmwylie19 cmwylie19 left a comment

Choose a reason for hiding this comment

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

approved, just changed status to accepted!

@cmwylie19 cmwylie19 merged commit 307ed5f into main Aug 22, 2024
15 checks passed
@cmwylie19 cmwylie19 deleted the 675 branch August 22, 2024 13:17
mjnagel referenced this pull request in defenseunicorns/uds-core Sep 17, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
| [husky](https://github.com/typicode/husky) | [`9.1.5` ->
`9.1.6`](https://renovatebot.com/diffs/npm/husky/9.1.5/9.1.6) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/husky/9.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/husky/9.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/husky/9.1.5/9.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/husky/9.1.5/9.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [pepr](https://github.com/defenseunicorns/pepr) | [`0.34.1`
-> `0.36.0`](https://renovatebot.com/diffs/npm/pepr/0.34.1/0.36.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pepr/0.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pepr/0.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pepr/0.34.1/0.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pepr/0.34.1/0.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | minor |
|
[registry1.dso.mil/ironbank/opensource/defenseunicorns/pepr/controller](https://github.com/defenseunicorns/pepr)
([source](https://repo1.dso.mil/dsop/opensource/defenseunicorns/pepr/controller))
| `v0.34.1` -> `v0.36.0` |
[![age](https://developer.mend.io/api/mc/badges/age/docker/registry1.dso.mil%2fironbank%2fopensource%2fdefenseunicorns%2fpepr%2fcontroller/v0.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/registry1.dso.mil%2fironbank%2fopensource%2fdefenseunicorns%2fpepr%2fcontroller/v0.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/registry1.dso.mil%2fironbank%2fopensource%2fdefenseunicorns%2fpepr%2fcontroller/v0.34.1/v0.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/registry1.dso.mil%2fironbank%2fopensource%2fdefenseunicorns%2fpepr%2fcontroller/v0.34.1/v0.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| | minor |
| [ts-jest](https://kulshekhar.github.io/ts-jest)
([source](https://github.com/kulshekhar/ts-jest)) | [`29.2.4`
-> `29.2.5`](https://renovatebot.com/diffs/npm/ts-jest/29.2.4/29.2.5) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/ts-jest/29.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/ts-jest/29.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/ts-jest/29.2.4/29.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ts-jest/29.2.4/29.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |

---

### Release Notes

<details>
<summary>typicode/husky (husky)</summary>

###
[`v9.1.6`](https://github.com/typicode/husky/compare/v9.1.5...a2d942a670b3d6a04578005a0fd2dc310e511849)

[Compare
Source](https://github.com/typicode/husky/compare/v9.1.5...v9.1.6)

</details>

<details>
<summary>defenseunicorns/pepr (pepr)</summary>

###
[`v0.36.0`](https://github.com/defenseunicorns/pepr/releases/tag/v0.36.0)

[Compare
Source](https://github.com/defenseunicorns/pepr/compare/v0.35.0...v0.36.0)

##### Features

- feat: withdeletiontimestamp filter by
[@&#8203;cmwylie19](https://github.com/cmwylie19) in
[https://github.com/defenseunicorns/pepr/pull/1026](https://github.com/defenseunicorns/pepr/pull/1026)
- feat: update CODEOWNERS by
[@&#8203;daveworth](https://github.com/daveworth) in
[https://github.com/defenseunicorns/pepr/pull/1111](https://github.com/defenseunicorns/pepr/pull/1111)
- feat: update pepr reconcile strategy by
[@&#8203;btlghrants](https://github.com/btlghrants) in
[https://github.com/defenseunicorns/pepr/pull/1127](https://github.com/defenseunicorns/pepr/pull/1127)

##### What's Changed

- chore: support optional fields in ownerReferences by
[@&#8203;samayer12](https://github.com/samayer12) in
[https://github.com/defenseunicorns/pepr/pull/1104](https://github.com/defenseunicorns/pepr/pull/1104)
- fix: reconcile queues scrambling Action callbacks by
[@&#8203;btlghrants](https://github.com/btlghrants) in
[https://github.com/defenseunicorns/pepr/pull/1119](https://github.com/defenseunicorns/pepr/pull/1119)
- chore: squash High findings in pepr controller image by
[@&#8203;btlghrants](https://github.com/btlghrants) in
[https://github.com/defenseunicorns/pepr/pull/1123](https://github.com/defenseunicorns/pepr/pull/1123)
- chore: bump github/codeql-action from 3.26.5 to 3.26.6 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1107](https://github.com/defenseunicorns/pepr/pull/1107)
- chore: bump actions/upload-artifact from 4.3.6 to 4.4.0 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1112](https://github.com/defenseunicorns/pepr/pull/1112)
- chore: bump pino from 9.3.2 to 9.4.0 in the production-dependencies
group by [@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1117](https://github.com/defenseunicorns/pepr/pull/1117)
- chore: bump
[@&#8203;types/node](https://github.com/types/node) from 22.5.1
to 22.5.4 in the dev-deps group across 1 directory by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1118](https://github.com/defenseunicorns/pepr/pull/1118)
- chore: bump the development-dependencies group with 2 updates by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1132](https://github.com/defenseunicorns/pepr/pull/1132)
- chore: bump send and express by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1133](https://github.com/defenseunicorns/pepr/pull/1133)
- chore: bump step-security/harden-runner from 2.9.1 to 2.10.1 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1130](https://github.com/defenseunicorns/pepr/pull/1130)
- chore: bump github/codeql-action from 3.26.6 to 3.26.7 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1135](https://github.com/defenseunicorns/pepr/pull/1135)
- chore: bump kubernetes-fluent-client from 3.0.2 to 3.0.3 in the
production-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1136](https://github.com/defenseunicorns/pepr/pull/1136)
- chore: bump chainguard/node from `0a7847d` to `5b59be4` by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1138](https://github.com/defenseunicorns/pepr/pull/1138)
- chore: bump
[@&#8203;types/node](https://github.com/types/node) from 22.5.4
to 22.5.5 in the development-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1137](https://github.com/defenseunicorns/pepr/pull/1137)

##### New Contributors

- [@&#8203;daveworth](https://github.com/daveworth) made their
first contribution in
[https://github.com/defenseunicorns/pepr/pull/1111](https://github.com/defenseunicorns/pepr/pull/1111)
- [@&#8203;samayer12](https://github.com/samayer12) made their
first contribution in
[https://github.com/defenseunicorns/pepr/pull/1104](https://github.com/defenseunicorns/pepr/pull/1104)

**Full Changelog**:
defenseunicorns/pepr@v0.35.0...v0.36.0

###
[`v0.35.0`](https://github.com/defenseunicorns/pepr/releases/tag/v0.35.0)

[Compare
Source](https://github.com/defenseunicorns/pepr/compare/v0.34.1...v0.35.0)

#### What's Changed

**Features**

- feat: add custom liveness and readiness probes to helm chart by
[@&#8203;nfoucha](https://github.com/nfoucha) in
[https://github.com/defenseunicorns/pepr/pull/1086](https://github.com/defenseunicorns/pepr/pull/1086)
- feat: sharded queue implementation by
[@&#8203;cmwylie19](https://github.com/cmwylie19) in
[https://github.com/defenseunicorns/pepr/pull/1025](https://github.com/defenseunicorns/pepr/pull/1025)
- feat: sharded queue feature flag
[@&#8203;btlghrants](https://github.com/btlghrants) in
[https://github.com/defenseunicorns/pepr/pull/1025](https://github.com/defenseunicorns/pepr/pull/1025)

**Other**

- chore: bash based soak by
[@&#8203;cmwylie19](https://github.com/cmwylie19) in
[https://github.com/defenseunicorns/pepr/pull/1072](https://github.com/defenseunicorns/pepr/pull/1072)
- chore: named callbacks ADR by
[@&#8203;schaeferka](https://github.com/schaeferka) in
[https://github.com/defenseunicorns/pepr/pull/676](https://github.com/defenseunicorns/pepr/pull/676)
- chore: add e2e test reference in pr template by
[@&#8203;cmwylie19](https://github.com/cmwylie19) in
[https://github.com/defenseunicorns/pepr/pull/1091](https://github.com/defenseunicorns/pepr/pull/1091)
- chore: address GHSA-952p-6rrq-rcjv by
[@&#8203;cmwylie19](https://github.com/cmwylie19) in
[https://github.com/defenseunicorns/pepr/pull/1084](https://github.com/defenseunicorns/pepr/pull/1084)
- chore: pin deps soak test by
[@&#8203;cmwylie19](https://github.com/cmwylie19) in
[https://github.com/defenseunicorns/pepr/pull/1083](https://github.com/defenseunicorns/pepr/pull/1083)
- chore: pin deps release action by
[@&#8203;cmwylie19](https://github.com/cmwylie19) in
[https://github.com/defenseunicorns/pepr/pull/1082](https://github.com/defenseunicorns/pepr/pull/1082)
- chore: default relist interval 10 min by
[@&#8203;cmwylie19](https://github.com/cmwylie19) in
[https://github.com/defenseunicorns/pepr/pull/1099](https://github.com/defenseunicorns/pepr/pull/1099)
- chore: added waitForConfigMapKey by
[@&#8203;schaeferka](https://github.com/schaeferka) in
[https://github.com/defenseunicorns/pepr/pull/1066](https://github.com/defenseunicorns/pepr/pull/1066)

**Dependency Updates**

- chore: bump actions/upload-artifact from 2 to 4 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1071](https://github.com/defenseunicorns/pepr/pull/1071)
- chore: bump nock from 13.5.4 to 13.5.5 in the development-dependencies
group by [@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1070](https://github.com/defenseunicorns/pepr/pull/1070)
- chore: bump
[@&#8203;types/node](https://github.com/types/node) from 22.4.1
to 22.5.0 in the development-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1078](https://github.com/defenseunicorns/pepr/pull/1078)
- chore: bump github/codeql-action from 3.26.2 to 3.26.3 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1067](https://github.com/defenseunicorns/pepr/pull/1067)
- chore: bump anchore/scan-action from 4.1.1 to 4.1.2 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1077](https://github.com/defenseunicorns/pepr/pull/1077)
- chore: bump actions/upload-artifact from 3 to 4 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1076](https://github.com/defenseunicorns/pepr/pull/1076)
- chore: bump github/codeql-action from 3.26.3 to 3.26.4 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1074](https://github.com/defenseunicorns/pepr/pull/1074)
- chore: bump azure/setup-kubectl from 3 to 4 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1075](https://github.com/defenseunicorns/pepr/pull/1075)
- chore: bump github/codeql-action from 3.26.4 to 3.26.5 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1089](https://github.com/defenseunicorns/pepr/pull/1089)
- chore: bump micromatch from 4.0.7 to 4.0.8 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1090](https://github.com/defenseunicorns/pepr/pull/1090)
- chore: bump ts-jest from 29.2.4 to 29.2.5 in the
development-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1088](https://github.com/defenseunicorns/pepr/pull/1088)
- chore: bump the development-dependencies group with 3 updates by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1095](https://github.com/defenseunicorns/pepr/pull/1095)
- chore: bump
[@&#8203;types/ramda](https://github.com/types/ramda) from
0.30.1 to 0.30.2 in the production-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1094](https://github.com/defenseunicorns/pepr/pull/1094)
- chore: bump kubernetes-fluent-client from 3.0.1 to 3.0.2 in the
production-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1100](https://github.com/defenseunicorns/pepr/pull/1100)
- chore: bump the development-dependencies group with 3 updates by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1101](https://github.com/defenseunicorns/pepr/pull/1101)
- chore: bump chainguard/node-lts from `c48eef3` to `62bbead` by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/defenseunicorns/pepr/pull/1064](https://github.com/defenseunicorns/pepr/pull/1064)

#### New Contributors

- [@&#8203;nfoucha](https://github.com/nfoucha) made their
first contribution in
[https://github.com/defenseunicorns/pepr/pull/1086](https://github.com/defenseunicorns/pepr/pull/1086)

**Full Changelog**:
defenseunicorns/pepr@v0.34.1...v0.35.0

</details>

<details>
<summary>kulshekhar/ts-jest (ts-jest)</summary>

###
[`v29.2.5`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2925-2024-08-23)

[Compare
Source](https://github.com/kulshekhar/ts-jest/compare/v29.2.4...v29.2.5)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/defenseunicorns/uds-core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
cmwylie19 added a commit that referenced this pull request Sep 24, 2024
## Description
We need to verify that we are able to inject the name of the .Alias into
logs of the callback function.

If it were possible it would need to be done with the Log object (import
it into the mutate/validate/watch processor)
```ts
const Log = pino({
  transport,
  timestamp: pinoTimeFunction,
});
```
and import that into the [mutate
processor](https://github.com/defenseunicorns/pepr/blob/0ec535efc6547f15fb4a02c35f6c3b8b4e5ecc22/src/lib/mutate-processor.ts#L80)
and set

set Log.prefix = the bindings alias before executing the callback

Checklist

- [x] Ensure `npx pepr monitor` is working and soak
- [ ] soak and verify with user base that feature is performing as
expected


## Related Issue

Fixes #858 
<!-- or -->
Relates to #676 

## 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

---------

Co-authored-by: Case Wylie <cmwylie19@defenseunicorns.com>
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.

named callbacks ADR
4 participants