Skip to content

Serialize API calls in get-result-summary.js - #170

Merged
atheurer merged 1 commit into
masterfrom
serialize-result-summary
Apr 9, 2026
Merged

Serialize API calls in get-result-summary.js#170
atheurer merged 1 commit into
masterfrom
serialize-result-summary

Conversation

@atheurer

@atheurer atheurer commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Serialize all Promise.all API calls in get-result-summary.js to prevent OpenSearch ETIMEDOUT connection errors
  • Each request goes through resolveRun middleware which queries OpenSearch multiple times for instance discovery, so parallel requests multiply the load significantly
  • Three Promise.all blocks replaced: iteration data (4 parallel → sequential), sample data (2 parallel → sequential), metric data (batches of 10 → one at a time)

Test plan

  • Run crucible get result --run <id> on a system with active OpenSearch indexing
  • Verify no ETIMEDOUT errors
  • Verify result summary output is correct (same data, just slower)

🤖 Generated with Claude Code

…erload

Replace Promise.all parallel requests with sequential await calls to
avoid ETIMEDOUT errors when OpenSearch's connection pool is exhausted.

- Iteration-level data (params, period names, samples, primary metric)
  fetched sequentially instead of 4 parallel requests
- Sample-level data (statuses, period IDs) fetched sequentially instead
  of 2 parallel requests
- Metric data fetched one at a time instead of batches of 10 parallel

Each request goes through the resolveRun middleware which queries
OpenSearch multiple times for instance discovery, so parallel requests
multiply the load significantly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@atheurer
atheurer merged commit 1478295 into master Apr 9, 2026
76 of 80 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Crucible Tracking Apr 9, 2026
@k-rister
k-rister deleted the serialize-result-summary branch May 21, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants