google / fuzzbench

FuzzBench - Fuzzer benchmarking as a service.
https://google.github.io/fuzzbench/
Apache License 2.0
1.09k stars 266 forks source link

Remove retry circular dependency #1969

Closed gustavogaldinoo closed 5 months ago

gustavogaldinoo commented 5 months ago

Removing usage of @retry.wrap in logs methods.

This removal is necessary because retries also use logs inside of their implementation so we want to avoid the following cyclic scenario:

  1. Log method is called
  2. A log fails (e.g. permission issue)
  3. The logging method uses a retry wrapper, so it tries again
  4. The code inside the retry wrapper also calls a log method, so we go back to step 1

Before this PR, this scenario was avoided by using a log_retries parameter, that would disable loggings on retries functions when the retry was called from a log function.

This PR remove this parameter and get rid of the circular dependency by making a custom retry logic inside of the logs methods.

gustavogaldinoo commented 5 months ago

Not sure what's the best way to test this change though