Skip to content

Add retry mechanism for cURL requests#14

Merged
Vitexus merged 1 commit intomainfrom
feature/add-retry-mechanism
Sep 24, 2025
Merged

Add retry mechanism for cURL requests#14
Vitexus merged 1 commit intomainfrom
feature/add-retry-mechanism

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

@google-labs-jules google-labs-jules Bot commented Sep 24, 2025

This change introduces a retry mechanism to the ApiClient to handle intermittent cURL errors. When a cURL error occurs, the application will wait for one minute and then retry the request. The number of retries is configurable via the DISCOMP_RETRY environment variable, with a default of 10.


PR created automatically by Jules for task 1344396653056750044

Summary by CodeRabbit

  • New Features

    • API requests now automatically retry on transient errors, with a configurable maximum number of attempts. This improves reliability under unstable network conditions while keeping existing behavior for persistent failures.
  • Bug Fixes

    • Reduced intermittent failures when communicating with external services by re-attempting requests after temporary errors. If all retries fail, error handling remains unchanged, and clearer attempt information is recorded for easier troubleshooting.

When a cURL error occurs, the application will now wait for one minute and then retry the request. The number of retries is configurable via the DISCOMP_RETRY environment variable, with a default of 10.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 24, 2025

Caution

Review failed

The pull request is closed.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/add-retry-mechanism

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1cefd06 and b3dc467.

📒 Files selected for processing (1)
  • src/Discomp/ApiClient.php (3 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Vitexus Vitexus marked this pull request as ready for review September 24, 2025 23:13
@Vitexus Vitexus merged commit 99382e0 into main Sep 24, 2025
1 of 2 checks passed
@Vitexus
Copy link
Copy Markdown
Collaborator

Vitexus commented Sep 24, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 24, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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