Commit Graph
823 Commits
Author SHA1 Message Date
Neha PandClaude Opus 4.7 c008f7080f test: add default query format assertions and Run Query button test for scheduled pipeline (#11623)
## Summary
- Enhanced existing scheduled pipeline query builder tests with exact
default query format assertions (`max(_timestamp)`, `count(_timestamp)`,
`histogram(_timestamp)`)
- Added new P2 test verifying Run Query button transitions from disabled
to enabled after stream selection and default query population
- Verifies behavior described in Issue #11575



## Test plan
- [x] All 4 tests pass (verified on test environment)

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 13:42:47 +00:00
Bhargav c6574a81fa fix: Issue 11606 search term logs page (#11607)
## What changed

Fixed `addFieldTerm` in `SearchBar.vue` so that include/exclude search
terms are inserted at the correct position in SQL aggregation queries.
Previously the code checked for `ORDER BY` before `GROUP BY`, causing
the injected `WHERE` clause to land after `GROUP BY` (invalid SQL). The
fix scans all terminating clauses (`GROUP BY`, `HAVING`, `ORDER BY`,
`LIMIT`) and inserts `WHERE` before whichever appears earliest. The
remaining diff is Prettier-driven reformatting with no logic changes.

## Why

The old sequential `if/else if` checked `ORDER BY` first. On a query
containing both `GROUP BY` and `ORDER BY`, it would split at `ORDER BY`
and produce `… WHERE <filter> ORDER BY … GROUP BY …` — structurally
invalid SQL. The fix enforces correct SQL clause ordering (`FROM → WHERE
→ GROUP BY → HAVING → ORDER BY → LIMIT`).

## Approach

The new algorithm iterates over all four terminating clauses, records
the index of each that is present, picks the one with the smallest index
(`firstClause`), then uses the existing `queryIndexSplit` utility to
splice the `WHERE <filter>` token in before it. If no terminating clause
exists the filter is appended. The spec file was extended with 14 new
unit tests covering the core bug scenario (GROUP BY + ORDER BY
together), each individual clause in isolation, all-clauses-present,
AND-append paths, and edge cases (case-insensitive matching, column
names containing clause keywords, special characters in filter values).

## Risk

The logic change is isolated to the `else` branch of `addFieldTerm` that
handles queries with no existing `WHERE` clause. Queries that already
have a `WHERE` clause follow a separate code path and are unaffected.
Reviewers should confirm the `queryIndexSplit` utility is
case-insensitive-safe (the fix lowercases only for the index scan, then
splits the original string) and verify the preserved trailing
`afterClause` string includes the space/newline that was previously part
of the `" order by"` / `" group by"` literals.
2026-05-06 10:17:48 +00:00
Neha PandClaude 031bad113f test: add API tests for stream settings deduplication (#11516)
## Summary
- Add API tests verifying that stream settings fields (index_fields,
bloom_filter_fields, full_text_search_keys) are deduplicated when the
same field is added multiple times
- Tests cover: single field dedup, multiple fields, repeated adds (4x),
remove+re-add, empty payloads, and partial updates
- All tests use existing schema fields from the seed data stream
(`stream_pytest_data`)

## Test plan
- [x] All 10 tests pass against testing environment
- Tests run via `cd tests/api-testing && rye run pytest
tests/test_stream_settings_dedup.py -v`

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-06 04:38:29 +00:00
Neha PandClaude Opus 4.7 b061cb0b8e test: dedup alert threshold and tab switching for v3 UI (#11609)
Three fixes in alertCreationWizard.js:
- Align threshold operator dropdown with working SQL method pattern
(q-field__control click + role-based option + q-menu fallback)
- Narrow portal cleanup from all q-portal to q-portal--dialog only to
avoid hiding new dropdown menus
- Fix _switchToTab to target v3 inner tab divs instead of wrapper

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 16:39:21 +00:00
Abhay Padamani 511eccf363 fix: correct field access order for CSV download in TableRenderer (#11591)
- #11574
2026-05-04 12:22:01 +00:00
Neha PandClaude 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>
2026-05-04 11:40:58 +00:00
Loakesh IndiranandHengfei Yang 379087b550 chore: add sync unit tests (#11588)
## Summary

- Add `#[cfg(test)] mod tests` blocks to ~525 files across all workspace
crates
- Covers: openobserve, infra, config, ingester, wal, flight,
tantivy_utils, cli
- All tests are synchronous (`#[test]` only) — struct defaults, serde
roundtrips, enum variants, pure utility functions
- No async tests, no logic changes — purely additive

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-05-04 10:38:41 +00:00
Omkar Kesarkhane 1096193a22 fix: In traces changing org should reset the trace results (#11517)
#11384 
#11392
2026-04-29 09:40:06 +00:00
Neha PandClaude bff8735bb5 test: add E2E regression tests for bugs #11400 and #11498 (#11527)
## Summary
- **Bug #11498**: Add P0 smoke tests verifying Run Query button
disabled/enabled state based on stream selection in pipeline scheduled
dialog
- **Bug #11400**: Add P2 functional tests (3 tests) for query editor
fixes:
1. Double-quote validation via Monaco DOM warning markers
(`.squiggly-warning`)
2. Functions filtered from value-context suggestions in WHERE clause
(`effectiveKeywords` computed property)
3. Mixed quote handling in multi-condition WHERE clauses (`hasOpenQuote`
regex scoping fix)

## Changes
- `logs-regression.spec.js`: Added 3 Bug #11400 tests (lines 1525-1728)
- `pipeline-regression.spec.js`: Added 2 Bug #11498 tests
- `logsPage.js`: Added 6 POM methods for Monaco suggestion widget
interaction
- `pipelinesPage.js`: Added POM methods for Run Query state and
destination validation
- `.gitignore`: Added test artifact patterns

## Test Plan
- [x] All 3 Bug #11400 tests verified passing (`--headed --workers=1`)
- [x] Bug #11498 tests verified passing in prior session
- [x] Tests use DOM-based inspection (no `window.monaco` dependency)
- [x] Graceful fallback when suggestion widget unavailable (field values
not cached)

## Related
- Fixes PR #11502 (Bug #11498)
- Fixes PR #11403 (Bug #11400)
- Docs: `docs/test_generator/cases/pipeline-bugs-test-cases.md`

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-29 09:19:49 +00:00
udev 5665a2059f ci: fix flaky tests (#11504) 2026-04-28 14:44:33 +00:00
Sai Nikhil 3ae377a3cf fix: issues over autosuggestion value suggestions on query editor (#11403)
This pr fixes the issues on #11400
2026-04-27 11:29:38 +00:00
cc466132a7 chore: new home page (#11458)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Ashish Kolhe <undefined@users.noreply.github.com>
2026-04-25 19:18:21 +00:00
Shrinath RaoandClaude Sonnet 4.6 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>
2026-04-25 12:22:27 +00:00
ktx-kirtan 8bdd333a0f Revert "feat: dashboard validation sync from BE" (#11437)
Reverts openobserve/openobserve#11034
2026-04-24 10:38:50 +05:30
Shrinath Rao 605560ae76 test: skipped failing anomalies test (#11429) 2026-04-23 18:54:48 +00:00
aec4a083d9 fix: stack histogram based on stream fields (#11390)
This PR fixes the issue in #11353 

 ## New Env
```sh
name = "ZO_HISTOGRAM_BREAKDOWN_FIELDS",
help = "Comma-separated ordered list of stream fields used for stacked histogram breakdown. First match wins."
default = "severity,log_level,level,status"
```

## Flow Chart

```
UI histogram request (is_ui_histogram = true)
                │
                ▼
    ┌───────────────────────┐
    │  is_multi_stream_search?│
    └───────────────────────┘
         │ yes          │ no
         ▼              ▼
  breakdown_field    stream_names.first()
      = None              │
         │                ▼
         │       infra::schema::get(org, stream, type)
         │                │
         │         ┌──────┴──────┐
         │       fails          ok
         │         │              │
         │         ▼              ▼
         │   breakdown_field   detect_histogram_breakdown_field(fields)
         │       = None              │
         │                   priority scan (case-insensitive):
         │                     1. severity?  ──yes──▶  breakdown_field = severity
         │                     2. log_level? ──yes──▶  breakdown_field = log_level
         │                     3. level?     ──yes──▶  breakdown_field = level
         │                     4. status?    ──yes──▶  breakdown_field = status
         │                     5. none match ──────▶  breakdown_field = None
         │                          │
         └──────────────────────────┘
                          │
                          ▼
          convert_to_histogram_query(sql, streams, multi, breakdown_field)
                          │
             ┌────────────┴────────────┐
          None                      Some(field)
             │                          │
             ▼                          ▼
   SELECT zo_sql_key,        SELECT zo_sql_key,
          zo_sql_num                "field" AS zo_sql_breakdown,
   FROM stream                      zo_sql_num
   WHERE ...              FROM stream
   GROUP BY zo_sql_key    WHERE ...
   ORDER BY zo_sql_key    GROUP BY zo_sql_key, zo_sql_breakdown
                          ORDER BY zo_sql_key
             │                          │
             └────────────┬─────────────┘
                          │
                          ▼
                    execute search
                          │
                          ▼
         Response {
           hits: [{ zo_sql_key, zo_sql_breakdown?, zo_sql_num }]
           histogram_breakdown_field: Option<String>
         }
                          │
             ┌────────────┴────────────┐
          None                      Some(field)
             │                          │
             ▼                          ▼
   generateHistogramData()    generateHistogramData()
   flat map:                  breakdown map:
   key → count                (key, category) → count
   xData / yData              breakdownSeries per category
             │                          │
             ▼                          ▼
     convertLogData()         convertStackedLogData()
     single-series            multi-series stacked
     ECharts options          ECharts options
                              + per-category color (palette)
                              + scrollable legend
             │                          │
             ▼                          ▼
     flat bar chart          stacked bar chart
      (unchanged)            (one color per category)
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bjp232004 <551527+bjp232004@users.noreply.github.com>
Co-authored-by: Loakesh Indiran <66478092+Loaki07@users.noreply.github.com>
Co-authored-by: Loakesh Indiran <rustyloaki@gmail.com>
2026-04-23 12:06:49 +00:00
78b7b7b622 feat: dashboard validation sync from BE (#11034)
Design at:
https://github.com/openobserve/designs/blob/main/dashboards/dashboard-validation-sync

---------

Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
Co-authored-by: udev <uddhav@openobserve.ai>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Abhay Padamani <undefined@users.noreply.github.com>
2026-04-23 08:13:30 +00:00
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>
2026-04-23 06:13:40 +00:00
65666e4ed9 chore: last refreshed for logs and traces (#11398)
<img width="2658" height="420" alt="image"
src="https://github.com/user-attachments/assets/90d7bd1a-012d-4185-a832-35135d696baf"
/>
<img width="2640" height="486" alt="image"
src="https://github.com/user-attachments/assets/d9543813-1cca-4f83-8da6-a12b7514a986"
/>

---------

Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-23 11:30:00 +05:30
dependabot[bot] 32665d50f5 chore(deps): bump uuid and googleapis in /tests/ui-testing (#11397) 2026-04-23 08:29:55 +08:00
Neha P 9cfc813c98 test: Add e2e for anomalies feature (#11358) 2026-04-23 08:29:18 +08:00
ktx-vaidehi 4a6bb5326b fix: dashboard table chart copy cell format (#11357) 2026-04-21 12:04:14 +00:00
32009bd2a5 feat: dashboard auto complete suggestion for sql (#11251)
Design at:
https://github.com/openobserve/designs/blob/main/dashboards/sql-autocomplete/design.md

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: undefined <undefined@users.noreply.github.com>
2026-04-21 09:36:06 +00:00
4ca1e3005d fix: corelation adaptive sampling (#11346)
Co-authored-by: Neha P <neha@openobserve.ai>
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-21 09:12:29 +00:00
9433404e32 feat: dashboard refactor to table chart to tanstack table (#11036)
Design at:
https://github.com/openobserve/designs/blob/main/dashboards/tanstack-table-refactor/design.md

- #11191

---------

Co-authored-by: ktx-akshay <akshay.patil@kiara.tech>
Co-authored-by: omkark06 <omkar@zinclabs.io>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
2026-04-20 10:40:20 +00:00
Shrinath RaoandClaude Opus 4.6 ed771ec045 test: fix search patterns details icon selector and empty state timing (#11326)
## Summary
- Fixed `patternCardDetailsIcon` selector in the page object — the
details icon button was removed from `PatternCard.vue` in PR #11314, so
the test now clicks the card row itself (`pattern-card-N`) which is the
current UX for opening pattern details.
- Added a 15-second grace period in `waitForPatternsToLoad` before
accepting "empty" as the final result. The backend can return "No
patterns found" before async pattern extraction completes, causing the
P0 duplicate-patterns test to fail when patterns exist but haven't been
extracted yet.

## Test plan
- [x] Ran `searchPatterns.spec.js` full suite locally — **15/15 passed**
(was 10 passed, 1 failed, 4 skipped)
- [x] Ran failing test individually — passes
- [x] Verified no regressions in other tests using
`clickPatternDetailsIcon`

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

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 03:55:52 +00:00
Shrinath Rao c87618e2d4 fix(e2e): use clipboard paste for Monaco editor to prevent auto-close bracket corruption (#11311)
## Summary
- **Root cause**: `keyboard.type()` types code char-by-char into Monaco
editor. When typing `{`, Monaco auto-inserts `}`. With nested blocks (3
levels in JS row-expansion code), this creates 3 extra closing braces →
invalid JS → QuickJS compilation failure.
- **Fix**: Replace `keyboard.type()` with clipboard paste
(`navigator.clipboard.writeText` + `Ctrl+V`) in `enterFunctionCode()`.
Pasting inserts text as a single operation, bypassing Monaco's
auto-close bracket behavior.
- All 6 row-expansion tests pass locally after this fix.

## Test plan
- [x] Run `row-expansion.spec.js` locally — all 6 tests pass
- [ ] CI passes on this PR
2026-04-17 09:37:02 +00:00
Sai Nikhilandktx-vaidehi d0e2039bf4 fix: anamoly ui latest (#11293)
Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
2026-04-16 15:26:49 +05:30
1337a04058 fix: alert revamp version 3 (#11253)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:15:39 +05:30
Loakesh IndiranandShrinath Rao b6eafd0c18 fix: wire ServiceStreams processing_mode and channel_capacity to config (#11273)
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
2026-04-15 16:12:41 +00:00
1365e18e23 test: automation for bug fixes (#11250)
## Summary

Adds automated regression tests for 3 bugs marked as
**Needs-Automation** in v0.80.0 milestone.

## Tests Added

### 1. Bug #10110 - Template Duplication in Alerts UI ✅
- **Issue:** https://github.com/openobserve/openobserve/issues/10110
- **Bug:** Template appeared twice in override template input field
- **Test:** Validates template appears exactly once, no duplicate
components
- **Result:** PASSED (2.3m)

### 2. Bug #9043 - Trace Pagination Cursor Reset ✅
- **Issue:** https://github.com/openobserve/openobserve/issues/9043
- **Bug:** Pagination cursor reset when navigating back from trace
details, causing duplicates
- **Test:** Validates cursor preserved, no duplicates, trace count
maintained (327 → 327)
- **Result:** PASSED (1.8m)

### 3. Bug #7671 - FTS and Quick Mode Field Indicators ✅
- **Issue:** https://github.com/openobserve/openobserve/issues/7671
- **Bug:** FTS and quick mode fields should be visually indicated in
stream settings
- **Test:** Validates FTS option visible, quick mode icon mechanism in
place
- **Result:** PASSED (1.5m)

## Validation

All tests validated on dev cluster and follow OpenObserve testing
standards:
✅ POM patterns | ✅ TestLogger | ✅ Proper assertions | ✅ Parallel
execution

## Related Issues

Closes #10110, #9043, #7671 (automation requirements)

---------

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>
2026-04-15 13:58:24 +00:00
85d261b5d0 fix: vulnerability scan fixes (#11249)
| # | Severity | Category | File |
| :--- | :--- | :--- | :--- |
| 1 | **High** | SSRF bypass (IPv6) | `ssrf_guard.rs` |
| 2 | **High** | SSRF bypass (retry) | `enrichment_table/mod.rs` |
| 3 | **High** | SSRF defense-in-depth | `alert.rs` |
| 4 | **Critical** | CORS + credentials | `router/mod.rs` |
| 5 | **Critical** | SQL Injection | `postgres.rs`, `sqlite.rs` |
| 6 | **High** | Privilege escalation (token) | `users.rs` |
| 7 | **Medium** | Panic/DoS | `users.rs` |
| 8 | **Low** | Integer overflow | `alerts/mod.rs` |
| 9 | **Medium** | XSS | `alertSummaryGenerator.ts`, `colorizeQuery.ts`
|
| 10 | **Medium** | Credential exposure in logs | `validator.rs`,
`organization.rs`, `users.rs` |

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
Co-authored-by: Prabhat Sharma <hi.prabhat@gmail.com>
2026-04-14 07:22:11 +00:00
ktx-vaidehi 85c3fd4eda fix: dashboard promql autocomplete (#11233) 2026-04-13 06:59:27 +00:00
Shrinath RaoandClaude Sonnet 4.6 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>
2026-04-10 10:34:32 +00:00
Neha PandClaude ed5eca54fb test: tests for bug fixes (#11178)
https://github.com/openobserve/openobserve/issues/11174

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-09 13:28:54 +00:00
Abhay Padamani 5b71a27729 fix: cross link issue with multi stream (#11200) (#11214)
fix #11200
2026-04-09 10:04:18 +00:00
7552a57377 feat: replace variable value with mustache (#11085)
Design at:
https://github.com/openobserve/designs/tree/main/dashboards/mustache-migration

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Abhay Padamani <undefined@users.noreply.github.com>
Co-authored-by: omkark06 <omkar@zinclabs.io>
2026-04-09 08:25:30 +00:00
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>
2026-04-08 17:21:14 +00:00
7389c5b23e fix: service discovery, incidents, service graph (#11180)
Following fixes and enhancements have been made:

**Service Discovery**:
- default field tracker is now used to distinguish services as well in
absence of a user config, the system works out of box
- UI issues
- incorrect field was displayed when a card in recommendation was
clicked
  - scope/workload selectors were leftover
  - stream based service search

**Incidents**:
- AI Analysis failure now emits a failure event correctly, avoiding
false-positive and preventing UI from getting stuck when a prior
`AIAnalysisBegin` event remained in place
- correlate alerts by alert ID, this was a regression after correlation
revamp, useful for correlation in absence of alert ID
- fix sqlx issue wherein `u64` wasn't supported for sqlite, now turned
into `i64`

**Service graph**:
- now ingests using HTTP bulk API. Was failing since recently moved
service graph daemon to alertmanager, which used internal ingest call,
which was unsupported on alertmanager

- Also add Python 2.0 license support for JS

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: ByteBaker <undefined@users.noreply.github.com>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 11:28:52 +05:30
Abhay Padamani 10c78fb895 perf: batch streaming response while main thread block (#11020) 2026-04-07 09:22:24 +00:00
ByteBakerandHengfei Yang b948361769 chore: update copyright year to 2026 (#11166)
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-04-07 09:57:53 +08:00
Neha P 1009f00022 test: fix search pattern tests (#11052) 2026-04-07 09:55:29 +08:00
1d3618ad94 chore: system-managed SRE Agent service account provisioning (#11130)
## Summary

Implement automatic provisioning and lifecycle management of
per-organization system service accounts for the AI-powered SRE Agent.
These accounts serve as the identity for RCA (Root Cause Analysis) agent
API interactions and are created automatically for each organization.

## Key Features

### Service Account Provisioning
- Database migration creates SRE Agent accounts for all existing
organizations
- Deterministic email format:
`o2-sre-agent.org-<ORG_ID>@openobserve.internal`
- System accounts are automatically created on organization creation
- Idempotent operations ensure safe re-runs and self-healing

### System Account Protection
- API endpoints prevent modification/deletion of system service accounts
(403 Forbidden)
- User responses include `is_system` flag to identify system accounts
- Protection enforced at HTTP handler layer

### RCA Agent Client Refactoring
- Singleton pattern: global client initialized once at startup
- Per-request user credential forwarding for better audit trails and
scoping
- Lazy initialization: returns None if agent service not configured
- Updated all query methods to accept and forward auth credentials

### Incident Correlation Enhancement
- Query `ServiceIdentityConfig` to get configured semantic dimension
groups
- Extract only `distinguish_by` fields from matched identity sets
- Use parallel correlation execution (Service Discovery + semantic
extraction)
- Improved accuracy by using configured groups instead of fallback label
extraction

### Improved Token Redaction
- Consistent 12-character format: first 4 visible characters + 8
asterisks
- Better security for token display in UI
- Updated tests for new redaction format

## Technical Details

### Database Changes
- New migration:
`m20260331_000001_create_sys_rca_agent_service_accounts`
- Creates accounts with organization and RUM tokens
- Safe pagination (100 orgs at a time) with idempotency checks
- System accounts use role type 6 (SreAgent, distinct from
ServiceAccount)

### Authorization
- System accounts added to OpenFGA with standard org membership tuples
- SRE-specific read-only role for permission control
- Self-healing: runtime ensures OpenFGA state is consistent with
database state

### API Changes
- GET /users: Returns `is_system` and `description` fields
- PUT/DELETE /users: Reject modification/deletion of system accounts

## Test Coverage
- Token redaction tests updated for new format
- System service account protection verified
- User list pagination tested with system accounts

## Feature Flag
This is an enterprise feature gated behind `#[cfg(feature =
"enterprise")]`. System accounts are always created, but RCA integration
only works if the agent service is configured.

## Deployment
- Zero-downtime: migration is additive
- Opt-in for OSS deployments
- Automatic provisioning on upgrade and org creation

---------

Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-04-06 14:30:20 +00:00
ktx-vaidehi ea8af43ae5 fix: enhance drilldown handling to prevent URL clobbering during same dashboard navigation (#11134) 2026-04-06 12:17:09 +00:00
Bhargav 27e1d81cb4 fix: rudder sdk package version (#11151) 2026-04-06 16:27:58 +08:00
Bhargav 86b3a787f2 fix: include exclude selection improvement (#11137) 2026-04-06 03:55:18 +00:00
ktx-akshay d7476853e6 test: add automation coverage for query range validation (#11125) 2026-04-03 12:00:01 +00:00
Abhay Padamani 981e3a3d48 fix: metric chart render issue with camelcase alias (#11118) 2026-04-02 10:05:17 +00:00
ByteBaker d25fbf97c1 fix: do not show service account token post creation (#11110)
So far, service account token could be viewed and copied even after an
SA was created. This was bad design and posed risk of impersonation.

The changes prevent this from happening by returning only the redacted
token in the API response. Full token with create API itself, and
removing GET API to get the service account details (which returned raw
token).

The same affects token rotation as well.
2026-04-01 19:29:42 +00:00
ByteBakerandClaude Sonnet 4 85d2adce4c fix: update correlationSettings tests for new tab structure
Updates Playwright tests to match the new correlation settings UI structure
introduced in the service discovery refactor:

- Updated tab names: Service Identity → Configuration, Discovered Services → Services
- Added support for new Field Aliases tab (4 tabs total instead of 3)
- Updated page object methods and test expectations
- Fixed test descriptions and tags to reflect new structure

Resolves CI failure in correlationSettings.spec.js where tests were looking
for old tab names that no longer exist.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-03-31 01:23:28 +05:30