Commit Graph
4 Commits
Author SHA1 Message Date
Neha PandClaude Sonnet 4.6 5ea540c0d6 fix(test): extend keep-alive/compress fix to GeneralTests, Streams, Reports, SDR jobs (#12804)
## Summary

Applies the same node-fetch v2 fix from PR #12799 (pipelines) to all
remaining CI jobs that show \"Premature close\" / ECONNRESET failures:

- **apiUtils.js** (`sendRequest`): adds `compress:false` +
`noKeepAliveAgent` — fixes **Streams** job
(`multiselect-stream.spec.js`, `streamname.spec.js`)
- **apiCleanup.js** (`_fetch`): same fix on the node-fetch fallback path
— fixes **Reports** job (dashboard/report API calls)
- **model-pricing.spec.js**: wraps `node-fetch` with a local safe-fetch
shim — fixes **GeneralTests** job (`/llm/models` premature close)
- **streamsPage.js**: replaces four dynamic `node-fetch` imports with a
shared `_nodeFetchSafe` helper
- **ingestionPage.js**: adds `fetchWithRetry` around native fetch to
handle transient `ECONNRESET`/premature close in `beforeEach` ingestion

**SDR fix:** `regexPatternManagement.spec.js` — `AddRegexPattern.vue`
migrated to `OForm` with submit-time Zod validation
(`AddRegexPattern.schema.ts`). The `ODrawer` primary button is no longer
disabled for empty fields; validation triggers on click and keeps the
drawer open on error. Replaces stale `expect(isDisabled).toBeTruthy()`
checks with click-then-expect-drawer-still-visible assertions.

## Root cause (same as #12799)

`node-fetch` v2 defaults to `keepAlive: true` (connection pooling) and
`compress: true` (Gunzip stream). When the server closes a pooled
connection early, the Gunzip stream throws \"Premature close\". Because
the dead socket stays in the pool, retries hit the same socket.
`keepAlive: false` + `compress: false` eliminates both failure modes.

## Test plan

- [ ] GeneralTests / `model-pricing.spec.js` — no more premature close
on `/llm/models`
- [ ] Streams / `multiselect-stream.spec.js` + `streamname.spec.js` — no
more premature close on ingestion
- [ ] Reports / `reportsScheduleNow.spec.js` — no more premature close
during beforeEach ingestion
- [ ] SDR / `regexPatternManagement.spec.js` — validation test passes
with updated assertion

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 08:38:02 +00:00
Shrinath RaoandClaude Opus 4.6 2ef794c5ac test: Streams cloud compatibility for alpha1 E2E (Set3) (#10836)
## Summary
- **apiUtils.js**: `getHeaders()` now reads `cloud-config.json` for
`email:passcode` auth when `IS_CLOUD=true`, with caching
- **streamsPage.js**: `deleteStreamViaAPI`, `createStream`,
`verifyStreamExists` use `page.evaluate(fetch())` on cloud for OIDC
cookie auth on management APIs (node-fetch can't send session cookies)
- All 5 Streams spec files (30 tests) passing on alpha1 cloud

## Test plan
- [x] All 5 Streams specs pass locally against alpha1 (headless)
- [x] CI run passed:
https://github.com/openobserve/o2-enterprise/actions/runs/22906826643
- [ ] Full regression with all shards uncommented after merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:33:05 +05:30
Shrinath Rao f61b715a1e test: Cleanup Mechanism and ENV Runs for e2e tests (#8839)
### **PR Type**
Enhancement, Tests


___

### **Description**
- Add robust alerts cleanup utilities

- Improve UI flows and resiliency

- Support deployed env testing delays

- Add CI cleanup and health checks


___

### Diagram Walkthrough


```mermaid
flowchart LR
  UI["Playwright UI flows hardened"]
  API["APICleanup cascade (Alerts→Folders→Destinations→Templates)"]
  CI["CI workflow targets deployed env"]
  Delay["Configurable test step delay"]
  Data["Global ingestion more robust"]

  UI -- "uses" --> API
  CI -- "runs cleanup.spec" --> API
  CI -- "health checks + env vars" --> Data
  Delay -- "slows page ops" --> UI
  Data -- "ingest logs with parsing" --> UI
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>7
files</summary><table>
<tr>
<td><strong>alertDestinationsPage.js</strong><dd><code>Add search,
cascade-safe delete, bulk prefix cleanup</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-57e5c53b4ef998b3d8708149620ff94dcc46807927f1a3a9e9f28ed3ebe25b0a">+178/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>alertTemplatesPage.js</strong><dd><code>Add template search,
in-use handling, prefix cleanup</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-f4ebd248b2140051e74dbbbd1aabe344f01c80704ce5857e9c28a04350e018f3">+177/-2</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>alertsPage.js</strong><dd><code>Harden alert actions, bulk
deletion, search across folders</code></dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-79ee01d6d7f145f19207b93b87143b545a1188cfc6a82bc8c45fecfbf68f8a1d">+280/-9</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>apiCleanup.js</strong><dd><code>New API-based cascade
cleanup utility</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-537fe76c0d8e26e81c5f77c83bd0ee35daaa973822105c809bf83171a26b33c5">+399/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>page-manager.js</strong><dd><code>Wire APICleanup into
PageManager</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-565eab8b3c767ae50c9d05e591621d14f66b81af84d6b5ea6efe136c1c3933df">+4/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>baseFixtures.js</strong><dd><code>Add configurable test step
delay hooks</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-c4c5ee7fbb248d1ab14d3d4e33ffb9626f9aab74c9e0207fcfc08051c8c3c7ee">+46/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>global-setup.js</strong><dd><code>Harden login and ingestion
with diagnostics</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-06323dad7214f86b41b62e121e716eeea0054bc4d950c6bcf4a0efe53894acc8">+61/-22</a>&nbsp;
</td>

</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>commonActions.js</strong><dd><code>Fix ingestion URLs to use
org variable</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-4d726dd2bdb34b2c90a31798ff49b6df5bc952bd049b7c38bebb18b6db0076e2">+4/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>4
files</summary><table>
<tr>
<td><strong>alerts-e2e-flow.spec.js</strong><dd><code>Pre-move folder
cleanup and stabilization</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-32972e38c1fe0e8bb887f9f254b3130916a36f96ea924f9987493d44efefeab9">+13/-3</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>alerts-import.spec.js</strong><dd><code>Use dedicated
invalid import test data</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-62b6ec4818685eacc0a934d68aaadfd73b512ef4f4be25fcd5135b97c2844912">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>cleanup.spec.js</strong><dd><code>New pre-test API cleanup
spec</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+29/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>invalid-alert.json</strong><dd><code>Add invalid alert
sample for import tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-c695f71048e9393a45d3e3e3e415696559fecf3ba85712e7c3f366092f53f424">+24/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>playwright.yml</strong><dd><code>Target deployed env; add
cleanup job and health checks</code>&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8839/files#diff-7afcd2d8f7b49bda74843f209eefb7b2da45f7e7803bf2e4bd636699b76aa2d3">+123/-65</a></td>

</tr>
</table></details></td></tr></tr></tbody></table>

</details>

___
2025-11-04 23:54:54 +05:30
Neha P 3ff97016cf test: e2e-stream-name (#6764)
Added a test to add stream name and assert if stream with uppercase
exists
add a stream with lowercase and assert if stream name with lowercase
exists
2025-05-08 20:16:03 +05:30