@prodcycle/prodcycle 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-client.js +18 -3
- package/package.json +1 -1
package/dist/api-client.js
CHANGED
|
@@ -47,10 +47,25 @@ const MAX_RETRY_AFTER_SECONDS = envInt('PC_MAX_RETRY_AFTER_SECONDS', 300);
|
|
|
47
47
|
/**
|
|
48
48
|
* Per-request fetch timeout. Without this a stalled connection would tie
|
|
49
49
|
* up the CLI indefinitely, bypassing both the retry cap and the async-poll
|
|
50
|
-
* deadline.
|
|
51
|
-
*
|
|
50
|
+
* deadline.
|
|
51
|
+
*
|
|
52
|
+
* Default is 5 minutes — chosen so the chunked-session `/chunks` upload
|
|
53
|
+
* path has enough headroom under server-side load. The bottleneck on
|
|
54
|
+
* busy servers is the per-chunk transaction (policy eval + per-finding
|
|
55
|
+
* unique-index check on `(scan_id, fingerprint)`), which can take tens
|
|
56
|
+
* of seconds on big chunks. Sync `/validate` scans normally finish in
|
|
57
|
+
* seconds, so a longer default doesn't hurt them — it only matters
|
|
58
|
+
* when a single request stalls. CI runs that want tighter feedback can
|
|
59
|
+
* shrink via `PC_REQUEST_TIMEOUT_MS`.
|
|
60
|
+
*
|
|
61
|
+
* Pre-fix this was 120 s and a megarepo chunked scan (infisical-
|
|
62
|
+
* infisical, ~11.5 k files, 2026-05-13 GA-validation sweep) burned
|
|
63
|
+
* through the full retry budget (4 × 120 s per stuck chunk) before
|
|
64
|
+
* giving up with `Failed to connect to ProdCycle API: The operation
|
|
65
|
+
* was aborted due to timeout`. The body-read retry path from #30 was
|
|
66
|
+
* firing correctly — it just wasn't enough budget.
|
|
52
67
|
*/
|
|
53
|
-
const REQUEST_TIMEOUT_MS = envInt('PC_REQUEST_TIMEOUT_MS',
|
|
68
|
+
const REQUEST_TIMEOUT_MS = envInt('PC_REQUEST_TIMEOUT_MS', 300_000);
|
|
54
69
|
/**
|
|
55
70
|
* Conservative client-side chunk sizing for the chunked-session flow. The
|
|
56
71
|
* /chunks endpoint accepts up to 50 MB / 2000 files per request, but most
|
package/package.json
CHANGED