Skip to content

Box a large runtime error in response to clippy#1880

Open
clux wants to merge 4 commits into
mainfrom
box-runtime-errs
Open

Box a large runtime error in response to clippy#1880
clux wants to merge 4 commits into
mainfrom
box-runtime-errs

Conversation

@clux
Copy link
Copy Markdown
Member

@clux clux commented Jan 2, 2026

Fixes a result_large_err clippy lint in runtime by boxing an the controller::Error for #1879. This does not generally break anything for error policies. None of my controllers have been affected. Modified an example to show this user defined error types round trip the same.

We generally discourage interrogating the internal reason for reconciliation which is the main thing this error allows you to do. However, people might in advanced use cases hit this, e.g. npmp / k8s-insider-agent from a code search.

Because of this, if we decide this is worth it, it would be a breaking change, and have applied a changelog-change label.

Signed-off-by: clux <sszynrae@gmail.com>
@clux clux added the changelog-change changelog change category for prs label Jan 2, 2026
@clux clux added this to the 3.0.0 milestone Jan 2, 2026
@clux clux linked an issue Jan 2, 2026 that may be closed by this pull request
Signed-off-by: clux <sszynrae@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.9%. Comparing base (14b5010) to head (bdfccec).
⚠️ Report is 52 commits behind head on main.

Files with missing lines Patch % Lines
kube-runtime/src/controller/mod.rs 0.0% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1880     +/-   ##
=======================================
+ Coverage   75.9%   75.9%   +0.1%     
=======================================
  Files         85      85             
  Lines       8237    8238      +1     
=======================================
+ Hits        6244    6248      +4     
+ Misses      1993    1990      -3     
Files with missing lines Coverage Δ
kube-runtime/src/controller/mod.rs 31.5% <0.0%> (-0.1%) ⬇️

... and 4 files with indirect coverage changes

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

@clux
Copy link
Copy Markdown
Member Author

clux commented Jan 2, 2026

Have done a bit of research on this, and it might still break some people, and clarified the body. It still seems like the a good way forward to me, but soliciting some feedback if people have time.

EDIT: fixing this in a non-breaking way for now. Probably not worth rushing a breaking change for a small memory optimization.

@clux clux marked this pull request as ready for review January 2, 2026 05:58
@clux clux requested a review from nightkr January 2, 2026 05:59
@clux clux mentioned this pull request Jan 2, 2026
@clux clux removed this from the 3.0.0 milestone Jan 2, 2026
@clux clux changed the title Box some runtime erorrs for clippy Box a large runtime error in response to clippy Jan 2, 2026
Copy link
Copy Markdown
Member

@nightkr nightkr left a comment

Choose a reason for hiding this comment

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

Ah damn, this would've made sense to get in for 3.0.0. Honestly not sure how to handle this, as-is it's still technically breaking even if it's pretty unlikely to cause much trouble...

@clux clux added this to the 4.0.0 milestone Feb 4, 2026
@clux
Copy link
Copy Markdown
Member Author

clux commented Feb 4, 2026

yeah, i wasn't sure, whether it was a good idea to make a breaking change for it. but having looked more, it's unlikely to be an error users touch often. i'll schedule it for 4.0

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.

Clippy nightly fails with result_large_err on controller::Error

2 participants