mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 00:09:35 +00:00
## What Stabilizes the **Traces** and **Pipelines** shards of the alpha1 cloud E2E suite (`playwright_alpha1.yml`) to green. Rebased on `main` — builds on #13191's protocol-aware ingestion agent (`selectAgent`), so no duplicate transport fix here. The failing run had 1 hard failure + 1 flake in Traces and 7 failures + 1 flake in Pipelines. Root causes: a data dependency (error traces not guaranteed), hover-flyout navigation force-clicks that miss, a refresh button disabled while loading, and logs indexing latency. All fixed with deterministic data/waits — no `waitForTimeout` as a fix, no `force:true`, no retry-count bumps, no weakened assertions. ## Root cause & fixes **Traces** 1. **`tracesAnalyzeDimensions` "P0: Error-only toggle filters trace results"** (hard fail, both attempts). The error-only toggle is the error-count badge in `SearchResult.vue`, rendered `v-if="errorCount != null && errorCount > 0"` — it exists only when the search returns an error span. The shared `default` trace stream has no guaranteed error traces (global-setup ingests only logs), so the badge was present or absent by luck of the window (hence the intermittent CI greens). Fix: `beforeAll` seeds guaranteed error traces via a new `ingestTraces(page, n, { forceScenario: 'error' })` option in `trace-ingestion.js`, and `tracesPage.waitForErrorBadgeAfterSearch()` re-runs the search until the seeded errors are indexed — a bounded wait for backend processing, not a sleep. 2. **`traceQueryEditor` "P2: View error spans and their details"** (flaky). `clickFirstErrorTrace()` used a blind `waitForTimeout(2000)` that raced the trace-details render before the test asserted on it. Now waits for `trace-details-tree` to be visible. **Pipelines** (`pipelinesPage.js`) 3. **`pipeline-section-tab-streamPipelines` 45s timeout** (5 tests: `pipeline-core:56/159/238`, `pipelines:479`, `pipeline-conditions:297`). `openPipelineMenu()` / `navigateToStreams()` navigate via `openNavFlyoutChild`, which hovers a nav group tile and force-clicks the teleported flyout child. The flyout self-closes on settle, so the click can miss and the page never navigates — the follow-up tab/refresh click then dead-waits the 45s action timeout. Both now verify the target page rendered (`pipeline-list-page` / `log-stream-table`) and fall back to a direct `page.goto()` of the route otherwise. (A failure screenshot showed exactly this: the Data flyout open over a blank page.) 4. **`log-stream-refresh-stats-btn` 45s timeout** (3 tests: `pipeline-dynamic:72/97/113`). The refresh button is an `OButton` with `:loading` bound to the stream-stats fetch, and `OButton` renders `:disabled="disabled || loading"`. Clicking during the (slow, on loaded alpha) stats load waited on actionability until timeout. `refreshStreamStats()` now waits `toBeEnabled()` before clicking; `navigateToStreams()` waits for the table instead of a blind 1s. 5. **`openTimestampMenu` empty-table dead-wait.** After exploring the destination stream, a bare `.click()` on the first logs row timed out 45s when the freshly-ingested rows weren't indexed yet (high indexing latency on loaded envs) — a latent flake exposed once fix 3 let the test reach this step. Now re-runs the logs query until a row appears, then clicks. ## Validation - **CI — both shards green (workers=3, alpha cloud):** https://github.com/openobserve/o2-enterprise/actions/runs/29563931877 (`alpha1-e2e / Traces` ✅ · `alpha1-e2e / Pipelines` ✅) - **Original failing run:** https://github.com/openobserve/o2-enterprise/actions/runs/29481437880 - **Local (alpha, CI conditions):** each previously-failing test re-run to green — Traces error-toggle & error-spans; `pipeline-core:56/159/238`; `pipeline-dynamic:72`. ## Notes - Only 4 files change (`pipelinesPage.js`, `tracesPage.js`, `tracesAnalyzeDimensions.spec.js`, `trace-ingestion.js`). The https-ingestion agent fix these depend on already landed on `main` in #13191 — this branch relies on it rather than re-adding it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>