Skip to content

Extract stash machinery into dedicated package#650

Merged
scothis merged 1 commit intoreconcilerio:mainfrom
scothis:stash-pkg
Sep 16, 2025
Merged

Extract stash machinery into dedicated package#650
scothis merged 1 commit intoreconcilerio:mainfrom
scothis:stash-pkg

Conversation

@scothis
Copy link
Member

@scothis scothis commented Sep 14, 2025

The existing types/names are aliased back into the reconcilers package to preserve compatibility.

Symbol names in the new package have evolved slightly to avoid redundancy:

  • StashKey -> Key
  • NewStasher -> New
  • WithStash -> WithContext
  • StashValue -> StoreValue
  • ErrStashValueNotFound -> ErrValueNotFound
  • ErrStashValueNotAssignable -> ErrValueNotAssignable

Resolves #591

The existing types/names are aliased back into the reconcilers package
to preserve compatibility.

Symbol names in the new package have evolved slightly to avoid
redundancy:

- `StashKey` -> `Key`
- `NewStasher` -> `New`
- `WithStash` -> `WithContext`
- `StashValue` -> `StoreValue`
- `ErrStashValueNotFound` -> `ErrValueNotFound`
- `ErrStashValueNotAssignable` -> `ErrValueNotAssignable`

Signed-off-by: Scott Andrews <scott@andrews.me>
@scothis scothis requested a review from mamachanko September 14, 2025 18:49
@codecov
Copy link

codecov bot commented Sep 14, 2025

Codecov Report

❌ Patch coverage is 52.94118% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.28%. Comparing base (d578435) to head (f820665).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
testing/objectmanager.go 0.00% 6 Missing ⚠️
testing/subreconciler.go 0.00% 4 Missing ⚠️
reconcilers/alias.go 0.00% 3 Missing ⚠️
stash/stash.go 90.90% 1 Missing ⚠️
testing/diff.go 0.00% 1 Missing ⚠️
testing/webhook.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #650      +/-   ##
==========================================
- Coverage   57.34%   57.28%   -0.07%     
==========================================
  Files          38       39       +1     
  Lines        4504     4507       +3     
==========================================
- Hits         2583     2582       -1     
- Misses       1807     1811       +4     
  Partials      114      114              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scothis scothis merged commit ec87995 into reconcilerio:main Sep 16, 2025
2 of 4 checks passed
@scothis scothis deleted the stash-pkg branch September 16, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract stash package

1 participant