Skip to content

Commit ca99b44

Browse files
committed
Merge branch 'master' into feature/derive-schema-finegrained-optout
Signed-off-by: Teo Klestrup Röijezon <[email protected]>
2 parents 42d8170 + a79335e commit ca99b44

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ UNRELEASED
77
- Removed `kube::core::Error` and `kube::core::Result`. `kube::core::Error` was replaced by more specific errors as described below.
88
- Replaced `kube::core::Error::InvalidGroupVersion` with `kube::core::gvk::ParseGroupVersionError`.
99
- Changed the error returned from `kube::core::admission::AdmissionRequest::with_patch` to `kube::core::admission::SerializePatchError` (was `kube::core::Error::SerdeError`).
10-
- Changed the error associated with `TryInto<AdmissionRequest<T>` to `kube::core::admission::ConvertAdmissionReviewError` (was `kube::core::Error::RequestValidation`).
10+
- Changed the error associated with `TryInto<AdmissionRequest<T>>` to `kube::core::admission::ConvertAdmissionReviewError` (was `kube::core::Error::RequestValidation`).
1111
- Changed the error returned from methods of `kube::core::Request` to `kube::core::request::Error` (was `kube::core::Error`). `kube::core::request::Error` represents possible errors when building an HTTP request. The removed `kube::core::Error` had `RequestValidation(String)`, `SerdeError(serde_json::Error)`, and `HttpError(http::Error)` variants. They are now `Validation(String)`, `SerializeBody(serde_json::Error)`, and `BuildRequest(http::Error)` respectively in `kube::core::request::Error`.
1212
- Replaced `kube::Error::RequestValidation(String)` variant with `kube::Error::BuildRequest(kube::core::request::Error)`. This variant includes possible errors when building an HTTP request as described above, and contains errors that was previously grouped under `kube::Error::SerdeError` and `kube::Error::HttpError`.
1313
- Removed `impl From<T> for kube::Error` for the following types: `std::io::Error`, `hyper::Error`, `tower::BoxError`, `std::string::FromUtf8Error`, `http::Error`, `http::uri::InvalidUri`, `serde_json::Error`, `openssl::error::ErrorStack`, `kube::core::Error`, `kube::error::ConfigError`, `kube::error::DisoveryError`, `kube::error::OAuthError`.
1414
- Changed variants of error enums in `kube::runtime`. Replaced `snafu` with `thiserror`.
15+
* BREAKING: Removed unused error variants in `kube::Error`: `Connection`, `RequestBuild`, `RequestSend`, `RequestParse`.
16+
* BREAKING: Removed unused error variant `kube::error::ConfigError::LoadConfigFile`
1517
* BREAKING: Replaced feature `kube-derive/schema` with attribute `#[kube(schema)]` - #690
1618
- If you currently disable default `kube-derive` default features to avoid automatic schema generation, add `#[kube(schema = "disabled")]` to your spec struct instead
1719
* BREAKING: Moved `CustomResource` derive crate overrides into subattribute `#[kube(crates(...))]` - #690

kube-client/src/error.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ pub enum Error {
1919
#[error("ApiError: {0} ({0:?})")]
2020
Api(#[source] ErrorResponse),
2121

22-
/// ConnectionError for when TcpStream fails to connect.
23-
#[error("ConnectionError: {0}")]
24-
Connection(#[source] std::io::Error),
25-
2622
/// Hyper error
2723
#[cfg(feature = "client")]
2824
#[error("HyperError: {0}")]
@@ -58,18 +54,6 @@ pub enum Error {
5854
#[error("Error deserializing response")]
5955
SerdeError(#[source] serde_json::Error),
6056

61-
/// Error building a request
62-
#[error("Error building request")]
63-
RequestBuild,
64-
65-
/// Error sending a request
66-
#[error("Error executing request")]
67-
RequestSend,
68-
69-
/// Error parsing a response
70-
#[error("Error parsing response")]
71-
RequestParse,
72-
7357
/// Failed to build request
7458
#[error("Failed to build request: {0}")]
7559
BuildRequest(#[source] kube_core::request::Error),
@@ -183,8 +167,6 @@ pub enum ConfigError {
183167
#[error("OAuth Error: {0}")]
184168
OAuth(#[source] OAuthError),
185169

186-
#[error("Unable to load config file: {0}")]
187-
LoadConfigFile(#[source] Box<Error>),
188170
#[error("Unable to load current context: {context_name}")]
189171
LoadContext { context_name: String },
190172
#[error("Unable to load cluster of context: {cluster_name}")]

0 commit comments

Comments
 (0)