mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 00:09:35 +00:00
## Problem The **Pipelines-Regression** CI job was failing on the P0 test: > `[chromium] › RegressionSet/Pipelines/pipeline-regression.spec.js:73 › should validate scheduled pipeline SQL query with metrics stream type` Failure (all 4 attempts): ``` FetchError: Invalid response body while trying to fetch http://localhost:5080/api/default/ingest/metrics/_json: Premature close ``` The error originates in `beforeEach`, inside `pipelinesPage.ingestMetricsData()`. In the same setup, the global log ingestion, trace ingestion, and RUM ingestion all succeeded — only the metrics ingestion `fetch` threw. ## Root cause `Premature close` / `ECONNRESET` / `socket hang up` are **transient** `node-fetch` errors that happen when the server closes a keep-alive socket before the response body is fully read. They are not real ingestion failures. Because the throw happens in the `beforeEach` of a **serial** describe block, a single flaky socket error fails the whole suite. There was no retry on any of the ingestion `fetch` calls in `pipelinesPage.js`. ## Fix Add a small `fetchWithRetry()` helper and use it for the three ingestion calls (metrics, traces, bulk). It retries (with linear backoff) **only** on transient network errors; real HTTP failures (non-2xx) are untouched and still throw immediately. ## Verification Ran locally against `localhost:5080`: - Failing P0 test in isolation — **passed** (36.9s) - Full `pipeline-regression.spec.js` suite — **7 passed** (3.4m) ## Notes - Only `tests/ui-testing/pages/pipelinesPages/pipelinesPage.js` is changed. - The transient socket flake can't be reproduced against a healthy local server; the local runs confirm the retry wrapper is transparent on success (no regression). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>