fmt
All checks were successful
Build and Publish Docker Image / test (push) Successful in 3m24s
Build and Publish Docker Image / build-and-push (push) Successful in 1m58s

This commit is contained in:
Andras Schmelczer 2026-06-26 19:57:25 +01:00
parent 30afb977ff
commit 71654a6fe2
2 changed files with 21 additions and 21 deletions

View file

@ -102,11 +102,8 @@ impl ComposeUpdater {
} }
match self.update_service_image(service).await { match self.update_service_image(service).await {
Ok(Some(new_image)) => match self.replace_image_in_content( Ok(Some(new_image)) => {
&new_content, match self.replace_image_in_content(&new_content, service, &new_image) {
service,
&new_image,
) {
Ok(replaced) => { Ok(replaced) => {
new_content = replaced; new_content = replaced;
updated = true; updated = true;
@ -120,7 +117,8 @@ impl ComposeUpdater {
warn!("Failed to update {} in {}", msg, file_path); warn!("Failed to update {} in {}", msg, file_path);
errors.push(msg); errors.push(msg);
} }
}, }
}
Ok(None) => { Ok(None) => {
debug!( debug!(
"No update needed for {}: {}", "No update needed for {}: {}",

View file

@ -198,8 +198,9 @@ impl Client {
// before and aborted the whole update run. Retry them with // before and aborted the whole update run. Retry them with
// the same bounded, exponential backoff used for 429s. // the same bounded, exponential backoff used for 429s.
if !is_transient_transport_error(&err) || attempt > MAX_RETRY_ATTEMPTS { if !is_transient_transport_error(&err) || attempt > MAX_RETRY_ATTEMPTS {
return Err(anyhow::Error::new(err) return Err(
.context(format!("{operation_name} failed"))); anyhow::Error::new(err).context(format!("{operation_name} failed"))
);
} }
warn!( warn!(
@ -726,7 +727,8 @@ mod tests {
// Mixed semver and non-semver tags. The raw cursor must be the literal // Mixed semver and non-semver tags. The raw cursor must be the literal
// last tag (even though it is not semver) so pagination advances past it, // last tag (even though it is not semver) so pagination advances past it,
// and the raw count must include every tag for the scan budget. // and the raw count must include every tag for the scan budget.
let body = r#"{"name":"linuxserver/radarr","tags":["6.1.0","6.1.1","latest","amd64-nightly"]}"#; let body =
r#"{"name":"linuxserver/radarr","tags":["6.1.0","6.1.1","latest","amd64-nightly"]}"#;
let (versions, raw_last_tag, raw_count) = client.parse_v2_response(body).unwrap(); let (versions, raw_last_tag, raw_count) = client.parse_v2_response(body).unwrap();
assert_eq!(raw_count, 4); assert_eq!(raw_count, 4);