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

Refactor/de-tangle Assets class #1817

Open
samayer12 opened this issue Feb 12, 2025 · 0 comments
Open

Refactor/de-tangle Assets class #1817

samayer12 opened this issue Feb 12, 2025 · 0 comments
Milestone

Comments

@samayer12
Copy link
Contributor

Describe what should be investigated or refactored

While working on stories related to assets.ts (e.g., #1723, #1759, #1753, #1670, #1647, and #1635) we've noticed some issues with the overall structure of the class that make it difficult to work with. We should set aside some time to critique the structure of Assets and develops a plan to refactor it.

A successful refactor will facilitate:

  • Easy test data generation
  • Clear usage patterns for consumers
  • Reduction in shared global state

Links to any relevant code

Additional context

github-merge-queue bot pushed a commit that referenced this issue Feb 12, 2025
## Description

We identified a testing gap that exists when a webhook is generated from
an instance of the `Assets` object that has `Assets.host` defined. This
test case addresses that gap.

**NOTE**: There's some tight coupling with the `Assets` class and the
use of a massive JSON string to create our test `assets` object in this
file. Resolving those issue are outside the scope of this PR but do need
to be addressed by future work. See #1816 and #1817

## Related Issue

Fixes #1723

## 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
@cmwylie19 cmwylie19 added this to the v0.46.1 milestone Feb 24, 2025
@cmwylie19 cmwylie19 moved this from 🆕 New to 📋 Backlog in Pepr Project Board Feb 24, 2025
@cmwylie19 cmwylie19 modified the milestones: v0.46.1, v0.46.2 Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants