mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
630ecf41f35e3c19a7fec4d00a595f2c3fde89c9
81
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f838d0264f |
test(autoe2e): generated E2E tests for #14181 (alerts-add-alert-org-identifier) (#14182)
Co-authored-by: Shrinath-O2 <214651540+Shrinath-O2@users.noreply.github.com> |
||
|
|
cd0eff459d |
test(autoe2e): generated E2E tests for #14046 (alert-list-frequency-retries) (#14061)
Co-authored-by: Shrinath-O2 <214651540+Shrinath-O2@users.noreply.github.com> |
||
|
|
7d1b648457 | test: deflake visualize-vrl + SLO language-switch tests (batch 3, part 2) (#14142) | ||
|
|
6a41728290 | test: deflake metrics promql-builder tests (batch 3, part 1) (#14141) | ||
|
|
1acaae9a65 | test: dashboard panel time alpha stabilization (#14060) | ||
|
|
b90e61410e |
fix: repair false-success gates and the deterministic Playwright failures they masked (#14025)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
33f0a23f96 | test(dashboards): fix broken and false-green E2E specs on alpha (#13912) | ||
|
|
c3056cc720 |
test(alerts): E2E suite for email destinations and distribution lists (#13876)
Automated coverage for **email alert destinations and distribution lists**, and unblocks the email tests that have been skipped since they were written. **32 cases** — 27 active, 5 skipped regressions tracking open defects (openobserve/o2-enterprise#2471). **The unblocking.** The two skipped tests said *"the test environment does not have email infrastructure set up"*. That over-stated it: creating, editing, validating and deleting an email destination needs SMTP switched **on**, and never reads a mailbox. Only delivery assertions do. The suite is tiered on that: | Tier | Needs | Cases | |---|---|---| | A | SMTP enabled | 24 | | B | a readable sink | 2 | | C | an alias that fans out | 1 | **Tests** - `Alerts/dl-email-destinations.spec.js` (32) — the DL half (alias accepted, addressed, fanned out) and the recipient-list half, where our code actually runs: splitting/trimming/lowercasing, the org-membership gate, edit round-trips, add/remove/delete, both form paradigms (prebuilt free-text vs the custom path's org-user picker), template auto-attach, duplicate names, cancel, type-switching, keyboard, dark mode at 420px. - `utils/mail-sink.js` — pluggable sink: Mailpit, a Mailinator inbox, or a clean skip with a stated reason. - `utils/o2-api.js` — storage is asserted from the API, never the form field: an input can echo what you typed while the stored value differs. - `scripts/dl-relay.js` — SMTP relay that expands one alias into per-member deliveries, so fan-out runs with no external provider. Same pattern as the in-test HTTP receiver in `alerts-content-templates.spec.js`. - `alertDestinationsPage.js` — +17 methods; the spec carries zero raw locators. **Replaces, without losing coverage.** The two skipped tests in `alerts-destinations-prebuilt.spec.js` are removed for a pointer mapping their intent to its new home: create (`D-01`), edit-add (`D-07`), edit-remove (`ML-08`), delete (`UI-12`), format validation (`UI-02`). Three of those did not exist before. That file now has no skips. **CI.** `ZO_SMTP_ENABLED: true` was already set in `playwright.yml` but had no host or port, so it fell back to `localhost:25` where nothing listens — destinations could be **saved** while every **send** failed silently. The workflow now starts Mailpit and a DL relay as static binaries before the app (no Docker-in-Docker on these runners) and points `ZO_SMTP_*` at them. All three tiers run with no secrets and no egress. Verified in the CI topology: **27 passed, 5 skipped**, `D-02` confirmed reaching all three member mailboxes. **Behaviour.** Self-cleaning via the `auto_dest_dl_*` prefix `cleanup.spec.js` already sweeps, plus an API `afterAll`. `mode: 'parallel'` — each test owns its fixtures. **Findings** are filed in openobserve/o2-enterprise#2471, not fixed here. Two P1s: the *"Show matching rows"* toggle is ignored so log rows are always embedded, and a user removed from the org keeps receiving alerts while the destination can no longer be saved. The regression tests for each are in this PR, skipped until the fix lands. **Paired ENT PR: openobserve/o2-enterprise#2472.** ENT's workflow sets `ZO_SMTP_ENABLED: false`, so without it the suite skips all 27 cases there. The shard matrix needs no ENT change — ENT builds it from this repo's `ci_matrix.json` plus its overlay, so the new spec is picked up automatically. Merge the two together: this one alone leaves enterprise with no email coverage. |
||
|
|
99b1a23773 |
test(slo): E2E + API suite for SLOs (#13836)
Adds automated test coverage for **SLOs** (#13547, #13577, #13579, #13704, #13761, #13784), which shipped with none. **149 tests** — 77 Playwright + 72 pytest — all three SLI types, both query languages, happy / negative / edge paths. Clean branch off `main`. **UI (Playwright · `tests/ui-testing`)** - `pages/sloPages/` — 4 page objects (verified `data-test` selectors, hydration + Monaco-sync waits, OSelect commit-retry, virtualized-list filtering). - `playwright-tests/SLO/slo-crud.spec.js` (24) — create count/time-slice/grouped through the form, detail, edit, SLI-type change, tags, pause, delete, filters; negative: dismissed delete, empty search, cancel, unmeasured SLI is absent not zero. - `playwright-tests/SLO/slo-form-validation.spec.js` (20) — server errors surfacing in the form, conditional fields per SLI type, count + time-slice previews, **PromQL count and time-slice created end to end**; negative: no stream, invalid aggregate, over-long name, target boundaries. - `playwright-tests/SLO/slo-alert-sli.spec.js` (8) — **the `alert` SLI type**: source picker, create, config carries only the alert id, detail names the source; negative: ineligible source offered-but-disabled, grouped alert SLI, slice finer than source cadence. - `playwright-tests/SLO/slo-timeslice.spec.js` (10) — **#13761 P0 regression** (measured SLI, not the preview), PromQL, previews, gaps, language-flip clearing. - `playwright-tests/SLO/slo-alerts.spec.js` (15) — burn-rate + error-budget kinds, presets, edit, freeze door, burndown; negative: no destination, cancel, blank/invalid name. - `playwright-tests/utils/slo-seed.js` — backdated seeding, metrics seeding, eligible-source-alert fixture, ground-truth query, fail-fast env guard, transient-store retry, full fixture teardown (alerts → streams → destinations → templates). **API (pytest · `tests/api-testing`)** - `tests/slos/test_slo_validation.py` (72) — full REST surface (create/get/update/enable/delete/groups/slo-eligible), validation on **both create and update** (name, target, window, slice, config shapes, comparators, float-threshold round-trip), boundaries (target 0.001/99.999, name 256 vs 257, threshold 0/negative/1e12/NaN, unicode names), alert-source eligibility (silence-gated, too-infrequent, cron), PromQL config shapes, auth 401/404. **CI** - Two shards: `SLO` (`workers: 3`) and `SLO-Measurement` (`workers: 1`). Split because the backfill job runs with `ZO_SCHEDULER_SLO_BACKFILL_CONCURRENCY=1`, so measurement specs sharing an instance starve each other's waits — `fullyParallel` races spec *files*, which `mode:'serial'` cannot prevent. The 3-worker pin is SQLite: at 5, concurrent SLO/alert/destination writes trip `database is locked` on the single-node meta store. - New optional per-shard `ingest_allowed_upto` (`240`) alongside the existing `quick_mode_enabled`: the workflow default of 5 **hours** silently drops the 8 days of history an SLO window needs, while still answering `200`. Other shards keep the default. Same precedent as `api-testing.yml`'s `48`. **Feature code**: 9 additive `data-test`/`dataTest` attributes in `SloDetail.vue`, `SloList.vue`, `SloAlertCondition.vue` — no logic changes, `vue-tsc` clean. The stat tiles, tabs and burn-window inputs had no stable selectors; `OStatStrip`/`OTab` already forward the attribute. **Behaviour**: self-cleaning (`e2e_slo_*`, worker-scoped since `afterAll` runs per worker). **Verified in CI** on this branch: `e2e / SLO` **52 passed** (1.8m, workers pinned to 3), `e2e / SLO-Measurement` **25 passed** (11.3m, workers pinned to 1) — the measurement shard passing confirms the per-shard `ingest_allowed_upto` took effect, since those tests are impossible under the 5-hour default. pytest **72 passed** locally; in CI's 599-test run one setup delete hit a transient 500 (see findings) and now retries. **Findings for the feature owner** (reported, not fixed here): - A blank "good when" shows `Request failed with status code 422` — `pruned()` drops the empty key, so the API's real 400 message never reaches `save()`. - A rejected alert name shows no banner: `SloAlertForm.submit()` returns on `nameError` before setting `saveError`. - `avg(latency_ms); DROP TABLE users--` is accepted at create time (parsed only at measurement). - The name-length message says "less than 256 characters" but 256 is accepted — 257 is the first rejection. - Duplicate alert names on one SLO are accepted (duplicate SLO names are a 409), and the panel lists them by name, so they are indistinguishable. - SLO names accept characters that break the list's own `slos-slolist-edit-${name}` selectors; alert names correctly reject them. - All chart/preview root `data-test` ids are unreachable — a parent's fallthrough attribute overrides the child root's. - Both edit forms hydrate asynchronously, so a blank form can flash before the stored values appear. - `DELETE /slos/{id}` on a freshly-created SLO returned **500** once under CI load (not reproducible locally in 12 rapid iterations). Contention is arguably a retryable 503, and the body carried no actionable message. - **A scheduled alert whose source stream is deleted is retried forever** (`Stream "…" not found in schema`), and the SLO backfill lane shares the scheduler's worker budget — so accumulated dead alerts *starve SLO measurement*. Observed: 65 of them held coverage at 1 of 7 chunks indefinitely; deleting them restored 0.143 → 1.0 in 240s. Harmless in CI (fresh instance per shard) but it degrades any long-lived environment. The suite now cleans up after itself; the retry-forever behaviour itself may deserve a look. **Paired ENT PR: openobserve/o2-enterprise#2434.** ENT's matrix is this repo's manifest plus an overlay, merged by this repo's `build-ci-matrix.js`, so both SLO shards reach ENT automatically — verified: 31 merged shards, both SLO entries carrying `ingest_allowed_upto=240` and their worker pins, no other shard affected. What ENT was missing is *consuming* those two fields, which #2434 adds. Merge the two together: this one alone leaves ENT booting the SLO shards on the 5-hour ingest window, and #2434 alone is inert. *(An earlier review reported ENT as using an inline matrix with no SLO shard — that turned out not to be the case.)* |
||
|
|
0dba67d638 |
feat: composite alerts (#13797)
Design at : alerts/composite_alerts/composite_alerts.md ## Summary - add composite alert graph persistence, evaluation, scheduling, lifecycle APIs, and deletion safeguards - add composite alert UI forms, preview, references, list/detail integration, and localization - add Rust, API, Vue, and Playwright contracts ## Verification - cargo fmt --all -- --check - cargo check -p openobserve-core - cargo check -p openobserve-api-management - npm run type-check:composite-alerts - npm run type-check:app - npm run lint:ci -- --quiet - design/token/style checks - targeted Rust/Vitest suites - browser QA against local alerts UI ## Follow-ups (intentionally deferred, documented in the spec) - `RunOutcome::Error`/`NotifyFailed` outcome records on composite delivery failure (§11.5) - Incident detail live-definition resolver for composites + "definition unavailable" retention (§9.6) - `alert_composite_*` observability metrics (§16) - SLO/stream delete-conflict 409 bodies with readable-vs-hidden parent split (§10.3) - Super-cluster startup preflight (§18) <img width="1650" height="979" alt="image" src="https://github.com/user-attachments/assets/3def5246-7bf7-48fe-9a42-c0ac08271ea9" /> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
673bedb468 |
test(alerts): migrate multi-alert API specs from Playwright to pytest (Phase 2) (#13791)
## What **Phase 2** of the Playwright→pytest API-test migration (Phase 1 = Correlation, #13788 / o2-enterprise#2419). Ports the 4 **pure-API** Alerts 4.0 (multi-alert) specs into pytest and deletes the Playwright versions — they launched a browser only to assert the raw API. ## Changes — `tests/api-testing/tests/alerts/` | File | Ported from | |---|---| | `multialert_helpers.py` | `utils/alerts-api-helpers.js` (v1/v2 endpoints, canonical payloads, seed fixtures, ingest, scheduler-outcome polling) | | `conftest.py` | `alerts` fixture — seeds template + destination + stream, auto-cleans created alerts | | `test_multialert_api.py` | `alerts-multialert-api.spec.js` — 8 tests (save-time guardrails, round-trip type contract, B1 group-endpoint RBAC guard, tag/priority facets) | | `test_multialert_regression.py` | `alerts-multialert-regression.spec.js` — 4 tests (zero-behaviour-change guards) | | `test_multialert_firing.py` | `alerts-multialert-firing.spec.js` — 4 tests (fires at critical/warning, per-group fan-out, simple rollup) | | `test_multialert_transitions.py` | `alerts-multialert-transitions.spec.js` — 1 test (Ok→Warning→Critical history) | **17 tests, 1:1 port.** Deletes the 4 API specs and trims them from `ci_matrix.json`'s Alerts `run_files`. Keeps `alerts-multialert-ui.spec.js` (UI) and `alerts-api-helpers.js` (still used by the UI + priority-tags specs). ## No workflow change needed Unlike the Correlation pilot (which needed a dedicated server env), the main `api_integration_tests` job **already** runs `tests/alerts/`, and its server env **already** sets `ZO_ALERT_SCHEDULE_INTERVAL: 3` — the exact scheduler cadence the firing/transitions tests need. So these tests are picked up automatically with no CI edits. ## Verified locally Full suite against a fresh single-node enterprise build: **17/17 passed** (~52s), including the timing-dependent firing (critical/warning/per-group/rollup) and level-transition history tests. |
||
|
|
a28dcda276 |
test(correlation): standardize e2e suite onto framework harness (phase 0 — reference pattern) (#13775)
## What & why
Begins consolidating the **correlation (service-streams) e2e suite**
onto the standard `tests/ui-testing` framework. Today those specs live
in a self-contained parallel harness (own configs, own auth, own `O2_*`
env vars, per-test orgs with no teardown, non-standard names) and are
**not registered in any CI matrix** — so they never run automatically.
This is **Phase 0**: land the shared standard-shaped API helper and
convert the first spec as the **reference pattern** for review, before
batch-converting the rest.
## Changes
- **`utils/correlation-api-helpers.js`** (new) — single source of truth
for correlation API plumbing. Auth via `authedRequest`/`getAuthHeaders`
(framework session + 401/403 self-heal), per-test **fresh-org create +
teardown**. No `test`/`expect`.
- **`Correlation/correlation-discovery.spec.js`** (new) — converted from
`journeyA`: `enhanced-baseFixtures`, `@correlation`/`@P0` tags,
Copyright + JSDoc header, `testLogger.testStart`, standard `ZO_*` env
and naming. Assertions ported **1:1** (DISC-01/02/03).
- Remove `Correlation/journeyA-discovery.api.spec.js` (superseded).
## Deliberate deviation (documented)
Correlation discovery / identity config / `_reset` are **org-global and
destructive**, so each test provisions a **fresh org** and tears it down
in `afterEach`. This keeps the isolation the feature genuinely needs
while fixing the real defect in the old suite: **orgs were created but
never deleted** (leak).
## Validation
- `node --check` clean; requires resolve.
- Collects cleanly under `playwright.config.js` (`--list` → 3 tests,
tagged).
- ⚠️ **Green run pending an enterprise env** (service_streams 403s on
OSS). Not wired into CI yet, so `main` stays green. **Draft** until
validated.
## Follow-ups (later phases)
Batch-convert remaining 4 API + 3 UI specs · revive
`correlationSettings.spec.js` against the new UI · register a dedicated
**Correlation** shard in the ENT `ci_matrix.ent.json` · delete
`corr-*.config.js`.
|
||
|
|
735dc7d58d |
feat(traces): restore in-page Service Graph / Service Catalog tabs alongside standalone routes (#13698)
## What #13659 converted Service Graph and Services Catalog from in-page tabs on the Traces page into standalone routes reached from the nav-rail flyout. This PR restores the in-page tabs as a **second access path** — both now coexist, with distinct semantics: | Path | Semantics | |---|---| | Toolbar tabs on `/traces` | In-page view switch (`?tab=service-graph` / `?tab=services-catalog`), shares the page's stream + time context — the pre-#13659 UX, including old `?tab=` bookmarks | | Nav-rail flyout | Navigates to the standalone routes `/traces/service-graph`, `/traces/services` — unchanged from #13659 | Both paths render the same inner components (`ServiceGraph.vue`, `ServicesCatalog.vue`); only toolbar chrome differs. ## How A guided **reverse-apply of #13659's diff to `Index.vue` + `SearchBar.vue` only** (verified byte-identical to the pre-PR files — both were untouched on main since), with four deliberate adaptations: - **Re-added `applyHandoffFilter`** + its two hook call sites, which the revert would have deleted — the standalone pages' "View Traces" handoff (`?filter=` landing) depends on it. Covered by a new unit regression test and verified live. - The restored in-page `view-traces` handlers call `viewTracesHandoff.ts` (`buildViewTracesFilter` / `normalizeViewTracesPayload`) instead of resurrecting the inline filter builders that #13659 extracted from them — no re-duplication. - **Fixed a latent pre-#13659 bug**: the graph tab's refresh button called `serviceGraphRef?.loadServiceGraph()`, which was never in `ServiceGraph.vue`'s `expose()` — now `refresh()`. - **Flyout highlight now follows the visible view** on both paths: new `SubnavChild.activeOnTab` alias marks the Service Graph / Service Catalog flyout items active when `/traces?tab=…` shows their view in-page. Previously the same view highlighted different flyout items depending on how you reached it — the only submenu that deviated. Also: - Renamed the "Services" submenu / page header / route title to **"Service Catalog"**, matching the toolbar tab label (single `menu.services` locale value covers all). - `global-setup.js` login verification moved to `navbar-main-nav` — the same stale-selector fix #13659 applied to `enhanced-baseFixtures.js`; suites fail setup on main without it. ## Tests | Suite | Result | |---|---| | Unit: `SearchBar` 69, `Index` 76, `ONavGroup` 18 (5 new `activeOnTab` cases), `viewTracesHandoff` 21, `navGroups` 28 | all pass (233 total, 2 pre-existing skips) | | E2E (new) `Traces/traces-toolbar-tabs.spec.js` — in-page tab switches, shared-datetime carry, `?tab=` bookmark reload, flyout→standalone-route coexistence | 4/4 vs live enterprise build | | E2E `Traces/service-catalog.spec.js` (standalone-route regression) | 18 pass | | `type-check`, `eslint` (0 errors), `prettier`, `lint:design:strict` | clean | Not run: `Traces/service-graph.spec.js` — its `beforeAll` ingests via `ZO_BASE_URL`, which requires a single-origin instance (CI); the dev vite+backend split can't satisfy it. Nothing in this PR touches `ServiceGraph.vue` or the standalone views. ## Notes for review - `Index.vue` / `SearchBar.vue` restored regions are intentionally verbatim pre-#13659 (including its 16 pre-existing lint *warnings*) — deviations are limited to the four adaptations above, so the diff-vs-pre-PR is auditable. - Two known-inert quirks restored deliberately, not bugs to fix here: `hide-splitter-separator` has no CSS rule (was a no-op pre-#13659 too), and `@update:activeTab` writes to a getter-only computed. --------- Co-authored-by: Shrinath Rao <shnath@openobserve.ai> |
||
|
|
32d02d6781 |
chore(traces): make Service Graph and Services their own routes (#13659)
## What Service Graph and Services Catalog were tabs on the Traces page, switched via a `?tab=` query param on a single keep-alive route. They are now real routes, reached from a hover flyout on the Traces rail tile: | Route | Notes | |---|---| | `/traces` | Traces search — keeps the **Spans / Traces** toggle | | `/traces/service-graph` | enterprise-gated; redirects to Traces on OSS | | `/traces/services` | | **Spans stays an in-page toggle** on purpose. It's a view *granularity* that shares the query, stream and time range — you switch to it mid-investigation and expect context to carry over. Datadog's Trace Explorer does the same. Service Graph and Services are destinations; Datadog, New Relic and Grafana all treat them that way. ## Why this wasn't just cosmetic As tabs, all three views shared one `meta.title`, one history entry, and the traces page's `searchObj`. That last part is why Service Graph and Services Catalog inherited the traces page's selected stream — the coupling this PR removes structurally. ## UI Both pages now use the Agent Graph header pattern (`OPageLayout` + title/subtitle/icon, date picker and last-run refresh in `#actions`), with a subnav row carrying stream selector + search on the left and view-type + layout on the right. ## Handoff `view-traces` no longer mutates the shared store from a sibling tab. Both views build the same filter string — extracted verbatim into `viewTracesHandoff.ts` — and navigate to Traces with it as query params, so the URL survives a reload. (Traces then canonicalises `filter=` to its own base64 `query=` via existing code in `useTraces.ts:290`.) ## Two bugs this surfaced Both were things the tab views inherited for free and now have to set themselves — and both would have hit real users deep-linking these pages: - **`organizationIdentifier`** was only assigned inside the Traces page's `loadPageData()`. Without it the catalog issued requests to `/api//_search_stream` (empty org segment) and rendered nothing. - **`?period=` / `?from=`+`?to=`** were only applied by the Traces page's `restoreUrlQueryParams()`. Without it a shared link carrying a time range silently opened on the 15-minute default. ## Tests | Suite | Result | |---|---| | `Traces/service-graph.spec.js` | 14 / 14 | | `Traces/service-catalog.spec.js` | 10 / 10 | | `RegressionSet/Traces/traces-ent.spec.js` | 1 / 1 | | Unit (`Navbar` + `plugins/traces`) | 2514 pass | Also clean: `type-check`, `eslint` (0 errors), `lint:design:strict`. Test-side changes: navigation POMs go through the rail flyout instead of the removed toggles; the graph POM pins an explicit window, since on its own route the graph no longer inherits the traces page's range. The shared auth fixture now verifies against `navbar-main-nav` — it keyed off `menu-link-/-item`, which the current rail no longer renders, so suites failed setup even after a successful login. Filter-building coverage moved with the code into `viewTracesHandoff.spec.ts` (21 tests) rather than being deleted alongside the component tests that asserted the old in-page handlers. ## Known / follow-up - `RegressionSet/Traces/traces-regression.spec.js` has 2 failures (trace column sorting, pagination). **Pre-existing** — they fail identically against production on `main`, and the Service Catalog test in that file passes. - Both views still default their stream picker to the traces page's selected stream. Defaulting Service Graph and Services to **all streams** is a deliberate follow-up: on our own instance the `default` stream shows 22 topology nodes vs 71 across all streams, and services like `o2-ai` span 4 streams. Graph is a one-line change (the API already supports it); the catalog needs a backend decision, so it's out of scope here. |
||
|
|
a384dd5ddd |
test(e2e/alpha1): robustness — auth self-heal + service-graph wide window (#13622)
## Alpha1 e2e robustness — self-healing auth + service-graph window Builds on **#13621** (re-auth self-heal). Both branches share the slug `test/alpha1-e2e-robustness` is stacked on `test/alpha1-reauth-on-401`; review/merge #13621 first (or merge this, which contains it). Root-caused against alpha1 runs 30892800970 / 30900015839 / 30902942856 (each investigated live via Playwright MCP). ### 1. Auth self-heal (from #13621, included here) Shared cloud session + per-org passcode are minted once and reused all run; on long runs / org-contention they expire mid-run → `User not authenticated` (UI) and `HTTP 401 Unauthorized` (API). Now: `authedRequest` refreshes the passcode and retries on 401; `navigateToBase` re-authenticates and resumes instead of throwing. **Verified working** in run 30902942856 — the auth storm cleared (Metrics/SDR/Streams recovered, zero `User not authenticated`), and `[auth] Refreshed cloud passcode after 401` fired and recovered mid-run. ### 2. Service graph queries a wide window All 9 `service-graph.spec.js` chart tests failed with `service-graph-chart` "element(s) not found" **despite** `beforeAll` confirming topology via API (25 nodes). **Reproduced live**: the service-graph tab defaults to **Past 15 Minutes** and shows *"No service graph data / 0 entities"* (no chart element) when the daemon-processed topology sits outside that window. The tab **honours the `period` URL param** (verified: label → "Past 6 Hours"). → `navigateToServiceGraphUrl` now navigates with `period=6h`; added `navigateToServiceGraphAndWaitForChart()` (poll + refresh, tolerates daemon lag). Non-masking. ### Honest scope - **Not included (can't validate locally / not test-code):** - **Pipelines ×5** (`Explore`/`update-pipeline` 45s timeout) — persistent across *every* run; pipeline/stream data unavailable. Env/data, needs CI-side repro. - **OTLP metrics ingestion 401** (a PromQL-prereq `beforeAll`) — a node-`fetch` ingest path with no page context to re-fetch the passcode; narrow, needs a small refactor to self-heal. - Singles: `logoManagement` (@enterprise `_meta`), `shareLink` (known race), `alerts-ui-operations:131` (#9484) — pre-existing flaky/env. - Service-graph is **enterprise/feature-gated** (403 in my org), so its fix is evidence-reasoned + validated at the URL-param level, but final proof is the seeded CI run. |
||
|
|
49448334ed |
test(alpha1): split shard logins across multiple Dex users (#13602)
## What Lets alpha1 shards log in as **different Dex users** instead of all hammering the cloud env as one user. Paired with **openobserve/o2-enterprise#2333** (the workflow wiring). ## Why - **Load distribution** — spreads API/session load across users if the env rate-limits per user. - **Blast radius** — one user's account/session issue stops ~1/3 of shards, not all. - Test **data isolation is unchanged** (still per-org); this is purely about the login user. ## Changes (OSS) - `global-setup-alpha1.js` — new `ALPHA1_USER_INDEX` (1|2|3) selects the Dex user: email resolves from `ALPHA1_USER_EMAIL_<N>`, **falling back to `ALPHA1_USER_EMAIL`** when the indexed secret isn't set (safe incremental rollout). Password shared (`ALPHA1_USER_PASSWORD`). - Auth **filenames stay canonical** (`user.json` / `cloud-config.json`) — ~20 specs + shared utils read those exact paths. The per-user split happens at the CI layer (each shard downloads only its user's artifact into the canonical path), so no spec changes needed. - New `auth-warm.spec.js` — a login-only spec the barrier uses to mint auth artifacts for users 2..N **without** running the heavy org-wide cleanup. ## Default behaviour With no index set, everything resolves to user 1 — identical to today. ## Enterprise PR openobserve/o2-enterprise#2333 |
||
|
|
4772df1723 |
feat: per-group and per-series alerting, and SLO measurement (#13547)
Design at: alerts_2.md Per-group and per-series alerting, SLO measurement, and the UI for both. ## Alerts **Multi-alerts (Feature 3).** A grouped alert can opt in to evaluating and paging **per group** rather than collapsing to one verdict. Opt-in only (`multi_alert`), so no existing alert changes behaviour: the flag cannot be present in JSON written before it existed. Per-group state, transitions, silence fingerprints, disappearance/reaping and a cardinality cap, with the count-gate rules that make "most severe group" and the legacy collapsed level provably the same verdict. **Per-series alerting for PromQL.** The same feature for the metrics family, where a group is one returned **series** keyed by its full label set — that is a series' identity in Prometheus, and the expression's own `by (…)` clause is already where the label set is chosen, so a second picker could only disagree with it. One additive nullable column; NULL means off, so stored alerts are untouched. **Alert detail page**, replacing the row-click side panel: stat strip, evaluation chart with threshold marklines, per-group table and history. Simple alerts get a real history too — evaluations (one record per run) by default, level changes alongside. ## SLOs Count / time-slice / alert SLIs, error-budget and burn-rate arithmetic, rolling windows, per-group slices with an exact rollup, coverage gating, backfill, and SLO-based alerts. Two capabilities the model could not express, both added tests-first: - **Metrics-native counting** (`CountSource::PromQl`) — counter metrics have no rows for a predicate to classify, so "good" exists only as arithmetic between series, and correct counter arithmetic is `increase()`. - **Freshness semantics** (`absent_is_bad`) — for a pipeline SLO, silence IS the failure, which the default gap rule can never report. A *failed* query still freezes rather than pages; only a query that PROVED emptiness counts as bad. **SLO form**: live good/bad preview so a wrong predicate is caught before saving rather than days later, real query editors with field autocomplete, folders shared with alerts, and a move endpoint. ## Notes for review - The SLO and composite features are **deferred (TODO)**: `ZO_SLO_ENABLED` stays default **false** and the SLOs menu entry is hidden until they ship; the SLO backend and UI remain in the tree behind the flag, and composites stay pure logic + tests. - One migration (schema 61): a nullable column for the PromQL opt-in. No backfill. - Two fixes outside the feature that it surfaced: query-editor completions were duplicated per mounted editor (Monaco registers providers per *language*), and the alert detail chart had no PromQL branch, so it charted row counts against the series-count gate. - Lands together with the matching o2-enterprise PR — `QueryType::Slo` is new here and the enterprise dedup matches are exhaustive over it. - `ratelimit::test_add_batch_missing_rule_id` fails intermittently on `main` as well; unrelated to this branch. --------- Co-authored-by: Shrinath Rao <shnath@openobserve.ai> Co-authored-by: hengfeiyang <hengfei.yang@gmail.com> Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai> |
||
|
|
c49d156e7e |
test(alpha1): multi-org sharding for the alpha1 e2e run (#13530)
Companion OSS change to enterprise 2278 (alpha1 workflow). Same branch slug on both repos. ## What Supports running the Alpha1 (cloud) e2e matrix with its shards **divided across multiple orgs** for data isolation, on top of the shared-auth login (one Dex login, reused by all shards). Both changes are in \`global-setup-alpha1.js\`. ## Changes 1. **Ingest into the shard's own org (\`ORGNAME\`)** instead of the org baked into \`cloud-config.json\`. The shared-auth barrier logs into one org; without this, every shard ingested into that one org even when \`ORGNAME\` differed. 2. **Re-fetch the shard's own org passcode in the shared-auth path.** Each org has its own \`o2oi_\` default ingestion token (see \`core/organization.rs\` \`get_passcode\`). The barrier captured only its org's token, so shards on other orgs got \`401 Unauthorized Access\` on ingest. \`verifySharedAuth\` now calls \`fetchCloudConfig(page)\` to overwrite \`cloud-config.json\` with the current shard's passcode (fetched via the session, which is a member of every org). Keeps the single shared login — no login storm — while giving each shard the correct per-org credential. ## Context Part of the alpha1 parallelization effort: - Shared-auth artifact removes the 13-way concurrent Dex login storm (enterprise 2278). - Shards divided across 6 orgs (enterprise 2278 matrix) for data isolation. - These two OSS fixes make per-org ingestion actually work. ## Testing Validated by dispatching the enterprise \`playwright_alpha1.yml\` with \`o2_opensource_repo=test/alpha1-parallel-shards\`. Verifying each shard now ingests \`e2e_automate\` into its own org with \`status:200\` (previously \`401\` for non-barrier orgs). |
||
|
|
184268ff1b |
test(ci): loud stdout banner when Playwright retries a test (#13529)
## What Adds a small **log-only** Playwright reporter that prints a LOUD, unmissable banner to stdout **the moment any test starts a retry attempt**, plus an end-of-shard summary listing every test that was retried. ## Why In CI the reporter is `blob`, which writes nothing to stdout. So when a failed test is retried (`retries: process.env.CI ? 3 : 0` in `playwright.config.js`) there is **no signal in the GitHub Actions logs that a retry is even happening** — a test silently re-runs up to 3 more times and the log just shows the next `Test Started` line. This makes flaky-vs-real failures hard to spot when scanning CI output. The retry is internal to `npx playwright test`, so the workflow YAML can't see it — it has to be emitted from the Playwright reporter layer. This is that layer. ## What it looks like ``` 🔁🔁🔁══════════════════════════════════════════════════════════🔁🔁🔁 🔁 R E T R Y # 1 · attempt 2 of 4 (test previously failed — re-running) 🔁 ▶ chromium › logsqueries.cte.spec.js › should query with simple TotalCols CTE 🔁 ▶ Logs/logsqueries.cte.spec.js 🔁🔁🔁══════════════════════════════════════════════════════════🔁🔁🔁 ``` …and once per shard at the end: ``` 🔁 RETRY SUMMARY — N test(s) were retried in this shard: 🔁 • [2 retries] chromium › … › should query … (Logs/logsqueries.cte.spec.js) ``` ## Scope / safety - Added to the **CI** reporter list only, alongside `blob` (multiple reporters are fine). It only `console.log`s — never sends anything, never fails the run. - **ENT gets this for free**: the ENT Playwright workflow checks out and runs the OSS `tests/ui-testing` tree, so this one OSS change makes retries loud in both OSS and ENT CI. There is no ENT test tree to change. - Verified locally with a forced-failure probe (`CI=true`, `retries: 2`): the per-retry banner fires on attempt 2 and 3, and the summary lists the retried test. ## Files - `tests/ui-testing/playwright-tests/utils/retry-banner-reporter.js` — new reporter - `tests/ui-testing/playwright.config.js` — wire it into the CI reporter array |
||
|
|
ba57f76e9d |
test(e2e): stabilize alpha1 Traces & Pipelines shards (error-toggle data seeding + flyout-nav / loading-button / indexing races) (#13246)
## 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> |
||
|
|
3906bdc296 |
test: stabilize alpha1 Alerts shard on cloud (fix auto_playwright_stream being-deleted race + concurrency hardening) (#13209)
## What
Stabilizes the **Alerts** shard of the alpha1 cloud E2E suite to green,
running **fully
parallel** (`workers:3`, `fullyParallel:true`) — no serialization.
Test-infra +
page-object changes only; **no product code**. The one product-side
defect surfaced (the
prebuilt destination form unmounts its fields on template auto-load) is
worked around in
the test layer and written up separately for a frontend fix.
## Approach change since the first revision
The first version serialized the contended tests (`@serialAlpha1` + a
dedicated
`chromium-serial` project). Per review feedback ("solve it in
parallel"), that was
**removed** — the shard now runs **fully parallel**, and the flakiness
is fixed at the
source (fixture / registration / render races) instead of by
serializing.
## Root causes & fixes
### Streams / fixtures
- **`auto_playwright_stream` "being deleted" race** — the 3
`alerts-ui-operations` tests
now use the shared, always-protected **`e2e_automate`** stream
(pre-ingested by
global-setup, never deleted by cleanup), eliminating the shared
fixed-name delete race
entirely. `cleanup.spec.js` no longer deletes `auto_playwright_stream`;
`commonActions.ingestTestData` checks `response.ok()`, retries the "is
being deleted"
race, and polls the streams API until the stream is registered before
the wizard opens.
### Alert wizard
- **Dedup alert blocked at save** —
`createScheduledAlertWithDeduplication` typed its SQL
into the Monaco editor without clearing the default `SELECT * FROM
"<stream>"`, producing
malformed SQL → "Please fix the SQL error before saving." Now clears the
editor first.
- **Stream-select ordering + registration poll** — drive the stream
dropdown only after its
list fetch resolves; poll registration; page-reload recovery when the
cached list is stale.
### Prebuilt destinations (the deep one)
- **App defect:** on a *reused* form (2nd+ destination), selecting a
prebuilt type
intermittently **unmounts the credential/name fields ~0.5 s later**
(template auto-load
re-render) and they stay gone. Confirmed via DOM timeline (`count:0` for
25 s+). Since a
wait can't recover an unmounted element, `selectDestinationType` clicks
the card once,
waits for the template network to settle, confirms the fields are
**stable** (not just
present), and — if they unmount — **remounts the form** (cancel+reopen →
full page reload)
and re-selects. Written up separately for a frontend fix.
- **List verifications raced the OTable loading skeleton** —
`expectDestinationInList` / `verifyDestinationExists` /
`verifyAlertCreated` now wait for
`o2-table-skeleton-body` to clear and poll the **list** endpoint the UI
actually reads
(not just the single-GET) before asserting the row.
### Form-validation specs
- `alerts-form-validation` + `anomaly-detection-form-validation` flipped
serial→parallel and
made self-sufficient: `beforeAll` seeds a worker-scoped
template+destination via API (the
"Add Alert" button is hard-disabled with zero destinations), `afterAll`
removes them,
cleanup patterns registered.
### Misc
- Cloud-correct (https) ingestion agent; alert search-input +
`updateAlert` edit-form wait
hardening for shared-org load.
## Cloud environment gates (legitimate — not coverage drops)
`test.skip(isCloudEnvironment())` (dedup validation), `if
(!isCloudEnvironment())` (import
trigger round-trip), and external destination URLs — all because cloud's
**SSRF guard**
blocks self-referencing destinations by design. All still run fully on
OSS/self-hosted.
## Scope / safety
- 15 files: Alerts page-objects, alpha1 config + global-setup, Alerts
specs, cleanup. **No product code.**
- **No tests deleted, no `.only`, no unconditional skips, no assertions
removed.**
- The temporary Alerts-only playwright matrix (added for faster
iteration) has been
**reverted** — the full OSS e2e matrix is restored.
## Validation
- Prebuilt P1 validated locally on cloud alpha (repeated clean passes;
every field-unmount
recovered by the remount).
- alpha1 Alerts CI:
https://github.com/openobserve/o2-enterprise/actions/runs/29391293698
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
|
||
|
|
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> |
||
|
|
39c1d8ae83 |
test: reduce Logs-Builder-Basic e2e runtime by removing dead waits and duplicate setup (#13080)
## Reduce `Logs-Builder-Basic` e2e shard runtime — ~10 min → ~5 min
### 🎯 Result (measured on CI)
| Metric | Before | After | Saved |
|--------|--------|-------|-------|
| **`Logs-Builder-Basic` shard** | **10m 05s** | **5m 12s** | **~4m 53s
(≈48% faster)** |
The shard runtime is cut roughly in half. Most of the old time was fixed
sleeps, waits that always ran their full timeout, and duplicated
per-test setup — not actual test logic. **No test cases, steps, or
assertions were removed.**
### What we changed
| # | Area | Before | After | Saving |
|---|------|--------|-------|--------|
| 1 | `initQueryBuilderTest` setup | Logs page loaded twice (helper
`goto` + `selectStream` navigates again) | Navigate once | 1 page load ×
~41 tests |
| 2 | `waitForBuildTabLoaded` | Always waited up to 10s for editor to
fill, even when it's meant to be empty | Skip when SQL mode is off |
~10s dead wait on many tests |
| 3 | `enableSqlModeIfNeeded` | 2s watcher wait + 500ms sleep, even
where the watcher never fires | Gated to Build tab; waits on real signal
| ~2.5s × ~35 tests |
| 4 | `disableSqlModeIfNeeded` | Fixed 500–600ms sleeps | Deterministic
wait on editor update | Blind sleeps removed |
| 5 | `applyQueryButton` | Clicked Run blindly | Waits for button ready
first | Fewer early-click retries |
| 6 | `pagination.spec` | Fresh stream ingest + index-wait per test (9×)
| One ingest per worker, reused | 8 redundant ingests + waits |
| 7 | `pagination.spec` | Dead `waitForTimeout(2000)` per streaming test
| Removed | ~2s × 5 tests |
| 8 | `unflattened.spec` | Search run twice with 3s + 1s sleeps | Single
run | ~5s × ~8 calls |
| 9 | `unflattened` row scan | Fixed 3s sleep per row | Wait for content
to render | 15-row scan: ~97s → seconds |
| 10 | `unflattened.spec` | Blind sleep after ingest | Poll until stream
queryable | No over-waiting |
### Bonus
Items 2–5 live in the shared `logsPage` page object, so
`Logs-Builder-Advanced`, `Logs-Core`, and `Logs-Features` shards get
faster for free too.
### Notes
| Item | Detail |
|------|--------|
| `playwright.yml` | Unchanged — shard layout stays as-is |
| Assertions | Preserved everywhere (e.g. pagination still checks the
same record counts) |
| Validation | All 52 tests still discovered by `playwright --list`;
shard confirmed green on CI at 5m 12s |
|
||
|
|
2a3416ee35 |
fix: Rum automation (#13064)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
cd634bae43 |
test: heal flaky logs field-values-cache regression test (readiness gate) (#12956)
## What Heals the flaky **\`should fetch fresh field values when switching streams\`** (`@fieldValuesCache @P1 @regression`) test in `RegressionSet/Logs/logs-bugs.spec.js`, which failed the `Logs-Regression` job in [o2-enterprise run 28454057830](https://github.com/openobserve/o2-enterprise/actions/runs/28454057830/job/84328391696). ## Root cause The test ingests a unique `service_name=svc-automate-<runId>` into the **shared** `e2e_automate` stream, then immediately drives the UI field-values panel — with **no readiness gate** confirming that value is searchable yet. Freshly-ingested data isn't queryable instantly (WAL → index lag), so the `_values` call returns `svc-automate-*` values from earlier runs/retries but misses the just-ingested one: ``` Error: Expected stream1 values to contain svc-automate-1782832273253, got: svc-automate-17828322504262 ``` Playwright retries amplify it — each retry adds another `svc-automate` value to the shared stream while still missing the current run's value, so all retries fail. > Note: the CI job's attempt-2 then crashed on a `jq: Cannot iterate over null` error in the rerun-detection step. That is a **separate, already-fixed** issue — current `main` already has `actions: read` on the job + jq guards; the failing run executed a stale pre-fix workflow snapshot (GitHub re-runs reuse the original attempt's YAML). No workflow change is needed here. ## Fix - Add `waitForFieldValueSearchable()` to `utils/data-ingestion.js` — polls `_search` until the exact field value is returned (the proven readiness-gate pattern, value-level rather than row-count level). - Gate both the stream1 and stream2 ingested values before the UI assertions. ## Verification Run locally against a local OpenObserve with `--repeat-each=3`: ``` Stream1 field values: ["svc-automate-...0702","svc-automate-...4762"] # accumulates (reproduces CI pollution) ✓ Stream1 shows correct value: svc-automate-1782833946762 # current value always present now ... 3 passed (1.0m) ``` The accumulating `svc-automate-*` values across repeats reproduce exactly the shared-stream pollution seen in CI, and the gate ensures the current run's value is always present. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
b9846cf42e |
test: add metrics alert notification E2E test with self-contained ingestion (#12672)
## Summary
- Adds `alerts-metrics-notification.spec.js` — a 3-test UI suite
verifying the full metrics alert chain
- Test 1 (P1): PromQL alert triggers via scheduler, verified in history
UI — self-contained using `ensureMetricsIngested()`
- Test 2 (P2): Template body contains required alert variables
(`{alert_url}`, `{alert_name}`, `{stream_name}`)
- Test 3 (P1): Manual trigger from alert list more-options menu sends
notification
- Includes `alert-metrics-notification-findings.md` documenting manual
testing results (API schema, PromQL vs SQL, trigger indicators)
## Test plan
- [ ] Test 1: Alert triggers on freshly ingested `cpu_usage` metrics and
history rows appear in UI
- [ ] Test 2: Template editor (Monaco) shows expected variables
- [ ] Test 3: Manual trigger menu option calls PATCH /trigger and
succeeds
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|
|
a749599898 |
fix: update e2e selectors for O2 component migration (#12346)
Replace Quasar-based selectors with O2 component equivalents across
alerts, dashboard, logs, and streams page objects. Key changes:
- OSwitch: target -btn suffix on inner button
- OSelect: use -trigger/-popover/-option suffixes, fallback to
[role="option"][data-test-value] when parent has no data-test
- OCombobox: use placeholder-based locators where no data-test exists
- OInput: descendant input selectors, pagination text format handling
- OTable: custom bottom slot pagination format ("N Stream(s)")
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: ktx-akshay <akshay.patil@kiara.tech>
|
||
|
|
98d1d1c378 |
test: fix Chromium CI stability and disable ENT-only tests (runner resize, timeouts, cache, no-sandbox) (#12330)
## Summary - **`--no-sandbox` / `--disable-setuid-sandbox`** added to `chromium.launch()` in `globalSetup.js` and `launchOptions` in `playwright.config.js` (CI-only) — prevents silent Chromium hangs on restricted runner environments - **`globalTimeout: 110 min`** added to `playwright.config.js` — caps the entire suite at 110 min (10 min under the job timeout) so hung runs fail with a clear Playwright error instead of a silent CI kill - **`restore-keys` fallback** added to the browser cache step — a `package-lock.json` change no longer forces a full 163 MB re-download on every shard simultaneously - **Runner right-sizing**: `ui_integration_tests` → `repo-openobserve-standard-16`; `merge_and_upload_reports` + `playwright_summary` → `repo-openobserve-standard-4` ## Test plan - [ ] Confirm `ui_integration_tests` shards start without Chromium launch hangs - [ ] Confirm cache hit on second run (restore-keys fallback working) - [ ] Confirm `merge_and_upload_reports` and `playwright_summary` succeed on 4 GB runners 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
|
+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> |
||
|
|
916cc79c5c |
fix: restore search priming in QB lite init, fix SQL OFF filter parsing (#11823)
## Summary - Restores `applyQueryButton` call in `initQueryBuilderTestLite` — the initial match_all search serves as a UI priming step that ensures the auto-search from stream selection has completed before the test runs its own query - Adds `runQueryAndWaitForResults` before `clickBuildToggle` in SQL OFF mode tests — matching the flow in `setupQueryAndSwitchToBuild` so the builder has query results to parse into filters ## Root Cause PR #11797 moved ingestion from `beforeEach` to `beforeAll` and introduced `initQueryBuilderTestLite` which skipped the initial match_all search. Two issues emerged: 1. **No UI priming**: After `selectStream`, an auto-search fires automatically. Without waiting for it to complete, the test's own query could run while the UI was in an intermediate state, causing the builder to parse zero filter conditions. 2. **SQL OFF tests skipped query execution**: These tests set search bar content and clicked build toggle without running the query first. The builder had no executed query results to parse into filters. ## Changes | File | Change | |------|--------| | `queryBuilder-helpers.js` | Add `applyQueryButton(pm)` to `initQueryBuilderTestLite` (same as full init) | | `logsQueryBuilder-filters-advanced.spec.js` | Add `runQueryAndWaitForResults()` before `clickBuildToggle()` in 2 SQL OFF tests | ## Test Results - Local (5 workers, 77 tests): **74 passed**, 3 pre-existing intermittent failures (CTE chart type, auto-mode chart type, NOT LIKE filter parsing) - The 8 CI flaky tests from #11797 are all in the passing set ## Test plan - [ ] CI: Logs-Builder-Basic and Logs-Builder-Advanced shards pass with 0 flaky tests - [ ] All 77 QB tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> |
||
|
|
4211cf37cf |
test: move QB ingestion to beforeAll, skip redundant initial queries (#11797)
## Summary - Moves `ingestTestData` from `beforeEach` to `beforeAll` across all QB describe blocks (one ingestion per describe instead of per test) - For describe blocks where ALL tests call `setupQueryAndSwitchToBuild` (run their own query), uses a lite `beforeEach` that skips the initial `match_all` `/_search` call - Adds `ingestForQueryBuilderTest` helper that works with Playwright's `request` fixture (no page needed in `beforeAll`) - Adds `initQueryBuilderTestLite` helper for describe blocks that don't need the initial query **Impact:** ~74 fewer redundant ingestions and ~41 fewer redundant `/_search` calls per shard run. Estimated reduction: Logs-Builder from ~19 min to ~10-12 min. ## Files changed | File | Change | |------|--------| | `queryBuilder-helpers.js` | Add `ingestForQueryBuilderTest` + `initQueryBuilderTestLite`, remove ingestion from `initQueryBuilderTest` | | `logsQueryBuilder-filters.spec.js` | Split SQL OFF tests into separate describe, add `beforeAll`, use lite init for main block | | `logsQueryBuilder-chart.spec.js` | Add `beforeAll` to 5 describe blocks, use lite init for Chart Type + Chart Auto-Selection blocks | | `logsQueryBuilder-editor.spec.js` | Add `beforeAll` to 7 describe blocks, use lite init for Bare Field Select + FieldList visibility blocks | ## Test plan - [ ] CI: Logs-Builder shard completes in < 13 minutes (currently ~19 min) - [ ] All 77 QB tests pass (no regressions) - [ ] No changes to test assertions or coverage ## Fallback If this doesn't bring Logs-Builder below ~13 min, Plan B (4-shard split) is documented in `tests/ui-testing/MD_Files/Logs Shard Split/4-shard-strategy.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> |
||
|
|
22b23bfb9b |
test: split logsQueryBuilder into 3 files and rebalance Logs CI shards (#11752)
## Summary - Splits the monolithic `logsQueryBuilder.spec.js` (82 tests, 1,968 lines) into 3 parallel-friendly files by describe-block grouping: - `logsQueryBuilder-chart.spec.js` — 28 tests (P0 critical, tab navigation, chart types, entry conditions, chart auto-selection) - `logsQueryBuilder-filters.spec.js` — 26 tests (all filter operator tests) - `logsQueryBuilder-editor.spec.js` — 23 tests (builder tab improvements, edge cases, mode toggles, bare field select, field list visibility) - Replaces the 2 uneven Logs shards (`Logs-Core` 175 tests / `Logs-Queries` 57 tests) with 3 balanced shards: - `Logs-Builder` (~102 tests) — the 3 split files + logsquickmode, logshistogram, pagination, unflattened - `Logs-Core` (~92 tests) — logspage, logstable, logsqueries, join, shareLink, logsAnalyzeDimensions, monaco-query-prefill, logsqueries.matchall - `Logs-Features` (~77 tests) — autocomplete, searchJobInspector, searchPatterns, jobSearch, sql-autocomplete, CTE, downloads, secondsPrecision, searchpartition, indexquery, region ## Why The old `Logs-Core` shard took **28 minutes** because `logsQueryBuilder.spec.js` (82 serial tests in one file) pinned a single worker while 4 others sat idle. With the split, all 5 workers can process files in parallel, bringing estimated shard time to **~10-12 minutes each**. ## Test plan - [x] All 3 new files verified with `--list` (77 tests parsed correctly) - [x] Shard 1 (Logs-Builder): 65 passed, 5 failed — all 5 failures are pre-existing timing/flake issues, confirmed against CI run [#25556422716](https://github.com/openobserve/openobserve/actions/runs/25556422716/job/75017482996) - [x] Shard 2 (Logs-Core): 88 passed, 4 failed — all 4 failures pre-existing in untouched files - [x] Shard 3 (Logs-Features): 62 passed, 15 failed — 11 are `@enterprise` tests expected to fail on OSS, 4 pre-existing flakes - [x] Zero import errors, zero missing utility function errors across all 3 files - [x] ENT `playwright.yml` updated in companion PR: openobserve/o2-enterprise 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
e2813291ce |
test: stabilise alpha1 e2e tests via UI org-switch (#11528)
## Summary
Stabilises alpha1 cloud E2E tests across the Logs-Core shard. Fixes a
UI/API org mismatch root cause, adds env-aware query execution helpers,
and brings all 10 changed spec files into POM compliance.
## Root cause (original)
After Dex login, the Pinia store binds all API calls to the user's
*default* org. The URL `?org_identifier=...` alone does not update the
store. Ingestion went to the `.env` org while UI searches went to the
user's default org → empty results → cascading test failures.
## Changes
### Alpha1 environment / authentication
- **`global-setup-alpha1.js`** — switches active org via the navbar
dropdown after Dex login so the Pinia store adopts the correct org;
`context.storageState` captures the result for all test contexts
- **`playwright-alpha1.config.js`** — `ORGNAME` sourced purely from
`.env`; cloud-config override removed
- **`loginPage.login()` / `unflattened.spec.js`** — include
`?org_identifier=${ORGNAME}` in SPA navigation to prevent defaulting to
`_meta`
- **`unflattened.js openStreamDetail()`** — replaced broken
stream-name-text click with `Stream Detail` action button + Schema-tab
visibility wait
### Auto-run query handling (`auto_query_enabled` flag)
- **`logsPage.js`** — added `runQueryAfterModeChange()`: on alpha1
(`auto_query_enabled=true`) waits for the in-flight auto-query to
complete; on local triggers a fresh query. Fixes
`@interestingFieldsCRUD` and `@quickModeResults` tests that were passing
on alpha1 but failing locally because the old fix clicked Refresh
mid-auto-run (hitting Cancel)
- **`logsQueryPage.js`** — null-guard `textContent()` return in
`_toggleAutoRun()` (`|| ''`) to satisfy Playwright's `string | null`
type contract
### Merge conflict resolution
- **`logsPage.js enableQuickModeIfDisabled()`** — kept HEAD's version
that defines `quickModeIndicator` at the top of the function (used in
the retry loop); discarded main's version that opened the utilities menu
before the variable was defined
### POM compliance (Sentinel audit)
Added three new POM methods to **`logsPage.js`**:
- `watchForNotification(timeout)` — returns a promise for pre-action
race-condition-safe notification watching
- `expectNotificationContainsText(text)` — notification text assertion
- `waitForNotificationWithText(text, timeout)` — notification waiter
with text filter
Removed raw locators from spec files:
- **`logspage.spec.js`** — notification race pattern →
`watchForNotification()` + `expectNotificationContainsText()`; 5-line
raw histogram toggle block → `ensureHistogramState(true)` (POM method
already existed)
- **`logsqueries.spec.js`** —
`pm.logsPage.page.waitForSelector('.q-notification__message:has-text(...)')`
→ `waitForNotificationWithText()`
- **`jobSearch.spec.js`** — added `testLogger` import; replaced 14×
`console.log` with `testLogger.info`; raw Monaco editor locators (lines
158–168) → `logsPage.waitForQueryEditorVisible()` +
`logsPage.getQueryEditorText()` (both already in POM)
### Tags
- **`jobSearch.spec.js`** — all 8 tests now tagged: `@jobSearch,
@P0/@P1` with functional sub-tags (`@smoke`, `@crud`, `@validation`)
- **`logshistogram.spec.js`** — all 5 tests now include `@P1`
## Results
- All `logsquickmode.spec.js` tests pass on both local and alpha1
- Zero Sentinel critical issues remaining across all 10 changed spec
files
- Remaining warnings (old-style auth in `jobSearch.spec.js` /
`pagination.spec.js`, `pm.logsPage.page.reload()` in
`logsquickmode.spec.js`) are pre-existing tech debt deferred to a
separate PR
## Test plan
- [ ] Run `logsquickmode.spec.js` locally and on alpha1 — both should
pass
- [ ] Run full Logs-Core shard on alpha1: `npx playwright test --config
playwright-alpha1.config.js
playwright-tests/Logs/{join,logspage,logsquickmode,pagination,unflattened,logshistogram,jobSearch,logsqueries,logsAnalyzeDimensions}.spec.js`
- [ ] Verify global setup logs: `Switching active org to: <ORGNAME>` →
`Org switch complete`
- [ ] Confirm no `console.log` output in `jobSearch.spec.js` test run
(all replaced by `testLogger`)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|
|
87da57db50 |
feat: ux improvement tabs and buttons (#11595)
Design at: https://github.com/openobserve/designs/blob/main/dashboards/ux-improvement-tabs-buttons/design.md --------- Co-authored-by: Kirtan Thakkar <kirtan@kiara.tech> Co-authored-by: ktx-mihir <mihir.patel@kiara.tech> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: ktx-riya <riya.kukadiya@kiara.tech> Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai> Co-authored-by: ktx-akshay <akshay.patil@kiara.tech> |
||
|
|
511eccf363 |
fix: correct field access order for CSV download in TableRenderer (#11591)
- #11574 |
||
|
|
4c6282bb19 |
test: fix alert-v3 tests (#11570)
- API-first methods in alertTemplatesPage.js (_findTemplateViaApi, createTemplateViaApi, deleteTemplateViaApi) to bypass fragile UI pagination - API-first destination lookup in alertDestinationsPage.js (findDestinationViaApi) resolves cascade failure - v3-compatible locators for alert type dropdown, condition operators, deduplication flow in alertCreationWizard.js - Self-contained test pattern with per-test random suffixes and no shared state - URL-based navigation with menu fallback for templates and destinations pages - q-portal cleanup before click interactions to prevent interception - Conditional enterprise feature guards at runtime 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
cb4c799476 |
ci: make merge-reports-to-TestDino non-blocking for playwright_summary (#11457)
## Summary - In `playwright_summary`, `merge_and_upload_reports` result of `failure` is now treated as non-blocking (same as `success`/`skipped`) - The Playwright summary check will pass even if the TestDino merge/upload job fails (e.g. network issues, bad token, API outage) - Actual test results (`build_binary`, `ui_integration_tests`) still gate the summary as before ## Why The TestDino upload is observability/reporting infrastructure — it should never cause a PR's required check to fail when the tests themselves passed. Previously a transient TestDino failure would block merges. ## Test plan - [ ] Verify `playwright_summary` passes when `merge_and_upload_reports` succeeds (existing behavior) - [ ] Verify `playwright_summary` passes when `merge_and_upload_reports` fails (new behavior) - [ ] Verify `playwright_summary` still fails when `ui_integration_tests` fails (unchanged) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
6f35d34585 |
test: fix Dex submit button click interception on alpha AKS environment (#11275)
## Summary
- The alpha AKS environment (`alpha.o2aks1.internal.zinclabs.dev`) has a
transparent overlay on the Dex login page that intercepts the submit
button click in `global-setup-alpha1.js`
- This caused all 13 CI shards to fail — global setup timed out on the
30s click wait, preventing any tests from running
- Root cause: `submitButton.click()` found the button visible and stable
but the click was intercepted, so it hung for the full 30000ms timeout
- Fix: add `{ force: true }` to bypass the overlay, with an `Enter` key
fallback if force-click is also blocked
- Verified locally: login completes successfully, 2 cloudLogin tests
pass
## Test plan
- [x] Run `cloudLogin.spec.js` locally against alpha — 2/2 passed
- [ ] Trigger full alpha1 CI run to confirm all 13 shards pass
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Shrinath Rao <undefined@users.noreply.github.com>
|
||
|
|
9cfc813c98 | test: Add e2e for anomalies feature (#11358) | ||
|
|
4ca1e3005d |
fix: corelation adaptive sampling (#11346)
Co-authored-by: Neha P <neha@openobserve.ai> Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
b308e83568 |
test: migrate GeneralTests and RegressionSet specs for alpha1 cloud (Set 12) (#11227)
## Summary - Migrate `landingPage.spec.js` and `languageTranslation.spec.js` (GeneralTests) for alpha1 cloud compatibility - Migrate `alerts-regression.spec.js` and `logs-9754.spec.js` (RegressionSet) for alpha1 cloud compatibility - Replace all `process.env["ORGNAME"]` / `process.env.ORGNAME` with `getOrgIdentifier()` from `cloud-auth.js` - Add `waitForStreamAvailable` to `logs-9754.spec.js` for cloud indexing delays - Fix `playwright-alpha1.config.js` to override `INGESTION_URL` when `.env` sets it to localhost ## Test plan - [x] All 4 spec files run against alpha1 cloud — 21/22 passed - [x] 1 flaky failure in alerts-regression (PromQL alert list visibility timeout — not migration-related) - [ ] CI run on `playwright_alpha1.yml` workflow with both branches --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
4f8d50a474 |
test: migrate RegressionSet specs for alpha1 cloud (Set 11) (#10924)
## Summary - Migrate 6 RegressionSet spec files for alpha1 cloud compatibility - Replace `process.env["ORGNAME"]` with `getOrgIdentifier()` from `cloud-auth.js` across all files - Full framework migration of `pipeline-regression.spec.js`: ESM → CJS imports, `LoginPage` login → `navigateToBase` + `PageManager` pattern - Add `cloud-auth.js` imports to all 6 files ## Files Changed - `logs-regression.spec.js` — 3 ORGNAME replacements + import - `logs-regression-bugs.spec.js` — 6 ORGNAME replacements + import - `streams-regression.spec.js` — 1 ORGNAME replacement + import - `ui-regression.spec.js` — 2 ORGNAME replacements + import - `enrichment-regression.spec.js` — 1 ORGNAME replacement + import - `pipeline-regression.spec.js` — full rewrite (ESM→CJS, LoginPage→navigateToBase, ORGNAME→getOrgIdentifier) ## Test plan - [x] Run RegressionSet against alpha1 cloud locally: 37 passed, 1 skipped, 3 pre-existing failures (not migration-related) - [ ] CI run on alpha1 cloud workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Shrinath Rao <undefined@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
|
|
b1fe77871a |
test: add E2E tests for RUM sourcemap feature (#11014)
## Summary - Add comprehensive E2E test coverage for RUM sourcemap functionality (26 total tests) - API tests: 20 pytest tests (upload/list/delete/resolve operations + RBAC) - UI tests: 6 Playwright tests for error tracking UI - Helper scripts for RUM data ingestion ## Implementation Details ### API Tests (pytest) - **test_sourcemap_api.py**: 15 tests covering: - Sourcemap upload (multipart/form-data) - List sourcemaps - Delete sourcemaps - Stacktrace resolution with sourcemaps - **test_sourcemap_rbac.py**: 5 tests for role-based access control - **ingest_rum_errors.py**: Helper to inject synthetic RUM error data for UI tests - **ingest_rum_performance.py**: Helper to enable RUM feature in UI ### UI Tests (Playwright) - **sourcemap-ui.spec.js**: 6 tests validating: - Error tracking page loads - Query execution - Error list display - Error detail navigation - Metadata display - Stack trace display - **rumPage.js**: Updated page object with API response interception - Workaround for Vue 3 @click handlers not responding to Playwright clicks - Navigate via URL using error IDs extracted from API responses - Tests run in **parallel mode** with proper assertions (no graceful skips) ## Test Execution ```bash # API tests (pytest) cd tests/api-testing pytest tests/test_sourcemap_api.py -v # 15 tests pytest tests/test_sourcemap_rbac.py -v # 5 tests # UI tests (Playwright) cd tests/ui-testing npx playwright test playwright-tests/RUM/sourcemap-ui.spec.js --workers=3 # 6 tests ``` ## Technical Notes - Vue 3 production builds don't respond to Playwright's synthetic click events on @click handlers - Solution: Intercept API responses to extract error IDs, then navigate directly via URL - All tests use hard assertions - tests fail if data doesn't exist (no graceful skips) --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Shrinath Rao <undefined@users.noreply.github.com> |
||
|
|
258eecd447 |
test: add E2E tests for autocomplete value suggestions feature (#11027)
Add Playwright E2E tests for the new autocomplete value suggestions feature that persists field values in IndexedDB and shows them when typing `field =`. Tests cover: - IndexedDB capture from field expansion (Values API) - IndexedDB capture from search results (marked as expected-to-fail due to bug) - Autocomplete suggestions for operators: =, !=, <>, >=, <=, IN, NOT IN, LIKE - Numeric value quoting (no quotes for numbers) - TTL expiry filtering - Stream/org isolation - Traces page autocomplete Note: One test marked as expected-to-fail due to BLOCKER BUG where captureFromSearchHits() doesn't write to IndexedDB (schemaFields filtering issue) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Neha P <undefined@users.noreply.github.com> |
||
|
|
39c386de6b |
test(general): migrate GeneralTests specs for alpha1 cloud (Set9) (#10902)
## Summary
- Migrate 6 GeneralTests spec files (sanity, schema, schemaload,
ingestion-config, enrichment, theme-management) for alpha1 cloud
compatibility
- Fix global-setup-alpha1.js ingestion skip detection — only skip when
cleanup is the sole test file
- Add 60s cloud navigation timeout in enhanced-baseFixtures.js for
parallel worker resilience
- Replace `networkidle` waits with `waitForResponse('/_search')` in
sanityPage.js for reliable cloud search waits
- Add 5-minute timeout for doc links validation test and skip unreliable
`short.openobserve.ai` URLs
## Test plan
- [x] All 6 specs pass individually against alpha1 cloud
- [x] Combined run with cleanup + 5 workers: **33 passed, 0 failed, 4
skipped**
- [ ] CI shard run via playwright_alpha1.yml (ENT PR)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||
|
|
a28e996b92 |
test: Traces + Metrics cloud compatibility for alpha1 E2E (Set5) (#10854)
## Summary - Add Traces (7 specs, 44 passing, 9 skipped) and Metrics (9 specs, 49 passing, 6 skipped) cloud compatibility for alpha1 - Add `networkidle` wait in `enhanced-baseFixtures.js` `navigateToBase()` to prevent Dex redirect on sidebar clicks before Vue app fully hydrates - Skip 9 tracesAnalyzeDimensions tests — RED metrics dashboard selector mismatch (`ensureMetricsDashboardVisible()` returns false on alpha1; needs DevTools investigation) - Skip 4 metrics-promql-query-persistence tests — multi-tab `enterQueryViaKeyboard()` doesn't persist on cloud (timing/state issue) - Skip 2 metrics.spec.js tests — field list collapse/search selectors not found on alpha1 ## Test Results (local against alpha1, 5 workers) - **93 passed, 15 skipped, 0 failed** (9 min) ### Traces Shard (7 specs) | Spec File | Passed | Skipped | |---|---|---| | tracesSearch.spec.js | 8/8 | 0 | | traceDetails.spec.js | 3/3 | 0 | | traceQueryEditor.spec.js | 11/11 | 0 | | traceErrorFilter.spec.js | 5/5 | 0 | | traceAdvancedFiltering.spec.js | 8/8 | 0 | | tracesAnalyzeDimensions.spec.js | 0/9 | 9 | | service-graph.spec.js | 9/9 | 0 | ### Metrics Shard (9 specs) | Spec File | Passed | Skipped | |---|---|---| | metrics.spec.js | 7/9 | 2 | | metrics-queries.spec.js | 6/6 | 0 | | metrics-aggregations.spec.js | 5/5 | 0 | | metrics-visualizations.spec.js | 5/5 | 0 | | metrics-config.spec.js | 7/7 | 0 | | metrics-config-tabs.spec.js | 4/4 | 0 | | metrics-advanced.spec.js | 7/7 | 0 | | metrics-promql-query-persistence.spec.js | 4/8 | 4 | | metrics-table-column-order.spec.js | 4/4 | 0 | ## Test plan - [ ] Trigger alpha1 CI with Set5 branch (Traces + Metrics shards) - [ ] Verify 93 pass, 15 skip, 0 fail - [ ] After merge: uncomment all shards for full regression --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
79b86199a4 |
test: Alerts cloud compatibility for alpha1 E2E (Set2) (#10813)
## Summary - Make all 8 Alerts spec files cloud-compatible for alpha1 environment - Replace `process.env.ORGNAME` with `getOrgIdentifier()` from cloud-auth.js - Replace `getAuthToken()` (email:password) with `getAuthHeaders()` for cloud passcode-based auth in 3 files with API calls (alerts-scheduled-features, alerts-incident-correlation, alerts-vrl-encoding) ## Test plan - [ ] All existing self-hosted E2E tests still pass - [ ] Alpha1 cloud E2E Alerts shard passes --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Shrinath Rao <undefined@users.noreply.github.com> |
||
|
|
befa1883a0 |
test: add alpha1 cloud compatibility for E2E logs tests (#10763)
## Summary - Add cloud auth infrastructure (`cloud-env.js`, `cloud-auth.js`) for cloud/self-hosted switching - Centralize ingestion auth via `getAuthHeaders()` across all ingestion utilities (data, trace, service-graph, metrics) - Refactor `commonActions.js` from `exec(curl)` to `page.request.post()` for cloud cookie compatibility - Enhance `cloudLoginPage.js` + `page-manager.js` for conditional cloud page objects - Update `global-setup-alpha1.js` to fetch org identifier and passcode from cloud session - Fix `global-teardown.js` race condition with proper error handling - Replace `console.log` with `testLogger` in `commonActions.js`, `ingest-service-graph.spec.js`, `scripts/ingest-service-graph.js` - Replace raw selectors with POM methods (`applyQueryButton`, VRL editor, pagination, time range) - Add missing test tags to `searchpartition`, `unflattened`, `ingest-service-graph` specs - Fix `networkidle` → `domcontentloaded` across multiple spec files ## Companion PR - Enterprise: sets `IS_CLOUD=true` in alpha1 E2E workflow ## Test plan - [ ] Self-hosted E2E tests pass (no behavioral changes — only routing through POM + testLogger) - [ ] Alpha1 cloud E2E tests pass with cloud auth enabled - [ ] Verify no credential leaks in logs (passcode/password values never logged) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Shrinath Rao <undefined@users.noreply.github.com> |
||
|
|
016a1b150b | test: stabilize dashboard variable flaky test case (#10717) | ||
|
|
5b9ffc112c |
test: add alpha1 cloud login E2E tests and Dex auth setup (#10675)
## Summary POC for running Playwright E2E tests against the alpha1 cloud environment. - Add Playwright config (`playwright-alpha1.config.js`) for alpha1 cloud environment - Add Dex "Continue with Email" global setup (`global-setup-alpha1.js`) for automated login - Add `CloudLoginPage` page object for POM compliance - Add `cloudLogin.spec.js` with 2 login + sanity tests (all passing) ## Test plan - [x] All 2 tests pass locally against alpha1 - [x] Verify tests pass in CI when triggered from enterprise workflow - [ ] Add `ALPHA1_USER_EMAIL` and `ALPHA1_USER_PASSWORD` GitHub secrets --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Shrinath Rao <undefined@users.noreply.github.com> |