Skip to content

Commit

Permalink
SLCORE-1153: Don't log an error on ProtBuf check for analysis readiness
Browse files Browse the repository at this point in the history
This is just a noisy error when creating a connection and binding a project to determine whether the analysis is yet ready.
There is currently no situation in which logging such an error is valid or useful.
  • Loading branch information
thahnen committed Jan 28, 2025
1 parent bf127e3 commit 8b7bc5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ private Optional<AnalyzerConfiguration> tryRead() {
try {
return Optional.of(read());
} catch (Exception e) {
LOG.error("Could not load analyzer configuration storage", e);
// Don't log an error as this is currently only used for checking whether or not the analysis is ready as well as the file exclusion
// service after a binding change. The error was just noisy and misleading to users.
return Optional.empty();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ public boolean isValid() {
try {
rwLock.read(() -> ProtobufFileUtil.readFile(pluginReferencesFilePath, Sonarlint.PluginReferences.parser()));
return true;
} catch (Exception e) {
LOG.error("Could not load plugins storage", e);
} catch (Exception ignored) {
// Don't log an error or forward it as this is only used for checking whether or not the analysis is ready yet. The error was just
// noisy and misleading to users.
return false;
}
}
Expand Down

0 comments on commit 8b7bc5a

Please sign in to comment.