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

runtime: rename references from Flatten to Decode #1520

Merged
merged 11 commits into from
Oct 4, 2024
Merged

runtime: rename references from Flatten to Decode #1520

merged 11 commits into from
Oct 4, 2024

Conversation

clux
Copy link
Member

@clux clux commented Jun 13, 2024

closes #1517 - we no longer flatten anything.

creates a deprecated type alias for EventFlatten in its place because is actually exposed. Users of WatchStreamExt direct will not notice / care for this, but would be nice if direct users - if they exist - get a warning.

docs updated in kube-rs/website#66

@clux clux added the changelog-change changelog change category for prs label Jun 13, 2024
@clux clux added this to the 0.93.0 milestone Jun 13, 2024
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

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

Project coverage is 75.3%. Comparing base (27a2129) to head (5a70ab4).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
kube-runtime/src/utils/watch_ext.rs 50.0% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1520   +/-   ##
=====================================
  Coverage   75.3%   75.3%           
=====================================
  Files         82      82           
  Lines       7331    7331           
=====================================
  Hits        5515    5515           
  Misses      1816    1816           
Files with missing lines Coverage Δ
kube-runtime/src/utils/event_decode.rs 91.2% <100.0%> (ø)
kube-runtime/src/utils/mod.rs 62.3% <ø> (ø)
kube-runtime/src/watcher.rs 44.2% <ø> (ø)
kube-runtime/src/utils/watch_ext.rs 22.3% <50.0%> (ø)

@clux clux marked this pull request as ready for review June 13, 2024 21:42
@clux clux requested a review from mateiidavid June 18, 2024 16:02
Copy link
Contributor

@mateiidavid mateiidavid left a comment

Choose a reason for hiding this comment

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

No blockers from my side, although I did have some thoughts. Looks good and it's nice we managed to simplify the whole machinery!

kube-runtime/src/utils/mod.rs Outdated Show resolved Hide resolved
@@ -9,17 +9,17 @@ use pin_project::pin_project;
#[pin_project]
/// Stream returned by the [`applied_objects`](super::WatchStreamExt::applied_objects) and [`touched_objects`](super::WatchStreamExt::touched_objects) method.
#[must_use = "streams do nothing unless polled"]
pub struct EventFlatten<St> {
pub struct EventFilter<St> {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpicky thought: EventFilter sounds like a good name imo, especially given its use now. I wonder thought if it makes sense to me because I've seen it before. Would users conflate it with PredicateFilter (although, being my own's devil advocate, that's what docs are for).

Would a name like EventDecode work better to convey that what we are actually doing is just taking the inner value?

Copy link
Member Author

Choose a reason for hiding this comment

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

hm, yeah... possibly. maybe i'll hang on to this PR for a little bit first to see if it clashes with use cases for stream forwarding (since it was also running into the same issues.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have updated to EventDecode now.

kube-runtime/src/utils/mod.rs Outdated Show resolved Hide resolved
@clux clux removed this from the 0.93.0 milestone Jun 19, 2024
@clux clux added this to the 0.96.0 milestone Oct 3, 2024
@clux clux changed the title runtime: rename references from Flatten to Filter where necessary runtime: rename references from Flatten to Decode where necessary Oct 3, 2024
@clux clux changed the title runtime: rename references from Flatten to Decode where necessary runtime: rename references from Flatten to Decode Oct 3, 2024
Signed-off-by: clux <[email protected]>
@clux clux merged commit 7920fc3 into main Oct 4, 2024
18 checks passed
@clux clux deleted the flatten-rename branch October 4, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-change changelog change category for prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove relics of unflattened / flattened stream
2 participants