Skip to content

chore(master): release 0.36.0 (#96) #72

chore(master): release 0.36.0 (#96)

chore(master): release 0.36.0 (#96) #72

Triggered via push September 16, 2024 19:37
Status Success
Total duration 3m 58s
Artifacts
Fit to window
Zoom out
Zoom in

Annotations

11 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 ~ } |
Release Please
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. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Release Please
The following actions use a deprecated Node.js version and will be forced to run on node20: google-github-actions/release-please-action@v3, actions/checkout@v2, actions-rs/toolchain@v1, Swatinem/rust-cache@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Release Please
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/
Release Please
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/
Release Please
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/
Release Please
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/
Release Please
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/
Release Please
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/
Release Please
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/
Release Please
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/