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

Fix errors and warnings for the .reflect_shared() example #1625

Merged
merged 2 commits into from
Nov 3, 2024

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Nov 2, 2024

Doesn't compile with the & (nonsense both type-wise and lifetime-wise), might as well fix the other warnings while at it. Also moved the subscription into a concurrent task since it's unreachable otherwise.

Also not sure about whether we want to add a tracing init too.. on one hand it's kind of tangential to the main thing being demonstrated, on the other hand it's easy to get confused by the empty output if you're not used to how tracing works.

Discovered while looking into https://discord.com/channels/500028886025895936/1302071483585269771.

…r run since the reflector looping forever

Signed-off-by: Natalie Klestrup Röijezon <[email protected]>
@nightkr nightkr requested a review from a team November 2, 2024 12:57
Copy link

codecov bot commented Nov 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.3%. Comparing base (a0fcd1e) to head (71de1bd).
Report is 3 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1625   +/-   ##
=====================================
  Coverage   75.3%   75.3%           
=====================================
  Files         82      82           
  Lines       7344    7344           
=====================================
  Hits        5528    5528           
  Misses      1816    1816           
Files with missing lines Coverage Δ
kube-runtime/src/utils/watch_ext.rs 22.3% <ø> (ø)

Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

Ah, good catch. I guess we expected the subscriber to normally be polled through a second controller, as in the shared stream example these are ultimately polled via a select! arm.

@clux clux added the changelog-exclude changelog excluded prs label Nov 2, 2024
@clux clux added this to the 0.97.0 milestone Nov 2, 2024
@nightkr nightkr merged commit 179936a into kube-rs:main Nov 3, 2024
17 checks passed
@nightkr nightkr deleted the docs/fix-reflect-shared-example branch November 3, 2024 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-exclude changelog excluded prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants