Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CustomResource derive; allow status attribute to take a path #1704

Merged
merged 3 commits into from
Mar 11, 2025

Conversation

clux
Copy link
Member

@clux clux commented Feb 26, 2025

fix for #1703

allows module gated imports to be referenced such as;

pub mod mystatus {
    use super::*;
    #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, JsonSchema)]
    pub struct FooStatus { ... }
}

by using #[kube(status = "mystatus::FooStatus")] on a spec struct.

Signed-off-by: clux <sszynrae@gmail.com>
@clux clux force-pushed the try-pathize-derive-status branch from ad7db3e to 2306feb Compare February 26, 2025 00:07
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.1%. Comparing base (25868e7) to head (0bc12d8).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1704     +/-   ##
=======================================
- Coverage   76.1%   76.1%   -0.0%     
=======================================
  Files         84      84             
  Lines       7860    7859      -1     
=======================================
- Hits        5977    5976      -1     
  Misses      1883    1883             
Files with missing lines Coverage Δ
kube-derive/src/custom_resource.rs 84.1% <100.0%> (-<0.1%) ⬇️
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@clux clux changed the title try to move status attribute to take a path CustomResource derive; allow status attribute to take a path Mar 11, 2025
@clux clux added this to the 0.99.0 milestone Mar 11, 2025
@clux clux added the changelog-fix changelog fix category for prs label Mar 11, 2025
@clux clux marked this pull request as ready for review March 11, 2025 17:02
@clux
Copy link
Member Author

clux commented Mar 11, 2025

Compiles and runs fine locally and in CI (under test examples).

Running unittests crd_derive_multi.rs (target/debug/examples/crd_derive_multi-a7816d16009a3044)

@clux clux requested a review from nightkr March 11, 2025 17:05
Co-authored-by: Natalie Klestrup Röijezon <nat.roijezon@stackable.tech>
Signed-off-by: Eirik A <sszynrae@gmail.com>
@clux clux merged commit ab488ae into main Mar 11, 2025
17 checks passed
@clux clux deleted the try-pathize-derive-status branch March 11, 2025 19:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
changelog-fix changelog fix category for prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants