Skip to content

Conversation

@ngergs
Copy link
Contributor

@ngergs ngergs commented Dec 20, 2025

Closes issue #1865. Motivation is to follow k8s-openapi which did the same replacement of its main branch.

There are still some chrono leftovers in kube-runtime and the examples to make the PR compatible with the current relased version of k8s-openapi.

Reverting the last commit of this PR should remove all chrono leftovers once a new k8s-openapi version has been released.

@ngergs ngergs force-pushed the jiff branch 2 times, most recently from 085d4d8 to 323715a Compare December 20, 2025 15:48
also drops v1.30 support but we revert this in a follow-up commit before opening the PR (so let's not keep it as part of the commit message as that would be confusing).
v1.30 is dropped as k8s-openapi already dropped it on `main` and we want to test against the `main` status once before reverting to the published version.

Signed-off-by: ngergs <[email protected]>
k8s openapi does not support any version <1.30 so there is no need to check
if we are at a version >=1.30

Signed-off-by: ngergs <[email protected]>
#k8s_openapi::k8s_if_ge_1_30! {
let fields : Vec<#apiext::SelectableField> = #serde_json::from_str(#fields).expect("valid selectableField column json");
}
let fields : Vec<#apiext::SelectableField> = #serde_json::from_str(#fields).expect("valid selectableField column json");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also changed this as all versions available in k8s-openapi v0.26.0 are greater or equal than v1.30 anyways.

Copy link
Member

Choose a reason for hiding this comment

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

you may be able to shift k8s-openapi depedency to target the git ref for now (they should be releasing for a new kubernetes version soon-ish).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wrong thread? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

regarding the k8s-openapi git dependency: do you suggest doing this just for the example or also for kube-runtime?

I had a version where it's done for both (revert/drop the last 2 commits of this PR) but that would block a kube release till k8s-openapi has a release.

Copy link
Member

Choose a reason for hiding this comment

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

My thought was doing it for everything in the repo, given that we are unlikely to make a new kube release until the next k8s-openapi release.

...But that said, on a second thought, and given squash merging, it's perhaps better to do that in a subsequent PR. Happy to merge this withot a git pin provided the other comment is resolved!

@ngergs ngergs marked this pull request as ready for review December 20, 2025 15:55
@codecov
Copy link

codecov bot commented Dec 20, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.7%. Comparing base (b684cc2) to head (323715a).

Files with missing lines Patch % Lines
kube-client/src/client/config_ext.rs 33.4% 2 Missing ⚠️
kube-core/src/kubelet_debug.rs 0.0% 2 Missing ⚠️
kube-client/src/client/auth/mod.rs 87.5% 1 Missing ⚠️
kube-client/src/client/mod.rs 50.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1868     +/-   ##
=======================================
- Coverage   74.7%   74.7%   -0.0%     
=======================================
  Files         84      84             
  Lines       7958    7954      -4     
=======================================
- Hits        5939    5936      -3     
+ Misses      2019    2018      -1     
Files with missing lines Coverage Δ
kube-client/src/client/auth/oidc.rs 55.8% <100.0%> (-0.5%) ⬇️
kube-client/src/client/builder.rs 72.5% <100.0%> (ø)
kube-client/src/client/middleware/mod.rs 93.4% <100.0%> (ø)
kube-core/src/request.rs 99.6% <ø> (ø)
kube-core/src/subresource.rs 82.4% <100.0%> (ø)
kube-core/src/util.rs 100.0% <100.0%> (ø)
kube-derive/src/custom_resource.rs 84.3% <ø> (ø)
kube-derive/tests/crd_schema_test.rs 100.0% <100.0%> (ø)
kube-client/src/client/auth/mod.rs 49.8% <87.5%> (ø)
kube-client/src/client/mod.rs 73.4% <50.0%> (+0.4%) ⬆️
... and 2 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.

@ngergs ngergs changed the title feat: replace chrono with Jiff feat!: replace chrono with Jiff Dec 20, 2025
@ngergs
Copy link
Contributor Author

ngergs commented Dec 20, 2025

Note that kube-runtime does not use chrono in any public interfaces, so adjusting it later on can be done easily. (Could also be done now if having jiff as an additional dependency besides chrono is ok for the kube-runtime.)

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.

Thanks a lot for this. This generally looks sensible to me.

I have one comment on the new error case in log params which i am not sure i understand, and feel like we might be able to drop.

#k8s_openapi::k8s_if_ge_1_30! {
let fields : Vec<#apiext::SelectableField> = #serde_json::from_str(#fields).expect("valid selectableField column json");
}
let fields : Vec<#apiext::SelectableField> = #serde_json::from_str(#fields).expect("valid selectableField column json");
Copy link
Member

Choose a reason for hiding this comment

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

you may be able to shift k8s-openapi depedency to target the git ref for now (they should be releasing for a new kubernetes version soon-ish).

@clux clux added the changelog-change changelog change category for prs label Dec 21, 2025
@clux clux added this to the 3.0.0 milestone Dec 21, 2025
… our usage

Also aligned all `rfc 3339` comments to call it `RFC3339` so that a string search finds them together with other mentions of this rfc.

Signed-off-by: ngergs <[email protected]>
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.

Thank you very much!

@clux clux merged commit c533899 into kube-rs:main Dec 22, 2025
16 checks passed
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