Skip to content

Conversation

@clux
Copy link
Member

@clux clux commented Jul 18, 2025

Bumps MSRV to 1.88.0 and converts existing let-chainable code to use let-chains. Rust 2024 support was added in separately in #1856, and we can use it properly now since 1.88 is like 3 versions behind.

Was originally playing around with it, but actually found that it solves most of the the ergonomic problem with the wait API that I tried to solve earlier in #1498 - it's not quite as elegant but it also doesn't come with any of the problems and is non-breaking.


But if the general setup (outlined in the first commit) is acceptable, I'll rebase at 1.90.

Waiting for #1856 to merge. Now ready.

@codecov
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

❌ Patch coverage is 78.57143% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.7%. Comparing base (8b31a53) to head (136115d).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
kube-client/src/config/file_config.rs 38.5% 8 Missing ⚠️
kube-derive/src/custom_resource.rs 46.7% 8 Missing ⚠️
kube-client/src/client/auth/mod.rs 16.7% 5 Missing ⚠️
kube-runtime/src/utils/backoff_reset_timer.rs 57.2% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1792     +/-   ##
=======================================
- Coverage   74.7%   74.7%   -0.0%     
=======================================
  Files         84      84             
  Lines       7951    7950      -1     
=======================================
- Hits        5939    5937      -2     
- Misses      2012    2013      +1     
Files with missing lines Coverage Δ
kube-client/src/config/file_loader.rs 77.5% <100.0%> (ø)
kube-core/src/discovery.rs 95.6% <100.0%> (ø)
kube-core/src/params.rs 85.4% <100.0%> (ø)
kube-core/src/schema.rs 95.8% <100.0%> (ø)
kube-runtime/src/wait.rs 94.8% <100.0%> (ø)
kube-runtime/src/watcher.rs 43.8% <100.0%> (ø)
kube/src/lib.rs 60.6% <100.0%> (ø)
kube-runtime/src/utils/backoff_reset_timer.rs 72.5% <57.2%> (ø)
kube-client/src/client/auth/mod.rs 50.0% <16.7%> (ø)
kube-client/src/config/file_config.rs 77.6% <38.5%> (ø)
... and 1 more

... and 3 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 clux added this to the 3.0.0 milestone Nov 28, 2025
started out as a PR to try out let-chains, but found that it solves
the ergonomic problem with the wait API that I tried to solve earlier in #1498

Signed-off-by: clux <[email protected]>
@clux clux force-pushed the wait-with-if-let branch from d9571ab to f42dfcc Compare December 9, 2025 12:40
@clux clux marked this pull request as ready for review December 9, 2025 14:18
@clux clux added the changelog-add changelog added category for prs label Dec 9, 2025
Comment on lines 111 to 118
match &self.version_match {
None => {}
Some(VersionMatch::NotOlderThan) => {
qp.append_pair("resourceVersionMatch", "NotOlderThan");
}
Some(VersionMatch::Exact) => {
qp.append_pair("resourceVersionMatch", "Exact");
}
Copy link
Member Author

@clux clux Dec 10, 2025

Choose a reason for hiding this comment

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

could technically be

Suggested change
match &self.version_match {
None => {}
Some(VersionMatch::NotOlderThan) => {
qp.append_pair("resourceVersionMatch", "NotOlderThan");
}
Some(VersionMatch::Exact) => {
qp.append_pair("resourceVersionMatch", "Exact");
}
if let Some(vm) = &self.version_match {
qp.append_pair("resourceVersionMatch", &format!("{:?}", vm));
}

but not sure it's better. feels it drops some readability, and don't like relying on debug print.

@clux clux requested a review from nightkr December 10, 2025 09:06
Copy link
Member

@Danil-Grigorev Danil-Grigorev left a comment

Choose a reason for hiding this comment

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

One suggestion, otherwise looks good.

Signed-off-by: clux <[email protected]>
@clux clux merged commit 6e67b81 into main Dec 11, 2025
18 checks passed
@clux clux deleted the wait-with-if-let branch December 11, 2025 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-add changelog added category for prs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants