Skip to content

EPD-2096: add retry to run_test_suite - #369

Merged
josorio-autoblocks merged 1 commit into
mainfrom
jose/epd-2096-need-retry-mechanism-for-failed-tests
Jul 15, 2025
Merged

EPD-2096: add retry to run_test_suite#369
josorio-autoblocks merged 1 commit into
mainfrom
jose/epd-2096-need-retry-mechanism-for-failed-tests

Conversation

@josorio-autoblocks

@josorio-autoblocks josorio-autoblocks commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a retry mechanism to the Autoblocks testing framework to handle transient network failures more gracefully. The implementation specifically targets HTTP-related errors (timeouts, connection errors) using exponential backoff with a maximum wait time of 30 seconds.

Key changes:

  • Added a configurable retry_count parameter to control retry attempts
  • Implemented a retry decorator using the tenacity library that only retries specific HTTP exceptions
  • Added comprehensive test coverage in both v1 and v2 test suites
  • Uses exponential backoff with random jitter to prevent thundering herd problems

The retry mechanism is thoughtfully implemented to only catch specific HTTP-related exceptions (TimeoutException, ConnectError, ReadTimeout, WriteTimeout, PoolTimeout) while letting other errors propagate normally. This ensures that actual test failures aren't masked by the retry mechanism.

Confidence score: 5/5

  1. This PR is extremely safe to merge as it adds defensive programming without modifying core behavior
  2. The implementation is well-tested, follows existing patterns, and only retries appropriate transient failures
  3. Key files that need attention:
    • autoblocks/_impl/testing/v2/run.py: Verify retry configuration parameters
    • tests/autoblocks/test_run_test_suite_v2_retry.py: Ensure all edge cases are covered

4 files reviewed, 3 comments
Edit PR Review Bot Settings | Greptile

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing changes made in this pull request

Comment thread autoblocks/_impl/testing/run.py
Comment thread tests/autoblocks/test_run_test_suite_v2_retry.py
Comment thread autoblocks/_impl/testing/v2/run.py
@josorio-autoblocks
josorio-autoblocks merged commit 84682e7 into main Jul 15, 2025
6 checks passed
@josorio-autoblocks
josorio-autoblocks deleted the jose/epd-2096-need-retry-mechanism-for-failed-tests branch July 15, 2025 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant