Skip to content

Conversation

@Harsh-Microsoft
Copy link
Contributor

Purpose

This pull request introduces retry mechanisms with exponential backoff and timeout handling for database connections in the backend and API calls in the frontend. These changes aim to improve the resilience of the application by handling transient failures more gracefully.

Backend Improvements for Resilient Database Connections:

  • src/App/backend/services/sqldb_service.py:
    • Added a retry mechanism with exponential backoff for the get_connection function, allowing up to 5 attempts with an initial delay of 2 seconds between retries. The delay doubles with each failed attempt. [1] [2]
    • Imported the time module to enable the use of time.sleep for retry delays.

Frontend Improvements for API Call Resilience:

  • src/App/frontend/src/api/api.ts:
    • Introduced a retry mechanism with a single retry attempt and a 5-second delay for the getUsers function. This ensures that transient errors during API calls are retried before failing.
    • Added a timeout of 60 seconds to the fetch request using AbortSignal.timeout to prevent indefinitely hanging requests.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

@Roopan-Microsoft Roopan-Microsoft merged commit 61b4421 into dev Jul 28, 2025
5 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the psl-hb-bug-20913 branch July 28, 2025 10:28
@github-actions
Copy link

🎉 This PR is included in version 1.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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