Skip to content

feat: adding a basic retrying#32

Merged
geekbrother merged 2 commits intomainfrom
feat/featurs_re_trying
Sep 9, 2025
Merged

feat: adding a basic retrying#32
geekbrother merged 2 commits intomainfrom
feat/featurs_re_trying

Conversation

@geekbrother
Copy link
Contributor

@geekbrother geekbrother commented Sep 8, 2025

Description

This PR adds basic retrying to the Projects registry API and project features API client. The number of retries is set to 2 (3 total attempts) with a 5-second timeout and exponential backoff starting from 100ms.

How Has This Been Tested?

Tested in the Blockchain-API branch.

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@geekbrother geekbrother requested a review from Copilot September 8, 2025 18:15
@geekbrother geekbrother self-assigned this Sep 8, 2025

This comment was marked as outdated.

This comment was marked as outdated.

@geekbrother geekbrother requested a review from Copilot September 9, 2025 05:43
@geekbrother geekbrother marked this pull request as ready for review September 9, 2025 05:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds retry functionality to HTTP requests in the Projects registry API client. It implements exponential backoff with configurable retry parameters to improve resilience against transient network failures.

  • Adds retry mechanism with exponential backoff for HTTP GET requests
  • Updates default timeout from no timeout to 5 seconds
  • Introduces configurable retry parameters (max retries, initial backoff delay)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/registry/client.rs Implements retry logic with exponential backoff and updates HTTP client configuration
Cargo.toml Adds tracing and tokio dependencies required for retry implementation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@xDarksome xDarksome left a comment

Choose a reason for hiding this comment

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

We should use an existing solution like backoff. Non-blocking tho, we can do it later

@geekbrother geekbrother merged commit 4db7b93 into main Sep 9, 2025
5 checks passed
@geekbrother geekbrother deleted the feat/featurs_re_trying branch September 9, 2025 14:40
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.

3 participants