chore(master): release 0.32.0 (#88) #170
Annotations
20 warnings
unneeded `return` statement:
src/lease.rs#L87
warning: unneeded `return` statement
--> src/lease.rs:87:9
|
87 | / return match self.lease_api.get(&self.params.lease_name).await {
88 | | Ok(l) => {
89 | | if self.are_we_leading(&l)? {
90 | | let lease = self.renew_lease().await?;
... |
139 | | Err(e) => Err(e.into()),
140 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
87 ~ match self.lease_api.get(&self.params.lease_name).await {
88 + Ok(l) => {
89 + if self.are_we_leading(&l)? {
90 + let lease = self.renew_lease().await?;
91 + log::debug!("successfully renewed lease {}", l.name_any());
92 +
93 + Ok(LeaseLockResult {
94 + acquired_lease: true,
95 + lease: Some(lease),
96 + })
97 + } else if self.has_lease_expired(&l)? {
98 + let lease = self.acquire_lease(&l).await?;
99 + log::info!("successfully acquired lease {}", lease.name_any());
100 +
101 + Ok(LeaseLockResult {
102 + acquired_lease: true,
103 + lease: Some(lease),
104 + })
105 + } else {
106 + log::info!(
107 + "lease is held by {} and has not yet expired",
108 + l.spec
109 + .as_ref()
110 + .ok_or(Error::TraverseLease {
111 + key: "spec".to_string()
112 + })?
113 + .holder_identity
114 + .as_ref()
115 + .ok_or(Error::TraverseLease {
116 + key: "spec.holderIdentity".to_string()
117 + })?
118 + );
119 +
120 + Ok(LeaseLockResult {
121 + acquired_lease: false,
122 + lease: None,
123 + })
124 + }
125 + }
126 + Err(kube::Error::Api(api_err)) => {
127 + if api_err.code != 404 {
128 + return Err(Error::ApiError { response: api_err });
129 + }
130 +
131 + let lease = self.create_lease().await?;
132 + log::info!("successfully acquired lease {}", lease.name_any());
133 +
134 + Ok(LeaseLockResult {
135 + acquired_lease: true,
136 + lease: Some(lease),
137 + })
138 + }
139 + Err(e) => Err(e.into()),
140 ~ }
|
|
Lint
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Lint
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|