Skip to content

Commit

Permalink
Fix bad error condition for remote config fetcher
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
  • Loading branch information
bwoebi committed Sep 25, 2024
1 parent 30c84c3 commit 08a5e36
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions remote-config/src/fetch/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ impl<S: FileStorage> ConfigFetcher<S> {
} else {
None
};
// If the file isn't there, it's not meant for us.
if let Some(raw_file) = incoming_files.get(path) {
if let Ok(decoded) = base64::engine::general_purpose::STANDARD.decode(raw_file) {
let computed_hash = hasher(decoded.as_slice());
Expand Down Expand Up @@ -474,11 +475,6 @@ impl<S: FileStorage> ConfigFetcher<S> {
String::from_utf8_lossy(raw_file)
)
}
} else {
anyhow::bail!(
"Found changed config data for path {path}, but no file; existing files: {:?}",
incoming_files.keys().collect::<Vec<_>>()
)
}
}

Expand Down

0 comments on commit 08a5e36

Please sign in to comment.