Skip to content

Conversation

clux
Copy link
Member

@clux clux commented May 12, 2025

Change via k8s-openapi CHANGELOG.

Kubernetes Minimum

Less supported versions from k8s-openapi this time so it kind of screws with our version-policy a bit, as we cannot test what is not in k8s-openapi. Effectively we now only have 3 Kubernetes versions between latest and MK8SV.

MSRV

Bumps MSRV one version to 1.82.0 based on lowest found in the msrv check.

log output

error: rustc 1.81.0 is not supported by the following packages:
  icu_collections@2.0.0 requires rustc 1.82
  icu_locale_core@2.0.0 requires rustc 1.82
  icu_normalizer@2.0.0 requires rustc 1.82
  icu_normalizer_data@2.0.0 requires rustc 1.82
  icu_normalizer_data@2.0.0 requires rustc 1.82
  icu_normalizer_data@2.0.0 requires rustc 1.82
  icu_properties@2.0.0 requires rustc 1.82
  icu_properties_data@2.0.0 requires rustc 1.82
  icu_properties_data@2.0.0 requires rustc 1.82
  icu_properties_data@2.0.0 requires rustc 1.82
  icu_provider@2.0.0 requires rustc 1.82
  idna_adapter@1.2.1 requires rustc 1.82
  litemap@0.8.0 requires rustc 1.82
  zerotrie@0.2.2 requires rustc 1.82
  zerovec@0.11.2 requires rustc 1.82

via failing msrv job

Deny

Excludes a temporary duplicate webpki-roots (at 1.0 and 0.26) and allows it's new license (it's an optional dep anyway).
Via deny job failure.

Clippy

Nice lint from wait.rs to use Option::is_none_or:

clippy output

 Error: error: this `map_or` can be simplified
   --> kube-runtime/src/wait.rs:184:13
    |
184 | /             obj.map_or(
185 | |                 // Object is not found, success!
186 | |                 true,
...   |
189 | |             )
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
note: the lint level is defined here
   --> kube-runtime/src/lib.rs:11:9
    |
11  | #![deny(clippy::all)]
    |         ^^^^^^^^^^^
    = note: `#[deny(clippy::unnecessary_map_or)]` implied by `#[deny(clippy::all)]`
help: use is_none_or instead
    |
184 ~             obj.is_none_or(
185 |                 // Object is not found, success!
186 ~                 |obj| obj.meta().uid.as_deref() != Some(uid),
    |


Plan is still to proceed with 1.0 after. Not heard anyone else have big concerns about it.

clux added 2 commits May 12, 2025 10:32
Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
@clux clux added this to the 0.100.0 milestone May 12, 2025
@clux clux added the changelog-change changelog change category for prs label May 12, 2025
clux added 2 commits May 12, 2025 10:44
Signed-off-by: clux <sszynrae@gmail.com>
based on requirements downstream from msrv check

Signed-off-by: clux <sszynrae@gmail.com>
Copy link

codecov bot commented May 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.5%. Comparing base (6b59e72) to head (a68eaf2).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1756     +/-   ##
=======================================
+ Coverage   76.2%   76.5%   +0.3%     
=======================================
  Files         84      84             
  Lines       7889    7887      -2     
=======================================
+ Hits        6006    6026     +20     
+ Misses      1883    1861     -22     
Files with missing lines Coverage Δ
kube-derive/src/custom_resource.rs 83.9% <100.0%> (-0.1%) ⬇️
kube-runtime/src/wait.rs 93.5% <100.0%> (ø)

... 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 added 2 commits May 12, 2025 11:26
…roots

Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
@clux clux marked this pull request as ready for review May 12, 2025 10:45
@clux clux requested a review from a team May 12, 2025 10:45
@Arnavion
Copy link

Less supported versions from k8s-openapi this time so it kind of screws with our version-policy a bit, as we cannot test what is not in k8s-openapi. Effectively we now only have 3 Kubernetes versions between latest and MK8SV.

Is it documented anywhere that client-go specifically has a policy of supporting the last five versions? k8s-openapi's policy is based on looking at what's supported in public clouds. If client-go's policy is documented to be that, then I can have k8s-openapi do the same in the future.

@clux
Copy link
Member Author

clux commented May 12, 2025

Is it documented anywhere that client-go specifically has a policy of supporting the last five versions? k8s-openapi's policy is based on looking at what's supported in public clouds. If client-go's policy is documented to be that, then I can have k8s-openapi do the same in the future.

I think client-go used to follow the skew-policy of 3 but i see that's now replaced with a generic + / - or a in a compatibility-matrix in the main readme (which is probably less user hostile).

Tbh, I just chose a fairly arbitrary line in the sand of 5 releases in website pr and no one objected. At the time it was stricter than k8s-openapi used to be (iirc you used to bundle like 6 versions). I don't think it's a particularly huge deal. Support for older spec structs generally means you want to use older alpha/beta apis past their prime, and it's kind of OK to not have us keep removed alpha/beta code around for this. I am happy to revise our policy. It's easiest for us to test latest vs earliest features anyway.

The only issue with what you've written there is that it's not something i can translate into a clear policy. A static N versions would be great (be it 3 or 4 or 5) / tracking Kubernetes maintenance eol also works. A script to determine from clouds might be fine (but i imagine the output of these scripts would be region dependent, and dependent on which clouds we prioritize). I see alibaba supports 1.28 still.

@Arnavion
Copy link

Okay, I can start doing latest five versions from next release.

A script to determine from clouds might be fine (but i imagine the output of these scripts would be region dependent, and dependent on which clouds we prioritize).

Yes, I'm not aware of such a script, especially one that can be used without being a customer of that cloud. I just eyeball the web pages right now.

I see alibaba supports 1.28 still.

Yes, ACK always seems to support one version older than everyone else so I decided to stop considering it for this release to see if anyone complains.

@clux
Copy link
Member Author

clux commented May 12, 2025

if you do want to do 3 or 4 to decrease the maintenance burden i think that's perfectly reasonable as well looking at when Kubernetes stops maintaining btw. (With 4 I don't have to re-introduce the k8s_if_le_1_29 check in 16w time :D)

In either case, I appreciate it.

@clux clux merged commit 3ca7a9a into main May 13, 2025
18 checks passed
@clux clux deleted the k8s-025 branch May 13, 2025 08:28
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.

2 participants