kubewarden / policy-sdk-rust

Kubewarden Policy SDK for the Rust programming language
https://kubewarden.io
Apache License 2.0
8 stars 6 forks source link

fix: handle default features being disabled #67

Closed flavio closed 2 years ago

flavio commented 2 years ago

When the default features are disabled, the k8s-openapi crate is no longer required.

The recent helpers introduced to deal with Kubernetes resources containing Pod didn't take that into account.

That causes the library to not compile properly when the imported without the default features.

This commit fixes this and extends our unit tests to ensure this won't happen again.

flavio commented 2 years ago

LGTM. But it's necessary to check why the tests running in the CI failed. In my local environment I could run them with no modifications.

I made a mistake inside of the GitHub action definition. this should be fixed now, I'll wait for the run to complete and then I'll merge the PR if everything is green