Updated branches merge revamp to handle poling timeouts#58
Updated branches merge revamp to handle poling timeouts#58netrajpatel wants to merge 6 commits intodevelopmentfrom
Conversation
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
The base branch was changed.
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
| "fast-csv": "^4.3.6", | ||
| "fs-extra": "^11.3.0", | ||
| "lodash": "4.18.1", | ||
| "lodash": "^4.18.1", |
There was a problem hiding this comment.
bump patch version to reflect this in prod
| overrides: | ||
| picomatch: 4.0.4 | ||
| brace-expansion: 5.0.5 | ||
| lodash: 4.18.1 |
There was a problem hiding this comment.
this can be removed since its a direct dependency which is already bumped
| */ | ||
| export const fetchMergeStatus = async ( | ||
| stackAPIClient, | ||
| mergePayload, |
There was a problem hiding this comment.
Current Code: Time to exhaust all 10,000 retries
The delay starts at 5000ms and increases by 1000ms each attempt, capping at 60,000ms.
Ramp-up phase (delay increases from 5s → 60s):
That's 55 steps (5s, 6s, 7s... 60s) = ~27.5 minutes
Capped phase (remaining 9,945 attempts × 60s):
= ~9,945 minutes = ~166 hours
Total: ~166 hours and 27 minutes (~7 days)
So this logic might not be the right approach to exit the process
We have two ways to get the desired output
- update the max tries with a number by considering the timeout - how long the process should be live
eg:
maxRetries = 60 // ~30 minutes with linear backoff,
maxRetries = 115 // ~1 hour with linear backoff
etc.
- Use timeout instead of maxtries
Eg:
initialDelay = 5000,
timeoutMs = 30 * 60 * 1000, // 30 minutes, clearly readable
): Promise => {
const deadline = Date.now() + timeoutMs;
let delayMs = initialDelay;
const MAX_DELAY_MS = 60_000;
while (Date.now() < deadline) {
No description provided.