Skip to content

Commit

Permalink
v0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnavion committed Jan 23, 2022
1 parent bac3cf3 commit 8ab7dfe
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 10 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# v0.14.0 (2022-01-23)

## k8s-openapi

- BREAKING CHANGE: k8s-openapi now disables all default features of its dependencies and only enables the ones it needs. If your code was implicitly relying on some default feature being enabled of an indirect dependency re-exported from `k8s-openapi`, it will now not compile. You will need to enable the feature yourself in your own dependency.

For example, if you had `use k8s_openapi::schemars; #[derive(schemars::JsonSchema)] struct YourCode { ... }` this will no longer compile because the proc macro is only compiled when the `"derive"` feature is enabled. You will need to add an explicit dependency on the `schemars` crate in your code, with its `"derive"` feature enabled.

- BREAKING CHANGE: Added support for Kubernetes 1.23 under the `v1_23` feature.

- BREAKING CHANGE: Dropped support for Kubernetes 1.11, 1.12, 1.13, 1.14 and 1.15.

- BUGFIX: The `serde::Deserialize` impl of some types now accepts `null` for required fields and deserializes it as the default value of that field. This is because the Kubernetes API server violates the schema and sends `null` in some cases.

For example, a user is allowed to create a `DaemonSet` whose `PodSpec` has `"containers": null`, even though `PodSpec::containers` is a required field and emitted as a `Vec`. When querying this `DaemonSpec` back from the API server, it will return `"containers": null` in the response too. Before this fix, such a response would fail to deserialize. Note that serialization is still spec-compliant as before, so such a `DaemonSet` could not have been created with this crate's types before and still cannot be created now.

Corresponding Kubernetes API server versions:

- v1.16.15
- v1.17.17
- v1.18.20
- v1.19.16
- v1.20.15
- v1.21.9
- v1.22.6
- v1.23.2

## k8s-openapi-codegen-common

- BUGFIX: `k8s_openapi_codegen_common::Error` now implements `source()` correctly instead of always returning `None`.

## k8s-openapi-derive

- No changes except to bump the `k8s-openapi-codegen-common` dependency to the new version.

---

# v0.13.1 (2021-10-08)

## k8s-openapi
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ K8S_RECORD=1 ./test.sh all run-tests
cargo rustdoc --features 'v1_23' -- -A 'rustdoc::bare_urls' -Z unstable-options --enable-index-page &&
CARGO_TARGET_DIR="$(realpath ./target)" cargo rustdoc --manifest-path ./k8s-openapi-codegen-common/Cargo.toml -- -Z unstable-options --enable-index-page &&
CARGO_TARGET_DIR="$(realpath ./target)" cargo rustdoc --manifest-path ./k8s-openapi-derive/Cargo.toml -- -Z unstable-options --enable-index-page &&
rm -rf ../k8s-openapi-gh-pages/v0.13.x &&
cp -R ./target/doc ../k8s-openapi-gh-pages/v0.13.x
rm -rf ../k8s-openapi-gh-pages/v0.14.x &&
cp -R ./target/doc ../k8s-openapi-gh-pages/v0.14.x
```

1. `../k8s-openapi-gh-pages/index.html`: Add new anchor if this is a new major release
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "k8s-openapi"
version = "0.13.1"
version = "0.14.0"
license = "Apache-2.0"
authors = ["Arnavion <me@arnavion.dev>"]
categories = ["api-bindings", "web-programming::http-client"]
description = "Bindings for the Kubernetes client API"
documentation = "https://arnavion.github.io/k8s-openapi/v0.13.x/k8s_openapi/"
documentation = "https://arnavion.github.io/k8s-openapi/v0.14.x/k8s_openapi/"
edition = "2018"
keywords = ["client", "kubernetes", "k8s", "http"]
readme = "README.md"
Expand All @@ -25,7 +25,7 @@ include = [
# to enumerate all env vars looking for one with `DEP_K8S_OPENAPI_` prefix and `_VERSION` suffix, instead of looking it up by its whole name.
#
# See https://github.com/rust-lang/cargo/issues/3544 for being able to pass metadata to downstream without setting this key.
links = "k8s-openapi-0.13.1"
links = "k8s-openapi-0.14.0"

[dependencies]
base64 = { version = "0.13", default-features = false, features = [
Expand Down
4 changes: 2 additions & 2 deletions k8s-openapi-codegen-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "k8s-openapi-codegen-common"
version = "0.13.1"
version = "0.14.0"
license = "Apache-2.0"
authors = ["Arnavion <me@arnavion.dev>"]
categories = ["api-bindings", "web-programming::http-client"]
description = "Common code for the k8s-openapi code generator and k8s-openapi-derive"
documentation = "https://arnavion.github.io/k8s-openapi/v0.13.x/k8s_openapi_codegen_common/"
documentation = "https://arnavion.github.io/k8s-openapi/v0.14.x/k8s_openapi_codegen_common/"
edition = "2018"
keywords = ["client", "kubernetes", "k8s", "http"]
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions k8s-openapi-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "k8s-openapi-derive"
version = "0.13.1"
version = "0.14.0"
license = "Apache-2.0"
authors = ["Arnavion <me@arnavion.dev>"]
categories = ["api-bindings", "web-programming::http-client"]
description = "Custom derives for the Kubernetes client API"
documentation = "https://arnavion.github.io/k8s-openapi/v0.13.x/k8s_openapi_derive/"
documentation = "https://arnavion.github.io/k8s-openapi/v0.14.x/k8s_openapi_derive/"
edition = "2018"
keywords = ["client", "kubernetes", "k8s", "http"]
readme = "README.md"
Expand All @@ -19,7 +19,7 @@ include = [

[dependencies]
http = { version = "0.2", default-features = false }
k8s-openapi-codegen-common = { version = "=0.13.1", path = "../k8s-openapi-codegen-common" }
k8s-openapi-codegen-common = { version = "=0.14.0", path = "../k8s-openapi-codegen-common" }
proc-macro2 = { version = "1", default-features = false, features = ["proc-macro"] }
quote = { version = "1", default-features = false }
syn = { version = "1", default-features = false, features = [
Expand Down

0 comments on commit 8ab7dfe

Please sign in to comment.