mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
ea2e2131bdc808b829a1dc3b73abce1cd1737708
20
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2df0932314 |
feat(enterprise-gating): show locked features in OSS instead of hiding them (#15112)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
5cd1d86469 | fix(functions): repair an import fix-up that could not write, with E2E + API coverage (#15043) | ||
|
|
eedc773cd7 | chore: remove action scripts / action server (#14000) | ||
|
|
442ca09688 |
test(functions): un-skip JS-in-all-orgs tests + add per-event runtime-error coverage (#13341)
Replaces the `skip` band-aids that PR #13156 ("workflows v1") left on the **Functions** tests with real, running coverage of the current behaviour — on the correct edition — plus new tests for behaviour #13156 introduced but never covered. Test files only, no feature-code churn. Clean branch off `main`. ## Background — what #13156 actually changed #13156 bundled a Functions backend change unrelated to Workflows, and the old tests still asserted the *pre*-#13156 rules, so they were silenced with `pytest.skip(...)` / `test.skip(...)`. Two rules changed: 1. **JS is no longer `_meta`-only at the backend.** `save_function` / `test_run_function` have **no org gate on any edition** — JS (`transType:1`) is accepted in every org, including `default`, on **both OSS and Enterprise**. The `_meta`-only rule now lives **only in the frontend** (`AddFunction.vue` gates the JS radio on `isEnterprise || isCloud || org === "_meta"`, baked at build time by `VITE_OPENOBSERVE_ENTERPRISE`). 2. **The compile-check reports only *syntax* errors, not *runtime* errors.** A syntax error still returns **400**; code that compiles but throws at runtime now returns **200** with the error surfaced **per-event** in `results[].message` — for **both VRL and JS**. Because the API tests hit the backend directly, there is **no edition difference to assert for them** — the earlier "OSS asserts 400 / ENT asserts 200" framing was incorrect. Only the **e2e** (frontend JS-radio) is genuinely edition-dependent. ## API tests (pytest · `tests/api-testing`) **`test_functions.py`** - Keep the compile-error → 400 test (`test_test_endpoint_with_invalid_vrl_returns_400`) — it was never actually failing; `test`/`=====` are genuine VRL *compile* errors (`undefined variable` / syntax) and still 400. - Add `test_test_endpoint_with_js_runtime_error_returns_200` and `test_test_endpoint_with_vrl_runtime_error_returns_200` — runtime errors now return 200 with a per-event `results[].message`. **`test_functions_meta_org_restriction.py`** - Flip the 3 previously-skipped "blocked in default" tests → assert **200** (JS allowed in every org): `..._blocked` → `..._allowed`. - Repurpose `TestErrorMessages` (its old restriction-message assertions no longer exist) into per-event runtime-error coverage: JS `ReferenceError` content, VRL + JS surfacing consistency, partial-failure (only the failing event carries a message), and a syntax-error → 400 regression guard. - Update the class/module docstrings to the real contract. **`test_js_enrichment.py`** - Flip `test_js_function_in_default_org_returns_400` → `test_js_function_in_default_org_allowed` (200, transform runs). ## e2e (Playwright · `tests/ui-testing/Functions/js-transform-type.spec.js`) The JS-radio rule *is* edition-dependent. Instead of a skip (or an env-var hack), the two tests now detect edition at runtime via `EditionFeaturesPage.detectEdition()` — which reads the header edition button, driven by the **same** build flag that gates the JS radio, so it's the exact source of truth and needs **no CI change**: - **OSS build** → assert JS radio **hidden** in a non-meta org. - **Enterprise / cloud build** → assert JS radio **visible** in every org. The edition-agnostic steps that were trapped inside the skipped tests now **always run**: VRL-function create in a non-meta org (a P0 smoke path), and JS-visible in `_meta`. Added `P1: VRL runtime error surfaces in error-details` (mirrors the existing JS `ReferenceError` case; covers the VRL half of the per-event-error change). ## Skips removed (before → after) | Old (skipped) | New (runs & passes) | |---|---| | `test_create_js_function_in_default_org_blocked` | `..._default_org_allowed` | | `test_test_js_function_in_default_org_blocked` | `..._default_org_allowed` | | `test_update_vrl_to_js_in_default_org_blocked` | `..._default_org_allowed` | | `test_error_message_content` / `_consistency` | per-event runtime-error tests | | `test_js_function_in_default_org_returns_400` (enrichment) | `..._default_org_allowed` | | e2e `P0: Non-meta org - JS hidden, VRL works` | `P0: Non-meta org - JS radio edition-gated, VRL works` | | e2e `P1: Radio visibility across orgs` (skipped) | same name, edition-aware, no `test.skip` | `grep -rn "JS fns are now allowed" tests/` and `grep -rn "JS is allowed in all orgs on enterprise" tests/` → **both empty**. (The 7 remaining pytest skips are the unrelated `JS_HELPER_UNAVAILABLE` enrichment-helper cases — a separate pre-existing limitation, not part of this change.) ## Verification (local, against current `main` source) Built the current-`main` OSS binary and ran everything live: - **API:** `32 passed`, `0` target skips (7 unrelated `JS_HELPER_UNAVAILABLE` skips remain). - **e2e OSS build:** `7/7` — `detectEdition=opensource`, JS hidden in non-meta. - **e2e Enterprise-frontend build:** `3/3` edition tests — `detectEdition=enterprise`, JS visible everywhere, VRL runtime error renders in error-details. All backend behaviour was confirmed by probing the live `/functions` + `/functions/test` endpoints, not assumed. ## What CI proves, and where - **This PR (openobserve):** `api-testing.yml` runs the API tests; `playwright.yml` (`Functions` shard) runs the e2e on the **OSS** edition (JS-hidden branch). - **Enterprise edition:** dispatch `o2-enterprise` → `playwright.yml` (workflow_dispatch) with `o2_opensource_repo = test/functions-skipped-tests-13318` to run the same specs on the **enterprise** build (JS-visible branch). Pairs with the ENT Functions work in #13318 / o2-enterprise#2217. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com> |
||
|
|
fd85566742 |
feat: workflows version 1 (#13156)
This PR introduces workflows design at: https://github.com/openobserve/designs/blob/main/infrastructure/workflows/design.md --------- Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com> Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
38e944529d |
test: unblock alpha1 cloud E2E suite — shared setup fixes + Functions (#13155)
## What Repairs the shared setup + ingestion path that was failing **every** module of the alpha1 cloud E2E suite (`playwright_alpha1.yml`) after the UX revamp, **and stabilizes the first full test shard — Functions — to green** (validated in CI, run link below). No changes to the test matrix. Per-module fixes for the remaining shards land in separate follow-up PRs. ## Root cause — shared setup (blocked all 13 modules) 1. **Automation login user routes through Okta.** After the revamp, `@openobserve.ai` logins on alpha redirect to Okta SSO and 404 — automation can't complete login. The local-auth `e2etest@o2-qa.com` user still uses the Dex password flow. 2. **Org-switch selectors changed** (`global-setup-alpha1.js`). The org dropdown now opens via a dedicated trigger button; the old inline `arrow_drop_down` text is an SVG icon, the search box's `data-test` moved to the `OSearchInput` wrapper `<div>`, and rows carry a `data-test-org-identifier`. 3. **Ingestion helper rejected https.** `ingestionPage.js` hardcoded an `http.Agent` for node-fetch — throws `Protocol "https:" not supported` against alpha's https ingestion URL (killed ~27 tests/run across modules). ## Root cause — Functions shard 4. **Tests created enrichment tables in the wrong org.** `navigateToBase` passes `?org_identifier=` on the root URL; the redirect to `/web/` **drops the query param**, so the app fell back to the user's default org and enrichment tables were created there. Fixed by deep-navigating to the enrichment page with the org param and asserting the active org stuck (same pattern js-transform tests already use). 5. **Backend bug (reported separately): enrichment URL-jobs fail for table names starting with `schema`.** 100% reproducible, org/session/timing-independent: the job's save step fails with `Failed to save batch 1: not an ingester` (`schema_probe1` ❌ / `view_probe1` ✅, same request otherwise). Test tables renamed `schema_view_*` → `view_schema_*` and `schema_mismatch_*` → `mismatch_schema_*`; cleanup patterns cover both prefixes. The product bug itself still needs a backend fix — it affects any user naming a table `schema…`. Plus hardening while there: URL-job completion is now decided from the backend status API instead of inferring from row-button counts (which misread a failed job as success), the job's `error_message` is logged on failure, and the create form verifies field values + Save enabled + create-API response before proceeding. ## Validation - **CI (this PR's branch): [run #168](https://github.com/openobserve/o2-enterprise/actions/runs/29315765982) — Cloud ✅ (3m31s) + Functions ✅ (13m14s), `playwright_summary` ✅** - Local (alpha, CI conditions): previously-failing schema-view + schema-mismatch tests 2/2 green; earlier full-shard run 24/25 with the same single failure now fixed. ## Notes - `ALPHA1_USER_*` secrets: CI already uses a working non-Okta user (Cloud job green). - Follow-ups: backend `schema`-prefix bug (separate report), per-module PRs for remaining shards. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
e3927ef5d3 |
fix: fuctions module form migration with zod (#12970)
- form migration with zod schema for functions module --------- Co-authored-by: Abhay Padamani <141122205+ktx-abhay@users.noreply.github.com> |
||
|
|
f1913e6d97 | test: form e2e (#12632) | ||
|
+5 |
ae22a74e62 |
feat: ux improvement main (#11838)
#11720 Design at: https://github.com/openobserve/designs/blob/main/dashboards/ux-improvement-dialog/design.md --------- --------- Co-authored-by: ktx-vaidehi <134508096+ktx-vaidehi@users.noreply.github.com> Co-authored-by: Abhay Padamani <141122205+ktx-abhay@users.noreply.github.com> Co-authored-by: Sai Nikhil <nikhil@openobserve.ai> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: ktx-akshay <akshay.patil@kiara.tech> Co-authored-by: Bhargav <BJP232004@GMAIL.COM> Co-authored-by: ktx-mihir <mihir.patel@kiara.tech> Co-authored-by: ktx-riya <riya.kukadiya@kiara.tech> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Omkar Kesarkhane <127078473+omkarK06@users.noreply.github.com> Co-authored-by: omkark06 <omkar@zinclabs.io> Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech> Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech> Co-authored-by: Shrinath Rao <shnath@openobserve.ai> |
||
|
|
b369746c30 |
fix: use raw table_name for URL job lookup in cross-type check (#12277)
## Summary Follow-up to #12249. The cross-type collision check in the file upload handler passes the formatted `stream_name` to `get_url_jobs_for_table`, but URL jobs are stored with the raw `table_name` from the HTTP path. When names contain uppercase or special characters, `format_stream_name("My_Table")` produces `"my_table"`, which won't match the stored URL job name `"My_Table"` — causing the cross-type protection to be silently bypassed. ## Fix Changed `get_url_jobs_for_table(&org_id, &stream_name)` to `get_url_jobs_for_table(&org_id, table_name.trim())` — matching how the URL handler itself queries URL jobs at line 299. ## Before/After ```rust // Before: formatted name passed to URL jobs lookup (WRONG) get_url_jobs_for_table(&org_id, &stream_name) // After: raw table_name passed (CORRECT, matches how URL handler queries) get_url_jobs_for_table(&org_id, table_name.trim()) ``` ## Notes - `ENRICHMENT_TABLES` cache key continues to use `stream_name` (formatted) — that's correct - `get_url_jobs_for_table` now uses `table_name.trim()` — matching the URL handler at line 299 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> |
||
|
|
dee3eb413d | test: alpha1 cloud Functions specs (Set4) (#10837) | ||
|
|
1824dadbb2 |
test: fix JS function test execution workflow and debounce timing (#10660)
## Summary - Fixed `testFunctionExecution()` workflow order — was clicking "Test Function" button (fires API immediately) before entering test events, then clicking "Run Query" (wrong button) - Increased post-typing wait from 500ms to 1000ms in `enterFunctionCode()` to safely clear the Monaco editor's 500ms debounce for v-model sync - Simplified spec test to use default test events instead of broken custom event entry ## Test plan - [ ] Run `npx playwright test playwright-tests/Functions/js-transform-type.spec.js --grep "P1: JS function execution and error handling"` and verify it passes - [ ] Verify P0 function creation tests still pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
d573d01a62 |
fix(test): eliminate bare networkidle timeouts across entire test suite (#10494)
## Summary
- Replaced every bare `waitForLoadState('networkidle')` with `{ timeout:
10000 }.catch(() => {})` across **56 files** (35 spec files, 21 page
objects)
- OpenObserve pages maintain persistent RUM/replay/WebSocket connections
that prevent `networkidle` from ever resolving, causing 90s timeout
crashes
- Added `fetchWithRetry` helper for transient 502/proxy errors in SDR
multi-pattern `beforeAll`
- Bumped SDR multi-pattern test timeout from 300s to 420s for CI
## Files changed
**Page objects (21 files):** alertsPage, alertManagement,
alertCreationWizard, alertTemplatesPage, alertBulkOperations, logsPage,
streamsPage, streamAssociationPage, sdrPatternsPage,
sdrVerificationPage, dashboardPage, functionsPage, pipelinesPage,
enrichmentPage, sanityPage, schemaPage, loginPage, commonActions, and
more
**Spec files (35 files):** All SDR specs, all Traces specs, all Logs
specs, all RegressionSet specs, Alerts specs, Pipelines specs,
Dashboards specs, Functions specs, GeneralTests specs, wait-helpers
utility
## Test plan
- [x] Verify zero bare `networkidle` calls remain in `tests/ui-testing/`
- [ ] CI passes for SDR, Streams, Logs Regression, and other test suites
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||
|
|
15824d6f7b |
test: enrichment table schema mismatch test fix (#10122)
### **PR Type**
Tests
___
### **Description**
- Re-enable schema mismatch URL feature test
- Add update mode selection before URL input
- Use fillUrlInput instead of addUrlInEditMode
- Renumber steps and refine logging
___
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>enrichment-table-url.spec.js</strong><dd><code>Re-enable
and refine schema mismatch test</code>
</dd></summary>
<hr>
tests/ui-testing/playwright-tests/Functions/enrichment-table-url.spec.js
<ul><li>Removed <code>test.skip</code> to re-enable the P1 schema
mismatch test<br> <li> Added <code>selectUpdateMode('append')</code> to
expose URL input<br> <li> Replaced <code>addUrlInEditMode</code> with
<code>fillUrlInput</code> call<br> <li> Updated step numbering and
enhanced log messages</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10122/files#diff-faa0d1fc147a442b9738f5287bb60e22ddf44bae8568f7aeb6cfba0a267d138b">+12/-10</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
|
||
|
|
bb765e6b7b |
test: add regression bug tests (#10132)
### **User description** - Add logs-regression-bugs.spec.js for core logs page bugs (#9996, #9796, #9533, #8928) - Change logs-regression-bugs from serial to parallel mode for faster execution - Add try/catch resilience for apostrophe test (Bug #9475) - Add graceful skip for auto-refresh test when button disabled (Bug #9877) - Fix networkidle timeout in pipeline preview test (Bug #9498) - Add test.skip() pattern for OpenAPI test (Bug #9308) - Fix hoverOnFieldExpandButton logic bug in logsPage.js - Add isLiveMode5SecEnabled() and getPageContent() POM methods - Add stream details methods to streamsPage.js - Add pipeline regression methods to pipelinesPage.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) ___ ### **PR Type** Tests, Enhancement ___ ### **Description** - Enhance POM with robust waits and new regression methods - Add comprehensive logs regression tests for bugs #9996, #9796, #9533, #8928 - Introduce VRL-specific tests (saved views #9690, icon absence #9550) - Add pipeline and streams regression tests (#9354, #9498, #10029) ___ <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>3 files</summary><table> <tr> <td><strong>logsPage.js</strong><dd><code>Add robust wait and regression POM methods</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-8045b343491d8943869c1af74cdafab204dc49c02a70294417e73f47d35e0b59">+115/-4</a> </td> </tr> <tr> <td><strong>pipelinesPage.js</strong><dd><code>Add regression POM methods for pipeline interactions</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-d5f2771fd1139c174c46d09a9ab2da0ea4588b853e2b87e4728322d072542f49">+105/-0</a> </td> </tr> <tr> <td><strong>streamsPage.js</strong><dd><code>Add regression POM methods for streams interactions</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-792df584eb1625d35fd1e33a5a37aa3ada28f15ec1e77a1921f1c56e50bf70d2">+61/-0</a> </td> </tr> </table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>10 files</summary><table> <tr> <td><strong>enrichment-table-url.spec.js</strong><dd><code>Add enrichment table search and CSV tests</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-faa0d1fc147a442b9738f5287bb60e22ddf44bae8568f7aeb6cfba0a267d138b">+116/-0</a> </td> </tr> <tr> <td><strong>logspage.spec.js</strong><dd><code>Add VRL saved view regression test</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-b1a64252adae01c5e8f7e758e3c820f5476260f60c44a4a57b4f15a05a59a85a">+172/-0</a> </td> </tr> <tr> <td><strong>logstable.spec.js</strong><dd><code>Add VRL include/exclude icon regression test</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-4d69d08f317ffc4a26179c74da0418c4db4184ce5f4f96a8df70af7a5a02008c">+119/-7</a> </td> </tr> <tr> <td><strong>pipeline-core.spec.js</strong><dd><code>Add VRL function node pipeline test</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-3e57cb10518ffdfd480b0d5ec65db1fcee8419e9093ac0777ebabed4fccf2246">+75/-0</a> </td> </tr> <tr> <td><strong>pipelines.spec.js</strong><dd><code>Add pipeline enable/disable toggle test</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-948dbdd764f739f3a4bcbb8c643ec4721e08695031bd9791040d68f7df842aee">+91/-0</a> </td> </tr> <tr> <td><strong>logs-regression-bugs.spec.js</strong><dd><code>Create logs regression bug fix spec</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-c53c1c43378b285365467bf61d779983eae7d287f2ad18265db590270ed6ff6c">+214/-0</a> </td> </tr> <tr> <td><strong>logs-regression.spec.js</strong><dd><code>Enhance apostrophe and auto-refresh regression tests</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-99da86ede55fa5f2e3d3fbef897ba7aaa5a7db702a0135f66ac4c888fc7311b6">+36/-11</a> </td> </tr> <tr> <td><strong>pipeline-regression.spec.js</strong><dd><code>Extend pipeline regression tests for preview and backfill</code></dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-6dd04b750c40b11abea987a130c1af35d7c89b74c303a2ad49207df5fe3a37e3">+146/-0</a> </td> </tr> <tr> <td><strong>streams-regression.spec.js</strong><dd><code>Add FTS auto-add streams regression test</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-1c2aad49737186272645ea4cf0f7e3080e28d0c4d8585b3d07edc1889368591d">+39/-0</a> </td> </tr> <tr> <td><strong>ui-regression.spec.js</strong><dd><code>Enhance UI regression tests and skip logic</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/10132/files#diff-8ade144a0a63d887d5c6c9070c250dac9360925be9e6e5145ea4a0f43ceb2fdf">+116/-35</a></td> </tr> </table></details></td></tr></tr></tbody></table> </details> ___ --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
fa5072547a |
test: enrichment schema mismatch testcases (#10092)
### **PR Type**
Enhancement, Bug fix, Tests
___
### **Description**
- Fix dynamic edit/delete button selection in POM
- Add POM helper methods (save, error check, navigation)
- Enhance URL tests with per-test cleanup
- Add URL Jobs dialog schema mismatch test
___
<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><table>
<tr>
<td>
<details>
<summary><strong>enrichmentPage.js`</strong><dd><code>POM enhancements
and button index fixes</code>
</dd></summary>
<hr>
`tests/ui-testing/pages/generalPages/enrichmentPage.js`
<ul><li>Use dynamic index to find edit/delete buttons<br> <li> Add POM
methods: clickSave, error notification, navigation<br> <li> Implement
URL Jobs dialog interactions (open, verify, close)<br> <li> Provide
deleteTableIfExists cleanup utility</ul>
</details>
</td>
<td><a href=""></a></td>
</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>enrichment-table-url.spec.js`</strong><dd><code>Test
cleanup and schema mismatch dialog test</code>
</dd></summary>
<hr>
`tests/ui-testing/playwright-tests/Functions/enrichment-table-url.spec.js`
<ul><li>Track <code>currentTableName</code> for per-test cleanup<br>
<li> Replace raw save/cancel with new POM methods<br> <li> Refactor
URL-404 handling using <code>searchTableWithRetry</code><br> <li> Add
<code>URL Jobs dialog</code> schema mismatch test</ul>
</details>
</td>
<td><a href=""></a></td>
</tr>
<tr>
<td>
<details>
<summary><strong>cleanup.spec.js`</strong><dd><code>Add schema mismatch
cleanup regex</code>
</dd></summary>
<hr>
`tests/ui-testing/playwright-tests/cleanup.spec.js`
- Extend cleanup regex to include `schema_mismatch_<uuid>` pattern
</details>
</td>
<td><a href=""></a></td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
c3793677b5 |
test: add enrichment append and replace url tests (#10075)
Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
c792ce78d7 |
test: Add E2E tests for enrichment table URL feature (#10057)
### **User description**
- Add enrichment-table-url.spec.js with 7 test
- Add 18 page object methods to enrichmentPage.js for URL-based tables
- Add cleanup patterns for URL-based enrichment table tests
- Add enrichment-table-url.spec.js to playwright.yml CI workflow
Test Coverage:
- P0: Create table from URL, URL validation, table visibility
- P1: Update modes (reload/append/replace), cancel, search, delete
- P2: Source toggle, nonexistent URL, data exploration
___
### **PR Type**
Enhancement, Tests
___
### **Description**
- Add URL-based enrichment table POM methods
- Implement E2E tests for URL feature
- Extend cleanup patterns for URL tables
- Integrate tests into CI workflow
___
### Diagram Walkthrough
```mermaid
flowchart LR
POM["URL-based POM methods"] --> Tests["E2E URL enrichment tests"]
Tests --> Cleanup["Extend cleanup patterns"]
Tests --> CI["Update CI workflow"]
```
<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><table>
<tr>
<td>
<details>
<summary><strong>enrichmentPage.js</strong><dd><code>Add URL-based
enrichment POM methods</code>
</dd></summary>
<hr>
tests/ui-testing/pages/generalPages/enrichmentPage.js
<ul><li>Add URL-based locators for enrichment tables<br> <li> Implement
methods for URL workflows (select, fill, create)<br> <li> Add job status
polling and verification functions<br> <li> Provide helper methods for
update mode and toggles</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10057/files#diff-98a7e60352ddf3be23cf70170559e637ef448c189cd9414448e9afff897c3019">+444/-0</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>enrichment-table-url.spec.js</strong><dd><code>Implement
URL enrichment feature tests</code>
</dd></summary>
<hr>
tests/ui-testing/playwright-tests/Functions/enrichment-table-url.spec.js
<ul><li>Add E2E tests covering URL enrichment feature<br> <li> Include
P0, P1, P2 test suites<br> <li> Skip long-running tests due to
timeout<br> <li> Utilize fixtures and logging in tests</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10057/files#diff-faa0d1fc147a442b9738f5287bb60e22ddf44bae8568f7aeb6cfba0a267d138b">+381/-0</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>cleanup.spec.js</strong><dd><code>Extend cleanup
patterns for URL tests</code>
</dd></summary>
<hr>
tests/ui-testing/playwright-tests/cleanup.spec.js
<ul><li>Extend cleanup patterns for URL test tables<br> <li> Add regex
for URL-based test table names<br> <li> Retain existing enrichment and
stream cleanup logic</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10057/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+14/-1</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>playwright.yml</strong><dd><code>Include URL tests in
CI workflow</code>
</dd></summary>
<hr>
.github/workflows/playwright.yml
<ul><li>Add enrichment-table-url.spec.js to CI run list<br> <li> Ensure
URL tests run in Chrome suite</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10057/files#diff-7afcd2d8f7b49bda74843f209eefb7b2da45f7e7803bf2e4bd636699b76aa2d3">+1/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
|
||
|
|
8bf9eac8a2 |
test: Functions test suite rework - 67% reduction with full validation coverage (#9957)
## Summary Rework of the Functions test suite to reduce test count while maintaining 100% validation coverage. | Metric | Before | After | Change | |--------|--------|-------|--------| | **UI Tests** | 36 | 12 | **-67%** | | **API Tests (Python)** | 0 | 16 | +16 new | | **Validation coverage** | 100% | 100% | Preserved | | **CI Integration** | ❌ | ✅ | Added | **Cleanup performed:** - 3 placeholder tests removed (only had logging, no assertions) - 1 duplicate test removed - 4 cross-file duplicates deduplicated ## What Changed ### Test File Consolidation | Original Spec Files | Final Spec File | Original | Final | Reduction | |---------------------|-----------------|----------|-------|-----------| | `meta-org-js-restriction.spec.js` + `javascript-functions.spec.js` | `js-transform-type.spec.js` | 22 | 6 | 73% | | `result-array-functions.spec.js` | `row-expansion.spec.js` | 14 | 6 | 57% | | **Total** | **2 files** | **36** | **12** | **67%** | ### New Python API Tests Added 16 comprehensive API tests in `tests/api-testing/tests/test_functions_meta_org_restriction.py`: | Category | Count | Tests | |----------|-------|-------| | JS Restriction (blocked in default org) | 5 | create/test/update blocked | | VRL Functions (work in default org) | 4 | create/test/update works | | Auto-Detection | 2 | trans_type auto-detection | | Error Messages | 2 | content and consistency | | Edge Cases | 3 | empty/invalid/case-sensitivity | ### Critical Bugs Fixed 1. **Missing `_meta` org navigation** - JavaScript functions are ONLY allowed in `_meta` organization. Tests were navigating to default org. 2. **Python API tests using wrong field names** - Create/Update use `transType` (camelCase), Test endpoint uses `trans_type` (snake_case). 3. **Missing pipeline cleanup pattern** - Added `realfile*` pattern that was causing 409 errors. ## Files Modified ### UI Tests (Final) - `tests/ui-testing/playwright-tests/Functions/js-transform-type.spec.js` (6 tests) - `tests/ui-testing/playwright-tests/Functions/row-expansion.spec.js` (6 tests) ### UI Tests (Removed/Consolidated) - `meta-org-js-restriction.spec.js` → merged into `js-transform-type.spec.js` - `javascript-functions.spec.js` → merged into `js-transform-type.spec.js` - `result-array-functions.spec.js` → renamed to `row-expansion.spec.js` ### Cleanup Infrastructure - `tests/ui-testing/playwright-tests/cleanup.spec.js` - Consolidated function cleanup, added realfile* pattern - `tests/ui-testing/pages/apiCleanup.js` - Added org-aware cleanup methods ### API Tests (New) - `tests/api-testing/tests/test_functions_meta_org_restriction.py` - 16 new tests ### CI Integration - `.github/workflows/playwright.yml` - Added Functions test matrix entry ## Final Test List (12 UI Tests) ### js-transform-type.spec.js (6 tests) | # | Test | Priority | |---|------|----------| | 1 | P0: JavaScript function creation flow in _meta org | @smoke, @P0 | | 2 | P0: JS function creation and validation flow | @smoke, @P0 | | 3 | P1: JS function execution and error handling | @P1 | | 4 | P1: JS function error cases | @P1 | | 5 | P0: Default org - JS hidden, VRL works | @smoke, @P0 | | 6 | P1: Radio visibility across orgs | @P1 | ### row-expansion.spec.js (6 tests) | # | Test | Priority | |---|------|----------| | 1 | P0: VRL row expansion creation and validation flow | @smoke, @P0 | | 2 | P2: VRL row expansion edge cases | @P2 | | 3 | P0: JS row expansion creation and validation flow | @smoke, @P0 | | 4 | P1: JS row expansion edge cases and transformations | @P1 | | 5 | P1: Compare VRL and JS row expansion output | @P1 | | 6 | P1: Pipeline integration and error handling | @P1 | ## Test plan - [x] All 12 UI tests passing locally - [x] All 16 Python API tests passing locally - [x] Sentinel audit passed (POM compliant, no raw selectors) - [x] Hard assertions applied (no soft assertions) - [ ] CI pipeline runs successfully |
||
|
|
ce09cd0a4d |
feat: add js for claim parser (#9873)
### **User description** Design at : security/sso-claim-parser/configuration.md ___ ### **PR Type** Enhancement, Tests ___ ### **Description** - Introduce rquickjs-based JS runtime for functions - Add compile_js_function and apply_js_fn utilities - Extend pipeline to support JS via CompiledFunctionRuntime - Update web UI: select JS/VRL transforms, show JS errors ___ ### Diagram Walkthrough ```mermaid flowchart LR A["FunctionNode"] -->|JS| B["compile_js_function"] A -->|VRL| C["compile_vrl_function"] B --> D["apply_js_fn"] C --> E["apply_vrl_fn"] D --> F["send to children"] E --> F ``` <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>13 files</summary><table> <tr> <td><strong>function.ts</strong><dd><code>Add optional `trans_type` to TestFunctionPayload</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-c6766f6c671adce05f9eef5d4a57a32371fa7da35628ef5c142fa503d191cb16">+16/-0</a> </td> </tr> <tr> <td><strong>js.rs</strong><dd><code>Introduce JS runtime, compile and apply functions</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-88e490bed5fa6c9c8e0aa2738b95c5284bb97899298f54b9cd587713e3ef0109">+756/-0</a> </td> </tr> <tr> <td><strong>batch_execution.rs</strong><dd><code>Extend pipeline execution to handle JS functions</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-3f6824a6eddaf1603e5cb0f1a4311ac6a45e1ffb967266ccc1f0bba944625e69">+465/-96</a></td> </tr> <tr> <td><strong>functions.rs</strong><dd><code>Validate and test-run JS transforms, restrict to _meta</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-ed5611a9aa6b5c033e70d7631ba72fafad3cc842672077a7fcf965d11a4fef23">+319/-35</a></td> </tr> <tr> <td><strong>mod.rs</strong><dd><code>Forbid JavaScript functions in pipelines globally</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-c186c796a7bdfd9d1301b1429df11456430f1d0d4758783810b9e2e44384e3b2">+39/-1</a> </td> </tr> <tr> <td><strong>jwt.rs</strong><dd><code>Add JS claim parser execution function</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-232cab74f4cbf135af424744272e17732fbda8ac005d33c0acb4597e65479d02">+25/-2</a> </td> </tr> <tr> <td><strong>mod.rs</strong><dd><code>Wrap JS compile/apply in ingestion API</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-7c7b5bca85f0ced652965cae66540c96f56dfcca4f4c16b77bf7b45aac203d1b">+24/-1</a> </td> </tr> <tr> <td><strong>mod.rs</strong><dd><code>Include `trans_type` in test_function API payload</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-a5e1b3644cef9feb689dfe66382e44e5434ecadbff3469127346a333d4733102">+8/-3</a> </td> </tr> <tr> <td><strong>AddFunction.vue</strong><dd><code>UI: add JS/VRL transform type selector</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-ebfd6c538f3cd3ecb9ab17550fd76e2e89e7a1abccc83a7505077e4af3eee110">+42/-25</a> </td> </tr> <tr> <td><strong>FunctionsToolbar.vue</strong><dd><code>Toolbar: transform type radio buttons</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-8283d2ff9c4a66b4b59eac306672aca2d54655a462e2ddb88e14e039d79dcdaf">+51/-3</a> </td> </tr> <tr> <td><strong>DomainManagement.vue</strong><dd><code>Track claim-parser function changes for save button</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-5e47cd01fcb63f7ef27dc64d2ecf66c39e17097e29944951c3ae1bfe715bb97c">+17/-9</a> </td> </tr> <tr> <td><strong>TestFunction.vue</strong><dd><code>Support JS error messaging in test UI</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-b9af9a2d1bf04d23422c26a13e6a763c6953c8713357a2f64ed8073ce6c926a3">+15/-5</a> </td> </tr> <tr> <td><strong>PipelineEditor.vue</strong><dd><code>Filter out JS functions in pipeline editor UI</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-68c21f647336067eb79737ce9aca2d49632f2fa1c0878bcfdae55607e3473a15">+12/-4</a> </td> </tr> </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>2 files</summary><table> <tr> <td><strong>function.rs</strong><dd><code>Extend `Transform` model for JS support</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-27c9f3d93723397a0e234bc45c9f543b43eff5fd518d76e735f78d95a58f3f1c">+16/-6</a> </td> </tr> <tr> <td><strong>mod.rs</strong><dd><code>Register new `js` utils module</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-2aa59ce4464e7dbabdb9367fc8bb8c1b489c914b8690577d4916870463ab12db">+1/-0</a> </td> </tr> </table></details></td></tr><tr><td><strong>Bug fix</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>errors.rs</strong><dd><code>Rename `MemoryTableOverflowError` display message</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-bf45932466265b732f13d0cd9b9cffbaefbe37c5861ace9315449eeca9250713">+1/-1</a> </td> </tr> </table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>3 files</summary><table> <tr> <td><strong>result-array-functions.spec.js</strong><dd><code>Add E2E tests for `#ResultArray#` functions in UI</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-e9911625ad2bab76f2b760f0ad254791331993a6a874b96f6a11fc6d88038b10">+470/-0</a> </td> </tr> <tr> <td><strong>cleanup.spec.js</strong><dd><code>Clean up JS function test data in UI tests</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+31/-0</a> </td> </tr> <tr> <td><strong>page-manager.js</strong><dd><code>Register `FunctionsPage` in `PageManager`</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-565eab8b3c767ae50c9d05e591621d14f66b81af84d6b5ea6efe136c1c3933df">+6/-0</a> </td> </tr> </table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>Cargo.toml</strong><dd><code>Add `rquickjs` dependency for JS runtime</code> </dd></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542">+2/-0</a> </td> </tr> </table></details></td></tr><tr><td><strong>Additional files</strong></td><td><details><summary>18 files</summary><table> <tr> <td><strong>test_functions_meta_org_restriction.py</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-99ef1207d6ae6d7eeaed37d70c8cf0c4770ba78f6f51fbdc067d35492d2fe9ea">+401/-0</a> </td> </tr> <tr> <td><strong>test_js_enrichment.py</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-c5547d46bec60b888d947d1e9b7c5445aee72cf8e837182f7138e0fc903eedbb">+356/-0</a> </td> </tr> <tr> <td><strong>test_js_result_array.py</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-9ed1363a1f58c94e018bb2b0aaa9d08fa71f89e7e55a6ff6be4a82bbeed8985c">+390/-0</a> </td> </tr> <tr> <td><strong>functionsPage.js</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-7bab9cc2eb8f36d3ee5d0aab453c353ec6d6dfecbc401cf401322ff57faa8440">+326/-0</a> </td> </tr> <tr> <td><strong>javascript-functions.spec.js</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-bdae6529346a7222bdec19f75f490cb9d0f3578a260ba835225efcd27db3f64e">+314/-0</a> </td> </tr> <tr> <td><strong>meta-org-js-restriction.spec.js</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-16cc2373f6f1955f8344a59d5f2edcd6ce121c4fdee1d432b1f0ec8e27f25881">+483/-0</a> </td> </tr> <tr> <td><strong>FunctionList.vue</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-6ff9af50a1597504b7f0dca91e61cf30c800b4a17b4be2ed2c3a4f7a7b2d7068">+1/-0</a> </td> </tr> <tr> <td><strong>de.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-78f24ecb2dbcfc38fdf3ec22b2559a5b40d236ea689d1c55f5d3e87168310264">+30/-18</a> </td> </tr> <tr> <td><strong>en.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-892aa3d75ab6e129ef9116aa21bec1b9a15ba69ce5366d2a19128078c690d824">+15/-7</a> </td> </tr> <tr> <td><strong>es.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-ac2a2167b8b973e3f776f9fe3b43bef4576470d8ad33f3d7cfaff6edff0e5778">+30/-18</a> </td> </tr> <tr> <td><strong>fr.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-db80e762b88ddf183820c050cdc6b215e6b02b365b5e73f5152af46b0d26f1a2">+30/-18</a> </td> </tr> <tr> <td><strong>it.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-2de78074a5f887afddce60d694ead9322e6ab223eb70251c13819f3028bdc70d">+30/-18</a> </td> </tr> <tr> <td><strong>ja.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-092e49c5f9fbc1b539ab9c2866d108d0ce1d314022b4c294eb4611b285e7bbd3">+30/-18</a> </td> </tr> <tr> <td><strong>ko.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-50e27ca1b4825a5026f3a251bfcf79c97cab07cfade2ebd512d332453d707c48">+30/-18</a> </td> </tr> <tr> <td><strong>nl.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-a1706021687ae5d8a1c006c49eab3946174fecd895f9b70a89c2e76d97250906">+30/-18</a> </td> </tr> <tr> <td><strong>pt.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-38e804f64cb5e0e451849fc84e9b46e53c954a4a4263d51c18665ad45f4b4815">+30/-18</a> </td> </tr> <tr> <td><strong>tr.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-6f0f131e9e2591480c4c5d1eaffc72d02dc31cbd8d3f90d8f012f08cabac8818">+30/-18</a> </td> </tr> <tr> <td><strong>zh.json</strong></td> <td><a href="https://github.com/openobserve/openobserve/pull/9873/files#diff-8818055db58f83230aeea4ebfd4cec31d924e8c47b6f91298e356959ab25339e">+254/-242</a></td> </tr> </table></details></td></tr></tr></tbody></table> </details> ___ --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |