Skip to content

Commit

Permalink
add debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Aug 8, 2024
1 parent 30dd0cb commit abed841
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/datadog/ci/test_retries/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def with_retries(&block)
def build_strategy(test_span)
@mutex.synchronize do
if should_retry_failed_test?(test_span)
Datadog.logger.debug("Failed test retry starts")
@retry_failed_tests_count += 1

Strategy::RetryFailed.new(max_attempts: @retry_failed_tests_max_attempts)
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog/ci/test_retries/strategy/retry_failed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def record_retry(test_span)

@attempts += 1
@passed_once = true if test_span&.passed?

Datadog.logger.debug { "Retry Attempts [#{@attempts} / #{@max_attempts}], Passed: [#{@passed_once}]" }
end
end
end
Expand Down

0 comments on commit abed841

Please sign in to comment.