Commit Graph
501 Commits
Author SHA1 Message Date
dependabot[bot]andHengfei Yang d23aac58e5 chore(deps): bump actions/github-script from 7 to 9 (#12675)
Bumps [actions/github-script](https://github.com/actions/github-script)
from 7 to 9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/github-script/releases">actions/github-script's
releases</a>.</em></p>
<blockquote>
<h2>v9.0.0</h2>
<p><strong>New features:</strong></p>
<ul>
<li><strong><code>getOctokit</code> factory function</strong> —
Available directly in the script context. Create additional
authenticated Octokit clients with different tokens for multi-token
workflows, GitHub App tokens, and cross-org access. See <a
href="https://github.com/actions/github-script#creating-additional-clients-with-getoctokit">Creating
additional clients with <code>getOctokit</code></a> for details and
examples.</li>
<li><strong>Orchestration ID in user-agent</strong> — The
<code>ACTIONS_ORCHESTRATION_ID</code> environment variable is
automatically appended to the user-agent string for request
tracing.</li>
</ul>
<p><strong>Breaking changes:</strong></p>
<ul>
<li><strong><code>require('@actions/github')</code> no longer works in
scripts.</strong> The upgrade to <code>@actions/github</code> v9
(ESM-only) means <code>require('@actions/github')</code> will fail at
runtime. If you previously used patterns like <code>const { getOctokit }
= require('@actions/github')</code> to create secondary clients, use the
new injected <code>getOctokit</code> function instead — it's available
directly in the script context with no imports needed.</li>
<li><code>getOctokit</code> is now an injected function parameter.
Scripts that declare <code>const getOctokit = ...</code> or <code>let
getOctokit = ...</code> will get a <code>SyntaxError</code> because
JavaScript does not allow <code>const</code>/<code>let</code>
redeclaration of function parameters. Use the injected
<code>getOctokit</code> directly, or use <code>var getOctokit =
...</code> if you need to redeclare it.</li>
<li>If your script accesses other <code>@actions/github</code> internals
beyond the standard <code>github</code>/<code>octokit</code> client, you
may need to update those references for v9 compatibility.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Add ACTIONS_ORCHESTRATION_ID to user-agent string by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/695">actions/github-script#695</a></li>
<li>ci: use deployment: false for integration test environments by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/712">actions/github-script#712</a></li>
<li>feat!: add getOctokit to script context, upgrade
<code>@​actions/github</code> v9, <code>@​octokit/core</code> v7, and
related packages by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/700">actions/github-script#700</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Copilot"><code>@​Copilot</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/695">actions/github-script#695</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-script/compare/v8.0.0...v9.0.0">https://github.com/actions/github-script/compare/v8.0.0...v9.0.0</a></p>
<h2>v8.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update Node.js version support to 24.x by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/637">actions/github-script#637</a></li>
<li>README for updating actions/github-script from v7 to v8 by <a
href="https://github.com/sneha-krip"><code>@​sneha-krip</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/653">actions/github-script#653</a></li>
</ul>
<h2>⚠️ Minimum Compatible Runner Version</h2>
<p><strong>v2.327.1</strong><br />
<a
href="https://github.com/actions/runner/releases/tag/v2.327.1">Release
Notes</a></p>
<p>Make sure your runner is updated to this version or newer to use this
release.</p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/637">actions/github-script#637</a></li>
<li><a
href="https://github.com/sneha-krip"><code>@​sneha-krip</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/653">actions/github-script#653</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-script/compare/v7.1.0...v8.0.0">https://github.com/actions/github-script/compare/v7.1.0...v8.0.0</a></p>
<h2>v7.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Upgrade husky to v9 by <a
href="https://github.com/benelan"><code>@​benelan</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/482">actions/github-script#482</a></li>
<li>Add workflow file for publishing releases to immutable action
package by <a
href="https://github.com/Jcambass"><code>@​Jcambass</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/485">actions/github-script#485</a></li>
<li>Upgrade IA Publish by <a
href="https://github.com/Jcambass"><code>@​Jcambass</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/486">actions/github-script#486</a></li>
<li>Fix workflow status badges by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/497">actions/github-script#497</a></li>
<li>Update usage of <code>actions/upload-artifact</code> by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/512">actions/github-script#512</a></li>
<li>Clear up package name confusion by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/514">actions/github-script#514</a></li>
<li>Update dependencies with <code>npm audit fix</code> by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/515">actions/github-script#515</a></li>
<li>Specify that the used script is JavaScript by <a
href="https://github.com/timotk"><code>@​timotk</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/478">actions/github-script#478</a></li>
<li>chore: Add Dependabot for NPM and Actions by <a
href="https://github.com/nschonni"><code>@​nschonni</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/472">actions/github-script#472</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/github-script/commit/3a2844b7e9c422d3c10d287c895573f7108da1b3"><code>3a2844b</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/github-script/issues/700">#700</a>
from actions/salmanmkc/expose-getoctokit + prepare re...</li>
<li><a
href="https://github.com/actions/github-script/commit/ca10bbdd1a7739de09e99a200c7a59f5d73a4079"><code>ca10bbd</code></a>
fix: use <code>@​octokit/core/</code>types import for v7
compatibility</li>
<li><a
href="https://github.com/actions/github-script/commit/86e48e20ac85c970ed1f96e718fd068173948b7b"><code>86e48e2</code></a>
merge: incorporate main branch changes</li>
<li><a
href="https://github.com/actions/github-script/commit/c1084728b5b935ec4ddc1e4cee877b01797b3ff9"><code>c108472</code></a>
chore: rebuild dist for v9 upgrade and getOctokit factory</li>
<li><a
href="https://github.com/actions/github-script/commit/afff112e4f8b57c718168af75b89ce00bc8d091d"><code>afff112</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/github-script/issues/712">#712</a>
from actions/salmanmkc/deployment-false + fix user-ag...</li>
<li><a
href="https://github.com/actions/github-script/commit/ff8117e5b78c415f814f39ad6998f424fee7b817"><code>ff8117e</code></a>
ci: fix user-agent test to handle orchestration ID</li>
<li><a
href="https://github.com/actions/github-script/commit/81c6b7876079abe10ff715951c9fc7b3e1ab389d"><code>81c6b78</code></a>
ci: use deployment: false to suppress deployment noise from integration
tests</li>
<li><a
href="https://github.com/actions/github-script/commit/3953caf8858d318f37b6cc53a9f5708859b5a7b7"><code>3953caf</code></a>
docs: update README examples from <a
href="https://github.com/v8"><code>@​v8</code></a> to <a
href="https://github.com/v9"><code>@​v9</code></a>, add getOctokit docs
and v9 brea...</li>
<li><a
href="https://github.com/actions/github-script/commit/c17d55b90dcdb3d554d0027a6c180a7adc2daf78"><code>c17d55b</code></a>
ci: add getOctokit integration test job</li>
<li><a
href="https://github.com/actions/github-script/commit/a047196d9a02fe92098771cafbb98c2f1814e408"><code>a047196</code></a>
test: add getOctokit integration tests via callAsyncFunction</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/github-script/compare/v7...v9">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-06-22 10:09:19 +00:00
Shrinath RaoandClaude Opus 4.8 900ebe67c6 ci(e2e-council): test-quality gate — stop certifying green-but-worthless specs (#12722)
## The problem (from the #12719 review)

The pipeline's only hard gate was **"the Healer's authoritative run is
green."** That objective *rewards* making a spec pass by gutting the
assertions that test the feature. In #12719 the result was a suite that:
- dropped the fix-query-card assertion,
- asserted `count >= 0` (a tautology),
- buried real assertions inside `if`s whose `else` just logs, and
- **asserted the feature is absent** (`expectFixQueryCardNotVisible`) —
certifying a half-built feature and set to **turn red when the feature
is finished**.

> A passing test and a valuable test are different things, and we only
measured the first.

This PR makes **"done" mean "the tests would fail if the feature were
broken."**

## Deterministic backbone (no LLM) —
`.github/scripts/assert_integrity.py`

The most important guards don't depend on the model behaving:
- **Diff-aware heal guard** — snapshot the spec's assertions *before*
healing; **reject** any heal that **deleted**, **inverted**
(`toBeVisible` → `not.toBeVisible`), or **skipped** assertions to reach
green.
- **Static anti-patterns** — tautologies (`count >= 0`, `expect(true)`)
and **conditional-only** tests (every `expect` inside an `if` → the test
can pass asserting nothing).
- Conservative by design (only high-confidence patterns) — a gate with
false positives gets disabled by humans. Restored from a **trusted ref**
in verify_heal (never the PR tree's copy).

## Workflow

- New **Assertion-integrity gate** after the authoritative run + a
combined **Quality gate decision** (integrity **+** Sentinel verdict).
`pr_back` now requires `quality_status == pass` → a green-but-worthless
spec **never becomes a PR**.
- The post-heal **Sentinel re-audit now feeds the blocking gate** (was
advisory-only). LLM flakiness fails **open**; the deterministic gate is
the hard teeth.
- **`feature-incomplete`** honest exit: when a test can't pass because
the feature isn't wired, the Healer parks it `test.fixme` + writes
**evidence**; the workflow opens **no PR** and posts the gap (file:line)
on the source PR — the single highest-value output.
- `pr_back` **reconciles `test-summary.json` against the FINAL spec**
(drops phantom rows) so the PR body can't claim tests that don't exist.

## Prompts

- **Healer:** hard anti-weakening rules + the `feature-incomplete`
honest exit.
- **Sentinel:** tautology / conditional-only / negative-only-on-feature
/ name-mismatch as **CRITICAL** checks.
- **Engineer:** no dead page-object scaffolding; ban `waitForTimeout` as
a sync primitive; assertions must be real and match the test name.
- **Architect:** one spec = one area (no Frankenstein specs);
de-duplicate scenarios.

## Considered and deferred: mutation-sanity (extra feature-absent build)

Theoretically the cleanest definition of a valuable test, but **dropped
for now**: it overlaps the cheap static checks, has **no clean
"feature-absent" baseline** under merged/multi-PR input, risks false
positives that erode trust, and doubles the build. The static guards
catch the same #12719 failures at near-zero cost; prevention (Healer
can't invert + honest `feature-incomplete`) beats the expensive
detector.

## Testing

- `assert_integrity.py` unit-tested against tautology / conditional-only
(incl. single-line) / heal-removed / heal-inverted fixtures, with no
false positive on a legit `if` + unconditional `expect`.
- Workflow YAML validated; analyzer compiles.
- **First live run still needed** (per the project's "run the path
before done" rule) — to see the gate block a real weak spec and the
`feature-incomplete` comment fire.

Stacked on #12716 (ENT sister flow); the diff collapses to just the
quality program once #12716 lands.

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 09:30:03 +00:00
Neha PandClaude Opus 4.7 3ec3a5d4e4 fix(ci): query-agent run_tests job missing permissions to post PR comment (#12777)
## Summary
The `run_tests` job's job-level `permissions: contents: read` was
overriding the top-level `issues: write` and `pull-requests: write`,
causing the "Post results comment" step to fail with `HttpError:
Resource not accessible by integration`.

## Test
- Verified on [run
#27815374013](https://github.com/openobserve/openobserve/actions/runs/27815374013)
— both matrix configurations passed all 672 queries but failed to post
results comments
- After this fix, comments will post correctly

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

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-19 09:26:00 +00:00
Neha PandClaude Opus 4.7 7d3e67903e ci: add single_node_opt matrix mode to query agent tests (#12756)
## Summary

- Adds a matrix strategy to the query agent SQL regression suite jobs in
both `api-testing.yml` and `query-agent.yml`
- Each job now runs with `ZO_FEATURE_SINGLE_NODE_OPTIMIZE_ENABLED=false`
and `ZO_FEATURE_SINGLE_NODE_OPTIMIZE_ENABLED=true`
- Verifies both DataFusion physical optimizer paths produce identical
query results
- Matrix legs run in parallel with `fail-fast: false`
- All artifact/log names include the matrix label to avoid collisions

## Test plan

- [ ] PR CI shows two `api_query_agent` matrix legs
(single_node_opt_false and single_node_opt_true), both pass
- [ ] `/query-agent` PR comment triggers both modes and posts per-mode
results comments

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 14:16:31 +00:00
Neha PandClaude Opus 4.7 10412e91ea ci: add query-agent SQL regression workflow (#12749)
## Summary

Adds a standalone workflow that runs the 672-query SQL regression suite
on-demand against a live OpenObserve instance. Triggered by
`/query-agent` PR comment or manual `workflow_dispatch`.

## How it works

```
/query-agent PR comment (or manual dispatch)
  │
  ├── Job 1: Triage
  │     - Allowlist gate (same engineering team list as council)
  │     - Resolve PR number from comment or dispatch input
  │     - Fetch PR diff, grep for query-engine paths
  │     - Post decision comment (skip/run/dry-run)
  │
  └── Job 2: Run tests (if not skipped + not dry-run)
        - Build OO debug binary (nightly-2026-05-20, mimalloc)
        - Setup Python 3.11 + rye
        - Run compute_counts.py to regenerate expected values
        - Start OO server with ZO_MAX_FILE_RETENTION_TIME=1
        - Run pytest tests/query_agent/ (excluding test_3_vortex.py)
        - Post pass/fail comment on PR
```

## Details

- **Trigger**: Exact `/query-agent` comment on a PR (not `contains`), or
manual dispatch with `pr_number`
- **Runner**: `ubicloud-standard-4` (matches api-testing.yml)
- **Timeout**: triage 10 min, tests 60 min
- **Concurrency**: one run per PR, cancel-in-progress
- **Artifacts**: server logs + pytest logs uploaded on failure, JUnit
XML always

## Test plan
- [ ] Merge to main first (required for comment triggers to take effect)
- [ ] Comment `/query-agent` on a PR with query-engine changes →
workflow runs
- [ ] Comment `/query-agent` on a PR with docs-only changes → triage
skips
- [ ] Non-allowlist user comments `/query-agent` → no reaction
- [ ] Manual dispatch with `dry_run=true` → triage only, no tests

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

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 11:15:45 +00:00
ktx-vaidehi f1913e6d97 test: form e2e (#12632) 2026-06-17 11:52:13 +00:00
4f3c0fcba3 fix(tests): verify match_all FTS result correctness and enforce Tantivy readiness (#12717)
## Summary

Fixes a test gap where `match_all` Tantivy queries could return wrong
results after a DataFusion upgrade without being caught by existing
assertions.

### Problem

After a DataFusion upgrade merge, the DataFusion access plan was no
longer used for `match_all` queries, causing Tantivy to return wrong
results. The existing tests only compared row counts against a DuckDB
oracle that emulates `match_all` with `LIKE '%term%'` — so wrong rows
that still matched the LIKE pattern passed undetected.

Additionally, `node/flush` does not generate Tantivy indexes
immediately. The default `ZO_MAX_FILE_RETENTION_TIME=600s` means
WAL→parquet→Tantivy conversion can lag, so FTS queries may fall back to
a non-Tantivy path during tests.

### Changes

1. **Content verification**
([conftest.py](tests/api-testing/tests/query_agent/conftest.py)): Every
hit from a `match_all` query that returns the `log` field is now checked
— each search term word must be present in `log`. A hard assertion fails
if Tantivy returns rows that don't contain the search terms.

2. **Tantivy readiness gate**
([test_2_parquet.py](tests/api-testing/tests/query_agent/test_2_parquet.py)):
After `node/flush`, the test now polls with a `match_all('warehouse')
LIMIT 1` query (up to 120s timeout) to confirm Tantivy indexes are built
before running FTS assertions. Previously only COUNT(*) was checked.

3. **Multi-word match_all emulation**
([compute_counts.py](tests/test-data/query-agent/compute_counts.py)):
`match_all('ACK batch')` now translates to `(log LIKE '%ACK%' AND log
LIKE '%batch%')` — per-token AND conditions matching Tantivy's
token-level search semantics, instead of the old phrase match `log LIKE
'%ACK batch%'`.

4. **Regenerated expected results** across all query JSON files.

## Test plan

- [ ] Run query agent test suite against an environment with Tantivy
enabled
- [ ] Verify `match_all` content assertions catch intentionally
corrupted results
- [ ] Confirm post-flush Tantivy readiness poll works within the timeout

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Huaijin <haohuaijin@gmail.com>
2026-06-17 08:30:33 +00:00
ktx-akshayandAbhay Padamani bc5303eb54 test(logs): add SQL queries test cases for inline comments handling (#12663)
## Summary

- Add E2E test coverage for SQL queries containing `--` inline comments
in the Logs search page
- Fix verified: queries like `-- comment\nSELECT _timestamp FROM stream`
no longer produce `SQL ParserError("Expected: end of statement, found:
_timestamp")`
- Add two reusable page object methods to `logsPage.js` for asserting
SQL error state

## What Was Broken

SQL queries with `--` style comments followed by a `SELECT` statement
were failing with:
> `SQL error: ParserError("Expected: end of statement, found: _timestamp
at Line: 1, Column: 45")`

The parser was not stripping comment lines before executing the query,
causing it to misread the `SELECT` column list as a second statement.

## Test Scenarios Covered

| # | Scenario | Tag |
|---|----------|-----|
| 1 | Single-line comment before SELECT | `@P0 @smoke` |
| 2 | Multiple comment lines before SELECT | `@P1` |
| 3 | Inline comment at end of a line (`SELECT ... -- comment`) | `@P1`
|
| 4 | Comment in the middle of a multi-line SQL query | `@P1` |
| 5 | Comment + WHERE clause using `str_match_ignore_case` | `@P1` |
| 6 | Comment-only query — must NOT produce `_timestamp` parser error
(edge case) | `@P2` |

## Files Changed

-
`tests/ui-testing/playwright-tests/Logs/logsqueries.sql-comments.spec.js`
← new spec file
- `tests/ui-testing/pages/logsPages/logsPage.js` ← two new assertion
methods added
- `.github/workflows/playwright.yml` ← spec registered in CI pipeline

---------

Co-authored-by: Abhay Padamani <141122205+ktx-abhay@users.noreply.github.com>
2026-06-17 07:17:38 +00:00
Shrinath RaoandClaude Opus 4.8 3dceaa1d91 ci(e2e-council): ENT sister flow — validate generated specs on the enterprise build (#12716)
## What & why

Every OpenObserve Playwright spec also runs on the **enterprise** binary
— ENT CI tree-merges OSS in via a *branch-of-same-name* lookup
(`o2-enterprise/.github/workflows/playwright.yml` → "Determine OSS
Branch"). So a council-generated spec isn't fully validated until it
passes on enterprise too.

This adds an **always-on Job 6 (`ent_sister`)** that runs after
`pr_back`, reusing the same `autoe2e/pr-<n>` branch name so ENT CI
auto-pulls the generated spec.

## Two cases (decided in design)

| Situation | Action |
|---|---|
| Spec **not yet** in ENT `run_files` | **Case 1:** register it in the
matching ENT group on a new ENT branch `autoe2e/pr-<n>`, open a
**non-blocking** ENT PR, cross-link on the OSS source + test PRs. ENT CI
pulls the same-named OSS branch and runs the new spec on enterprise. |
| Spec **already** in ENT `run_files` | **Case 2:** no PR —
`workflow_dispatch` ENT's `playwright.yml` with
`o2_opensource_repo=autoe2e/pr-<n>`; post the run link on the OSS PR. |

The case is decided by checking the spec filename against ENT's
`run_files` (more robust than new-vs-modified — also catches a modified
OSS spec ENT never ran).

## Decisions baked in

- **No merge gate** — we *link*, we don't block (per the agreed design).
Merge or close the ENT PR once enterprise CI is green.
- **Always on** — there's no OSS-only spec; everything must validate on
enterprise.
- **Async** — ENT builds take ~20–30 min, too long to hold a job, so v1
posts the PR/run **link** and a human confirms green (polling can come
later).
- **Group mapping** — uses the OSS registration group (ENT mirrors the
names); falls back to the spec's folder, then `GeneralTests` with a
warning.

## Security

Like `pr_back`, this job **never checks out or runs PR code** — pure
GitHub API + the trusted `generate` artifact. `ORG_ADMIN_TOKEN`
(cross-repo Contents+PR+Actions write) stays isolated to jobs that don't
build/run untrusted code.

## Notes / to verify on first live run

- Reuses `ORG_ADMIN_TOKEN` for `o2-enterprise` — the job fails fast with
a clear message if the token can't reach the ENT repo.
- Whole-suite cost: any ENT validation (PR or dispatch) runs ENT's full
Playwright matrix — inherent to ENT CI, not a choice.
- Stacked behind #12700 (merged-PR detection / cap-6) — rebase if that
lands first.

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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 05:44:19 +00:00
Shrinath RaoandClaude Opus 4.8 74c98c45a9 ci(test): reliable healer (no /tmp) + fresh-context heal loop + merged-PR input (#12700)
Heal-loop robustness + merged-PR input for the e2e-council pipeline
(found while testing on a real merged Metrics PR).

## 1. Healer `/tmp` reliability fix
The Healer sometimes emitted `mkdir -p /tmp/heal-logs && … | tee
/tmp/heal-logs/…`. OpenCode's sandbox **auto-rejects creating dirs
outside the workspace** (`permission … external_directory (/tmp/*);
auto-rejecting`) → that command failed → heal silently did nothing.

It's **intermittent** (LLM non-determinism — only when it reaches for a
new `/tmp` dir; a plain `tee /tmp/file` often slipped through), which is
why most runs still healed fine and one real feature didn't. **Fix:**
the Healer never touches `/tmp` — runs plainly (stdout captured) or
writes scratch *inside the repo*. Now reliable regardless of the command
it emits.

## 2. Fresh-context heal loop (retry a stuck heal with a clean slate)
Instead of one agent grinding many internal iterations (and exhausting
its context), the heal step loops **up to 3 fresh Healer invocations**:
- each does ≤3 internal iterations;
- if it can't get the spec passing, it **appends what it tried** to
`heal-notes.md` and stops;
- a **fresh-context** Healer reads those notes and tries a *different*
approach.
- stop on pass, or after 3 fresh contexts. The authoritative run stays
the real gate.

(A stuck context usually just needs a clean slate, not more grinding —
so this beats both "loop forever in one context" and "hard-stop on no
progress".)

## 3. Accept an already-merged PR as input
A dispatch / `/e2e` on an already-merged PR used to base the test PR on
the deleted feature branch → `pr_back` failed. Now merged-mode keys on
the PR's actual state (`data.merged`, guarded by `state==='closed'`) →
base = `main` + merge-commit checkout. Lets you backfill tests for
merged features.

(Heal step timeout 30→40m, job backstop 90→100m to fit the deeper loop.)

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 04:26:14 +00:00
Shrinath Raoandgithub-actions[bot] 90a08f28c3 test(autoe2e): generated E2E tests for #12607 (metrics-share-deep-link) (#12706)
🤖 Auto-generated E2E tests for #12607 — **healed to passing** against a
live OpenObserve before this PR was opened.

- Branch `autoe2e/pr-12607` (stacked on `main`), so the tests run
against the feature code and pass before it merges.
- Spec:
`tests/ui-testing/playwright-tests/Metrics/metrics-share-deep-link.spec.js`

The repo Playwright CI re-validates here. Review is for **quality +
coverage** — the tests already pass.

_Generated by the E2E Council pipeline._


**Test cases added / changed:**

| Test case | Type | What it verifies |
|---|---|---|
| `Default state — page loads with defaults, no auto-run` | new |
metrics page loads with default config, no metrics_data blob in URL, and
core UI elements visible |
| `Deep-link with bad metrics_data blob falls back to defaults` | new |
corrupt base64 blob does not crash the page — falls back silently to
default panel state |
| `Deep-link with unknown version blob falls back to defaults` | new |
blob with version 9999 is ignored and page shows default panel
configuration |
| `Deep-link with override params only builds panel from scratch` | new
| chart_type and query override params configure the panel without a
metrics_data blob |
| `URL syncs metrics_data blob after manual query and Apply` | new |
running a query adds a valid metrics_data blob to the URL with correct
version |
| `metrics_data blob excludes volatile data (id, title, description)` |
new | decoded blob does not contain id, title, or description keys |
| `Deep-link restores absolute from/to time range` | new | deep-link
with explicit from/to unix timestamps restores the time range correctly
|
| `Deep-link restores relative time period (period param wins)` | new |
period param takes precedence over from/to and restores relative time
range |
| `Share button disabled state — detects when web_url is not configured`
| new | share button is visible but disabled when web_url is not set |
| `Share button copies shortened URL to clipboard` | new | clicking
share generates a short URL containing /short/ and copies it to
clipboard with success toast |
| `Share button shows loading state during API call` | new | share
button enters loading spinner state during API call and clears after
completion |
| `Deep-link blob restore auto-runs query on mount` | new | valid
metrics_data blob restores panel config and auto-executes query without
manual Apply |
| `Deep-link restores auto-refresh interval` | new | refresh=30s param
sets the auto-refresh interval on the page |
| `Deep-link without stream — query populated, no stream selected` | new
| a deep-link with query but no stream_name does not crash the page |
| `Share URL contains absolute from/to timestamps, not period` | new |
shared URL freezes time to absolute from/to seconds, not relative period
|

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-16 16:56:03 +00:00
Neha PandClaude Opus 4.7 85a0e8d8a7 test: restructure RegressionSet/ into feature subdirectories (#12664)
## Summary
- Moves 17 spec files from flat `RegressionSet/` into 8 feature folders:
Alerts, Dashboards, General, Logs, Metrics, Pipelines, Streams, Traces
- Merges `logs-regression-bugs-2.spec.js` (9 tests) into
`Logs/logs-bugs.spec.js` (36 tests total), removing the duplicate file
- Drops the redundant `-regression` suffix from filenames (e.g.,
`alerts-regression-bugs.spec.js` → `alerts-bugs.spec.js`)
- Updates `.github/workflows/playwright_regression.yml` matrix with new
subdirectory paths
- Adds missing `logs-ent.spec.js` and `traces-ent.spec.js` to CI shards

## Test plan
- [ ] CI: Logs-Regression shard runs all 5 Logs files (merged bugs file
+ ent)
- [ ] CI: All 8 shards resolve correct file paths under
`RegressionSet/<Feature>/`
- [ ] No file references the deleted `logs-regression-bugs-2.spec.js`

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-16 11:21:46 +00:00
Shrinath RaoandClaude Opus 4.8 cf3ccfbf38 ci(test): fix e2e-council reuse detection (source-sha across commits, not just HEAD) (#12695)
**Bug:** reuse never fired after a healed run, so clobber-off re-runs
needlessly **rebuilt** (force-pushed over the prior healed tests + the
playwright.yml registration), and the regenerated tests sometimes failed
heal → `pr_back`/`review_address` skipped → the test PR looked
"reverted".

**Cause:** the `e2e-source-sha` trailer is written **only on the
generate commit**, but heal + review-address commits sit *on top* of it
without the trailer. Triage read the trailer from the **branch HEAD
only** → `storedSha` empty → "feature changed" → `reuse=false`.

**Fix:** scan the last 30 commits of the branch (newest first) for the
most recent `e2e-source-sha` trailer. Now an unchanged-feature re-run
with `force_overwrite` off correctly **reuses** (extend / leave-alone)
instead of rebuilding.

Found via run 27605717167 on PR #12690.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 11:17:23 +00:00
Shrinath RaoandClaude Opus 4.8 93d5e5b90d ci(test): e2e-council enrichment — summary table, auto-review, + CLA bot-identity fix (#12684)
Post-PR "enrichment" follow-ups for the E2E test bot, plus a CLA fix.
(Was stacked on #12682; rebased onto `main` after that merged.)

## What this adds

**1. Test-case summary table**
When the test PR opens, the bot posts a **table of the test cases it
added/changed** — in the test PR body *and* the "E2E Council" comment on
the source PR:

| Test case | Type | What it verifies |
|---|---|---|
| `should …` | new / append / extend | one-line intent |

(Engineer emits `test-summary.json`; `pr_back` renders it. No table when
there's nothing to add.)

**2. Auto-address the AI review (OFF by default)**
New final job `review_address`, gated by repo variable
**`E2E_AUTO_REVIEW`** (default off). After the test PR opens it waits ~6
min for the repo's AI review, then a **conservative "Responder" agent**:
- **validates** each finding (the bot is noisy — default is to *not*
change code),
- fixes **only clearly-valid** ones in `tests/ui-testing` (never
`.github` / `.opencode` / `playwright.yml` / source),
- pushes tests-only fixes (the repo's Playwright CI re-validates the
PR),
- posts a rationale on the test PR and minimizes the bot comment.

One bounded pass. Scoped `GITHUB_TOKEN` only. **To enable:** create repo
variable `E2E_AUTO_REVIEW=true`.

**3. CLA fix — commit as `github-actions[bot]`**
The pipeline previously committed generated tests as `openobserve-bot
<bot@openobserve.ai>`, which isn't a GitHub account → CLA assistant
couldn't match/sign it and blocked the test PR. Now it commits as the
canonical **`github-actions[bot]`** identity (a real bot account GitHub
resolves via its noreply email), across generate + verify_heal +
review_address.
> **Admin action:** allowlist `github-actions[bot]` in CLA assistant,
then `recheck`.

---

<details>
<summary>Design notes</summary>

- Responder is deliberately conservative: a wrong "fix" that breaks a
passing test is worse than leaving a nitpick. It dismisses
stale/incorrect/style findings.
- Both auto-features are flag-gated OFF (same posture as
`E2E_AUTO_ON_MERGE`) — auto-acting warrants opt-in.
- No heavy re-build in `review_address`; the repo's existing Playwright
CI re-validates the pushed fix.
- CodeQL untrusted-checkout on the new `review_address` checkout (#416)
dismissed — same allowlist false positive as prior PRs.

</details>

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 05:46:08 +00:00
Shrinath RaoandClaude Opus 4.8 5c286261e2 ci(test): smarter E2E test bot — /e2e commands, auto-assign, and reuse/extend existing tests (#12682)
This PR makes the automated E2E test bot **smarter and easier to use**.
In short: clearer commands, the test PR gets assigned to the right
people automatically, and the bot now **understands tests that already
exist** — it extends them, leaves them alone, or adds new ones, instead
of always starting from scratch.

---

## What changed (plain English)

**1. Two clear commands on a PR**
- `/e2e` → does the whole thing: writes/updates tests, runs & fixes
them, opens a test PR.
- `/e2e-dryrun` → just tells you what it *would* do (no tests, no PR).

**2. The test PR is auto-assigned**
- Assigned to (and review-requested from) the **original feature
developer + Neha + Shrinath**.

**3. It understands existing tests (the big one)**
- Before writing anything it looks at the tests that already exist and
picks the smartest move: **extend** an existing test, **add** one to an
existing file, **create** a new file, or **leave them alone** if they
already cover the change (it posts an "already covered ✅" note instead
of making noise).
- If the developer wrote tests in their own PR, it reads and improves
them instead of ignoring them.

**4. Re-running is smart and safe**
- Running `/e2e` again on a PR **reuses** the existing tests and only
updates what's needed — **unless the feature changed** since last time,
in which case it rebuilds against the latest code. So your manual tweaks
survive, and tests never get extended against stale code.
- Each PR's tests live on a branch tied to the **PR number**, so
renaming your feature branch never confuses the bot.
- (Manual dispatch still has an "overwrite" checkbox to force a clean
rebuild.)

**5. Auto-run on merge — built but switched OFF**
- Later, merging a PR can auto-trigger test generation. It's **off by
default** (`E2E_AUTO_ON_MERGE`) and does nothing until someone turns it
on.

---

<details>
<summary><b>📖 In-depth technical details (for reviewers — click to
expand)</b></summary>

### Triggers
Three entry points, all PR-bound: `/e2e` (full) & `/e2e-dryrun` (triage)
comments, manual `workflow_dispatch` (`pr_number` +
`dry_run`/`force_overwrite` inputs), and `pull_request:[closed]` on
`main` (auto-on-merge, **off** unless `vars.E2E_AUTO_ON_MERGE ==
'true'`). All gated on the engineering allowlist (trigger actor) +
PR-author allowlist (generation). Per-PR `concurrency` group serializes
runs. Comment body is read via env and compared in-shell (no injection
sink).

### Auto-assign
After `pr_back` opens/refreshes the test PR, it assigns + requests
review from `author` + `neha00290` + `Shrinath-O2`, per-user
`if/then/else` so a self/permission edge never fails the job.

### Increment-awareness
- **Triage:** dev-authored tests are no longer auto-skipped
(`existing_tests_in_diff:true` → *enhance*); explicit `tests-added`
label / `skip` comment still wins.
- **Architect coverage-scan:** reads candidate specs (area + keyword)
and the dev's own test changes, then writes `coverage-decision.json`
with `action` = `none` | `extend` | `append` | `new`, `target_spec`,
`needs_registration` (true only for `new`). `action` is normalized +
validated in the workflow.
- **Engineer:** `none` → write nothing; `append`/`extend` → surgical
minimal edit to the existing `target_spec` (other tests untouched,
parallel mode preserved, selectors in page objects), no registration;
`new` → new spec + registration.
- **Wiring:** verify_heal resolves the spec from
`coverage-decision.target_spec`; hand-off validation requires
registration only for `new`; pr_back registration treats a missing
registration file as "already registered."

### Identity, reuse & change detection
- **Branch:** `autoe2e/pr-<number>` (both modes) — rename-proof. Base =
feature branch (open) / `main` (merged).
- **`source_sha` trailer:** generate records `e2e-source-sha: <feature
commit>` in the commit (survives the hand-off strip).
- **Reuse decision (triage):** dispatch honours `force_overwrite`
(default rebuild, untick = reuse); comment/auto-on-merge **default to
reuse**. Reuse happens only when the branch exists **and** the feature
SHA is unchanged vs the stored trailer — otherwise rebuild fresh against
the latest commit (no stale-code extension). In reuse mode generate
checks out the existing branch so the coverage-scan sees prior tests.
- **Leave-alone / no-op:** generate emits `has_changes`; on
`none`/no-diff it posts "already covered ✅" and `verify_heal` +
`pr_back` are skipped (no wasted build/PR).

### Hand-off strip (clean PR)
generate commits the scratch hand-off so verify_heal is self-contained;
verify_heal strips it (`git rm --cached`) before the PR → the test PR
diff and main only ever contain tests. (Squash-merge keeps history clean
too.)

### Auto-on-merge (Trigger 3) — OFF
`pull_request:[closed]` on `main`, gated by `merged==true` +
`vars.E2E_AUTO_ON_MERGE`. Merged mode checks out the merge commit, bases
the test PR on `main`, runs full. Enable via repo variable
`E2E_AUTO_ON_MERGE=true`. ⚠️ This generates a test PR for (potentially)
every merged PR — only enable with review capacity.

### Security
External attacker has no path (actor + author allowlists).
`ORG_ADMIN_TOKEN` (workflow-write) is isolated to `pr_back` (no PR-code
checkout); generate/verify_heal use the scoped `GITHUB_TOKEN`. Spec path
is regex-validated **and** rejects `..`. LLM-written `feature_slug` and
coverage `action` are sanitized/validated before use.

### Not yet validated live
Batches B/C haven't run in a real pipeline yet — a dispatch (or merging
this so the `/e2e` paths activate on `main`) is the next validation
step.

</details>

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 04:26:11 +00:00
Shrinath RaoandClaude Opus 4.8 d79767029d ci(e2e-council): get Jobs 2–4 (generate → heal → PR-back) working end-to-end (#12674)
This PR began as the self-correcting Sentinel fix and grew into **the
bundle that gets Jobs 2–4 (generate → verify/heal → PR-back) actually
working end-to-end**. Each item below was found by a real
`dry_run=false` shakedown run.

## 1. Self-correcting Sentinel loop (don't hard-stop)
The first shakedown hard-stopped when Sentinel flagged 3 critical issues
— no branch, no PR. Wrong behavior: the pipeline should **fix and
continue**.
- Job 2's hard gate → a **fix-and-re-audit loop**: Sentinel audits → if
not clean, the Engineer fixes the findings → re-audit → repeat up to
`FIX_ATTEMPTS` (3) → only stop+report if *still* not clean.
- The deterministic workflow owns the verdict (Sentinel audits, Engineer
fixes — the LLM never self-certifies).
- **Engineer pre-compliance:** a MANDATORY Sentinel-compliance checklist
in `e2e-ci-engineer.md` mirroring Sentinel's critical checks, so
first-pass output usually passes (fewer iterations).

## 2. verify/heal made real
- **OpenCode is installed in `verify_heal`** — it's a separate
job/runner from generate, and without it the healer **and** post-heal
Sentinel died with `opencode: command not found` (so zero healing
happened, then the raw spec failed).
- **Post-heal Sentinel re-audit is advisory** (`continue-on-error`, only
when the final run already passed) — the authoritative final run is the
sole pass/fail gate, so the audit can never abort a green heal.
- **Accurate heal-failure root cause:** the source-PR comment now
distinguishes build / boot / test-env / spec-resolve / heal-timeout /
still-failing (was a useless generic fallback).

## 3. Self-contained hand-off (and a clean merge to main)
- generate force-commits the hand-off (`docs/test_generator/ci/`) onto
the `autoe2e` branch, so `verify_heal` reads it from the checkout — **no
artifact dependency** (kills the artifact-structure bug that broke an
earlier run).
- `verify_heal` **strips the hand-off** (`git rm --cached`) before
pushing healed tests → branch tip is tests-only → since the repo
squash-merges, the PR diff and **main never carry it**.
- Artifact upload reverted to a single deterministic path; debug reports
moved to a separate non-consumed artifact.

## 4. Fully-parallel generated tests
- Engineer now emits `test.describe.configure({ mode: 'parallel' })`
(was `serial`) + a hard rule that every test is independent (own setup,
unique fixtures) so `--workers=4` actually spreads the load.
- Healer runs `--workers=4` and must **preserve** parallel mode
(switching to serial is a last resort with a stated reason, not a quick
fix).

## 5. Testability + control
- **Agents restored from the triggering ref** on `workflow_dispatch`
(trusted: write-access + allowlisted), from main on the `/e2e` comment
path. Lets pipeline/agent changes be tested from a branch **without
merging to main first**.
- **`force_overwrite` dispatch flag** (default true = clobber the
`autoe2e` branch; untick to protect an existing/hand-edited branch).

## 6. Permissions + security fixes from the shakedowns
- `generate` + `verify_heal` got `pull-requests: write` (PR comments
403'd with `issues: write` alone).
- playwright.yml registration moved to `pr_back` (GITHUB_TOKEN can't
push workflow files) and done via the **Contents API with no PR-code
checkout** (closes the untrusted-checkout finding); ORG_ADMIN_TOKEN
stays isolated to `pr_back`, which never builds/runs PR code.
- Triage-comment rationale cap raised (was truncating at 600 chars).

Scope: **OpenCode agents + this workflow only** — the Claude slash
commands are unchanged (later).

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 17:47:09 +00:00
Neha PandClaude Opus 4.7 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>
2026-06-15 17:41:45 +00:00
Shrinath RaoandClaude Opus 4.8 ad1c7444c6 ci(e2e-council): full generate → heal → PR pipeline (Jobs 2–4) + allowlist gating (#12667)
Follow-up to #12657. Builds out the **entire generation pipeline** (Jobs
2–4) plus access control and failure handling. Everything still runs
only with `dry_run=false`, so dry-run/triage behavior is unchanged.

## The full flow (dry_run=false)
`/e2e` or dispatch → **triage** → **generate** → **verify/heal (heavy)**
→ **open test PR** — the PR only ever contains **working, healed
tests**, so review is about quality + coverage, not debugging.

## Access control (allowlist)
- **Trigger gate:** only the engineering-team allowlist (mirrors
`auto-assign-metadata.yml`) can start a run.
- **PR-author gate:** generation only runs when the **PR author** is
also on the allowlist. A stranger's PR short-circuits the whole AI path
in triage (no DeepSeek call) → just a "skipped, external" comment.

## Job 2 — generate
Analyst → Architect → Engineer → Sentinel. Checkout is **SHA-pinned +
`persist-credentials:false`**; pipeline files
(`.opencode`/`opencode.jsonc`) restored from trusted `main`
(anti-hijack). **Hand-off validation gate** confirms each agent wrote
its artifact (spec + registration) and fails fast with a clear message
otherwise. Sentinel verdict is **fail-closed**. A **deterministic,
non-LLM** step (`yq`) registers the spec in `playwright.yml`, creates
**`autoe2e/<orig-branch>`** stacked on the dev's branch, commits, and
force-pushes (idempotent re-runs). **No PR yet.**

## Job 3 — verify/heal (HEAVY)
On `ubicloud-standard-16`, mirrors `playwright.yml`: builds + boots a
**real OpenObserve**, runs **only the generated spec** (`--workers=4`),
runs the Healer to fix it, then an **authoritative final run decides
pass/fail (not the LLM)**, Sentinel re-audits, pushes fixes. **Loop
gating:** hard `timeout-minutes: 30` on the heal step +
`continue-on-error` (a hung healer is killed and the pipeline proceeds
to the final run → fails → no PR), job backstop 90 min.

## Job 4 — open the test PR
Opens the stacked test PR **only if healed (passing)**, via
**`ORG_ADMIN_TOKEN`** so the repo's existing `playwright.yml`
re-validates it (a `GITHUB_TOKEN`-created PR wouldn't trigger CI).
Sticky comment links the test PR on the source PR.

## Failure handling (never silent, never junk)
Any failure is reported **on the source PR by the job where it
happens**, with a root cause + run link:
- **generate** → agent error / broken hand-off / Sentinel block.
- **verify/heal** → build failed / boot failed / **healer timed out
(hung)** / still-failing after retries.
No PR is opened on failure — only a comment — so the PR never carries
broken tests, and the dev is always notified.

## Security / CodeQL
SHA-pinned + no-persisted-creds checkouts, allowlist on trigger +
author, anti-hijack config restore, deterministic `playwright.yml` edit,
and untrusted paths passed via `env:` (no `${{ }}` in shell). CodeQL on
this PR: **4 code-injection FIXED**, **3 untrusted-checkout DISMISSED**
(allowlist-author false positive — generation runs only on
trusted-teammate code, dispatch-only). Note: each push shifts lines, so
CodeQL may re-raise the same toctou under new alert numbers — dismiss
with the same justification.

## Status
- ✅ All 4 jobs implemented + gating + failure handling.
- ⚠️ **Untested end-to-end** — Jobs 2–4 only run on a real
`dry_run=false` dispatch; the first live run is the shakedown.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 13:46:41 +00:00
Neha PandClaude Opus 4.7 291903345e test: add E2E regression tests for 10 Needs-Automation issues (#12111)
## Summary

Adds Playwright E2E regression tests for **10 closed `Needs-Automation`
issues** across alerts, logs, pipelines, data sources, landing page, and
reports. This is Batch 1 of 3.

All tests pass against the dev environment
(`https://dev.o2aks1.internal.zinclabs.dev`).

## New Spec Files

| File | Issue | Description |
|------|-------|-------------|
| `datasources-regression.spec.js` |
[#11682](https://github.com/openobserve/openobserve/issues/11682) | AI
integration credentials persist on tab re-click |
| `landing-regression.spec.js` |
[#11604](https://github.com/openobserve/openobserve/issues/11604) |
Slack button opens functional page (not blank) |
| `reports-regression-bugs.spec.js` |
[#11231](https://github.com/openobserve/openobserve/issues/11231) |
Report timestamp not shifted by timezone on save |

## Tests Added to Existing Files

| File | Issue | Description |
|------|-------|-------------|
| `alerts-regression-bugs.spec.js` |
[#11315](https://github.com/openobserve/openobserve/issues/11315) | Bulk
alert import dialog opens without premature errors |
| `alerts-regression-bugs.spec.js` |
[#4342](https://github.com/openobserve/openobserve/issues/4342) | Alert
name with special characters `#`, `%`, `:` works |
| `alerts-regression-bugs.spec.js` |
[#4288](https://github.com/openobserve/openobserve/issues/4288) | SQL
`default` keyword without quotes works in alerts |
| `logs-regression-bugs.spec.js` |
[#10103](https://github.com/openobserve/openobserve/issues/10103) |
Explain Query close does not break results |
| `logs-regression-bugs.spec.js` |
[#8641](https://github.com/openobserve/openobserve/issues/8641) |
Non-SQL multi-stream query works without error |
| `logs-regression-bugs.spec.js` |
[#5839](https://github.com/openobserve/openobserve/issues/5839) | Shared
logs page displays searchbar correctly |
| `pipeline-regression.spec.js` |
[#11483](https://github.com/openobserve/openobserve/issues/11483) | No
duplicate notifications on pipeline destination save |
| `pipeline-regression.spec.js` |
[#11267](https://github.com/openobserve/openobserve/issues/11267) |
Evaluation template has proper UI styling |

## Removed

- `traces-regression-bugs.spec.js`: removed 4 skipped tests for features
unavailable in the dev environment
([#11392](https://github.com/openobserve/openobserve/issues/11392),
[#11318](https://github.com/openobserve/openobserve/issues/11318),
[#11280](https://github.com/openobserve/openobserve/issues/11280),
[#11590](https://github.com/openobserve/openobserve/issues/11590))

## POM Changes

- `logsPage.js`: added `clickExplainQuery()` method (reuses existing
`clickMoreOptionsButton()`)

## CI

- `playwright_regression.yml`: added `DataSources-Regression` and
`Reports-Regression` shards; added `landing-regression.spec.js` to
`GeneralTests-Regression`

## Framework Compliance

- All tests use PageManager via POM methods (no raw
`page.locator('[data-test=...]')` for interactions)
- All tests use `expect()` assertions (no conditional `test.skip()` for
false positives)
- All describe blocks have `beforeEach`/`afterEach` with structured
logging
- All tests tagged with `@bug-XXXXX`, `@P1`/`@P2`/`@P3`, `@regression`

## Test Plan

- [x] All 10 tests pass individually against dev environment
- [x] No framework violations (POM-first, no conditional skips)
- [ ] CI run on this PR

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 10:12:52 +00:00
Shrinath RaoandClaude Opus 4.8 7655dfb67b ci: e2e-council pre-use hardening (PR-bound trigger, agent-discovery fix, live feedback, exact /e2e) (#12657)
## Summary

Follow-up to #12652 that makes the **E2E Council** workflow correct and
pleasant for real use, after the first live dry-run triages exposed
gaps. v1 scope is unchanged: **OSS-only, manual-first, dry-run** (only
Job 1 triage runs; Jobs 2–4 are gated scaffolds).

## Changes

**Trigger is strictly PR-bound**
- Removed the free-form `oss_branch` input (it let you generate tests
detached from a PR, and dispatching from `main` diffed
main-against-itself = nothing).
- `pr_number` is now **required** for manual dispatch and accepts a
**number, `#123`, or a full PR URL** (normalized to an integer).
- A test is only ever generated for a PR. No PR ⇒ no run (empty/missing
diff fails fast with a clear message).

**`/e2e` is an exact match**
- Triggers only when the comment body is exactly `/e2e`. `Generate
/e2e`, `/e2e please`, etc. do **not** fire anything (the job's `if` is
false → no reaction, no comment, no run).

**Agent discovery fixed (the important one)**
- The first live run logged `agent "e2e-ci-triage" not found. Falling
back to default agent` — OpenCode does not auto-discover agents nested
under `.opencode/agents/<subdir>/`. It only worked by luck (the default
agent read the spec file).
- Fixed by registering all six agents in `opencode.jsonc` under the
`agent` key with `prompt: "{file:...}"`. **Confirmed working** on the
next run (`> e2e-ci-triage · deepseek-v4-pro`, no fallback).

**Immediate user feedback on a run**
- Posts a 👀 reaction on the `/e2e` comment and an "⏳ triage in
progress…" comment within seconds, then **edits that same comment in
place** with the decision (no second comment). Runs with `always()` so a
failed/empty run still updates it (never stuck on "in progress").

**Form/docs polish**
- Decluttered the Run-workflow form (short input labels; full guidance
lives in the workflow header).

## Verified live (dry-run triages on this PR)
- OpenCode installs (v1.17.7); DeepSeek model `deepseek/deepseek-v4-pro`
works.
- Secure path confirmed: PR read as a **diff via API**, no untrusted
PR-head checkout.
- Triage decisions correct + conservative (CI-only change → skip).
- Agent discovery fix confirmed (named agent loads as the system
prompt).

## Not in scope (still scaffolds)
Jobs 2–4 (generate → heal → PR-back). Build those once the triage gate
is trusted over a dry-run period.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 09:41:01 +00:00
Shrinath RaoandClaude Sonnet 4.6 e38586b0ce ci: assign stranger issues to simran only (#12648)
## Summary
- Changes the stranger-issue triage in `auto-assign-metadata` to assign
**only `simranquirky`**, replacing the previous `Shrinath-O2` +
`Manazsharma` + `neha00290` set
- Stranger **PR** assignment (`oasisk` + `hengfeiyang`) is unchanged

## Test plan
- [ ] Open an issue as an external contributor → verify only
`simranquirky` is assigned

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

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 07:24:15 +00:00
Shrinath RaoandClaude Opus 4.8 efd00ca128 ci: add e2e_ci_council_of_agents triage pipeline (dry-run, manual-first) (#12652)
## What this adds

A CI-side **E2E test-generation pipeline** (Council of Agents) that runs
in GitHub Actions via **OpenCode on DeepSeek-V4-Pro**, fronting the
existing Playwright + TestDino CI.

**v1 scope: OSS-only, manual-first, dry-run.** On this first cut the
workflow does **only triage** — it classifies a change and posts the
decision as a PR comment. It does **not** generate tests, edit
`playwright.yml`, run anything, or open PRs.

## Files
- `.opencode/agents/e2e_ci_council_of_agents/` — 6 CI-adjusted agents
(triage, analyst, architect, engineer, sentinel, healer) + README.
`mode: primary`, file-based handoff, non-interactive. Engineer also
gains `playwright.yml` registration. Scribe excluded; ENT skipped at
triage.
- `opencode.jsonc` — DeepSeek provider.
- `.github/workflows/e2e-council.yml` — Job 1 (triage + dry-run comment)
is **live**; Jobs 2–4 (generate / heal / PR-back) are **gated
scaffolds** for when we flip the switch.
- `.gitignore` — track only the CI agent folder under `.opencode`.

## Triggers
- `workflow_dispatch` (pick branch) and `/e2e` comment on a PR.
Auto-on-merge is **off**.
- Both read the workflow from the **default branch**, so they only
activate after this merges.

## Before first run
- [ ] Add repo secret **`DEEPSEEK_API_KEY`**.
- [ ] Merge to main.
- [ ] Trigger via Actions → "E2E Council (Test Generation)" → Run, or
`/e2e` on a PR.

## Verify on first run (deferred by design)
- OpenCode install command/version.
- Whether `--agent e2e-ci-*` resolves agents nested under
`.opencode/agents/<subdir>/`.
- DeepSeek model id `deepseek/deepseek-v4-pro`.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 06:10:42 +00:00
3e89667b13 test: add edition-features documentation validation spec (#12573)
## Summary
- Adds a single GeneralTests spec (`edition-features.spec.js`) that
validates the header edition button, the `EnterpriseUpgradeDialog`,
every enterprise feature card, and the `o2.ws/*` documentation links
each card opens.
- Two tests live in the spec; exactly one runs per environment. The
active edition is detected from the rendered header button label (most
direct signal of what the user sees, tolerates frontend/backend
build-flag mismatches like an OSS frontend served by an ENT backend).
- Pairs with the same-named branch on `openobserve/o2-enterprise` so ENT
CI tree-merges this spec in and runs the ENT variant.

## What the spec validates
- Header button label per edition (`Get OpenObserve Enterprise (Free)`
vs `Edition: Enterprise`)
- Hero panel (title, badge, primary button, features title, Learn More
button)
- 20 enterprise feature cards (presence + external-link icon + BETA/HA
badges)
- Cloud-only `Bring Your Own Bucket` card stays hidden outside Cloud
- Every feature card click opens a popup that lands on the expected
`openobserve.ai` doc page
- Hero external link buttons (`Download Now`/`Learn More` on OSS, `Learn
More` on ENT) — `Get Free License` intentionally not clicked because it
switches the active org to the meta org

## Files
-
`tests/ui-testing/playwright-tests/GeneralTests/edition-features.spec.js`
(new)
- `tests/ui-testing/pages/generalPages/editionFeaturesPage.js` (new —
page object + truth table of slugs / expected doc paths)
- `tests/ui-testing/pages/page-manager.js` (register
`pm.editionFeaturesPage`)

## Test plan
- [x] OSS local run: 1 passed, 1 skipped (~2.0m)
- [x] ENT local run: 1 passed, 1 skipped (~2.0m)
- [x] Sentinel audit passed (POM compliance, no raw selectors in spec,
no hardcoded secrets, no console.log)
- [ ] OSS CI green on this PR
- [ ] ENT CI green on companion PR

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-11 01:14:55 +00:00
Abhay PadamaniandHengfei Yang b3393648b4 feat: add environment variable for timechart tab visibility (#12552)
Design At: `ZO_TIMECHART_ENABLED` to enable timechart tab on logs page

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-06-10 12:03:22 +00:00
Shrinath RaoandClaude Sonnet 4.6 10dfb4ceaa ci: auto-assign metadata with team allowlist, start date, and stranger triage (#12543)
## Summary

Extends the `auto-assign-metadata` workflow with three improvements:

- **Creator classification** — a new first step buckets every issue/PR
creator into one of three categories:
- `team` — 23-person engineering allowlist → full workflow runs (assign
self, milestone, add to project, set start date)
- `internal` — other org members not on the allowlist → silently skipped
- `stranger` — not an org member at all → assigned to designated
triagers

- **Start date** — on new issues, captures the project item ID and sets
the `Start Date` field in GitHub Project #19 to today's UTC date via
`updateProjectV2ItemFieldValue`

- **Stranger triage** (OSS only) — issues from external contributors are
assigned to `Shrinath-O2` + `Manazsharma` + `neha00290`; PRs are
assigned to `oasisk` + `hengfeiyang`

### Who gets what

| Category | Members | Issues | PRs |
|---|---|---|---|
| **Engineering team** | `bjp232004` `hengfeiyang` `prabhatsharma`
`uddhavdave` `oasisk` `haohuaijin` `Subhra264` `Loaki07`
`007harshmahajan` `chaitanya-sistla` `ktx-kirtan` `omkarK06`
`ktx-vaidehi` `ktx-abhay` `neha00290` `ktx-akshay` `ktx-sadhna`
`nikhilsaikethe` `YashodhanJoshi1` `ktx-riya` `mmosarafO2` `Shrinath-O2`
`ktx-mihir` | Assign self · milestone · project · start date | Assign
self · milestone · project |
| **Internal — skipped** | `sowjanyapuvvula` `ravenwh` `abvarun226`
`ysantosh` `luckykurhe` `achatterjee4` `akshaye-blip` `Udhankaran`
`jakeopenobserve` `Manazsharma` `manoj0881-git` `gorakhnathy7`
`simranquirky` `roniandgit` `sandydgenius` `javasks` `Yadumathur` | Skip
| Skip |
| **Stranger** | Anyone not in org | Assign `Shrinath-O2` +
`Manazsharma` + `neha00290` | Assign `oasisk` + `hengfeiyang` |

## Test plan
- [ ] Open a new issue as an engineering team member → verify
self-assigned, milestone set, added to project, Start Date populated
- [ ] Open a new issue as a stranger → verify assigned to Shrinath-O2 +
Manazsharma + neha00290 only
- [ ] Open a PR as an engineering team member → verify self-assigned and
milestone set
- [ ] Open a PR as a stranger → verify assigned to oasisk + hengfeiyang
only
- [ ] Open an issue as an internal (skipped) member → verify no changes
made

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 07:01:21 +00:00
Neha PandClaude Opus 4.7 1484f920a9 test: expand query agent suite to 570 queries with production SQL patterns (#12534)
## Summary

- Added **46 new queries** (Q511-Q556) to the query agent regression
suite, bringing the total from 524 to **570 unique queries**
- Mined from real production SQL patterns (june7.sql) and adapted to use
existing test data fields
- Fixed **15 pre-existing duplicate IDs** (Q226-Q240 existed in both
aggregation.json and basic_select.json — renumbered to Q557-Q571)

## New query distribution

| Category | New | Description |
|---|---|---|
| string_functions | +10 | spath() + str_match_ignore_case, split_part()
+ chr(), multi-COALESCE chains, CAST AS VARCHAR |
| histogram | +7 | 30-second/min intervals, COUNT FILTER, SUM(CASE
WHEN), NULL breakdowns |
| date_time | +6 | arrow_cast(), date_trunc(), to_timestamp_micros(),
timestamp arithmetic, LAG for gaps |
| combined | +6 | count(distinct) in CASE WHEN, re_match + re_not_match
combo, FILTER in aggregation, HAVING percentages |
| full_text_search | +5 | re_match + re_not_match, regexp_like,
match_all(), str_match_ignore_case with COALESCE |
| cte_subquery | +4 | CTE with spath, CTE with COALESCE fallbacks,
correlated subquery |
| aggregation | +2 | IS NOT NULL exploration patterns, multi-column
GROUP BY |
| window | +2 | NTILE with COALESCE PARTITION, LAG with delta
calculation |
| basic_select | +2 | Complex COALESCE + CAST chains, NULLS LAST
ordering |
| cross_stream | +1 | LEFT JOIN on dual keys across streams |
| union | +1 | UNION ALL with different metric types |

## New OO-specific functions covered

Four functions previously had **zero test coverage**:
- `chr()` — 1 query (string splitting by character code)
- `arrow_cast()` — 1 query (DataFusion timestamp arithmetic)
- `date_trunc()` — 1 query (minute-level timestamp bucketing)
- `to_timestamp_micros()` — 1 query (microsecond-to-timestamp
conversion)

Plus expanded coverage of rare functions: `spath()` (+3), `split_part()`
(+3).

## Test modes

- **38/46** new queries have full sqllogictest comparison (DuckDB
computed expected results)
- **8/46** use legacy assertions for OO-specific functions that DuckDB
cannot replicate (spath, arrow_cast, date_trunc, to_timestamp_micros)
- Overall suite: **533** sqllogictest, **37** legacy

## Changes

| File | Change |
|---|---|
| `data_gen.py` | `NUM_QUERIES` 520 → 575 |
| `gen_q511_q556.py` | New: query generation script |
| 13 category JSON files | Updated with new queries + dedup fix |

## Verification

- `compute_counts.py` ran successfully on all 570 queries
- 0 duplicate IDs across all 13 category files
- Only gap: Q025 (pre-existing)

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 06:24:40 +00:00
Shrinath RaoandClaude Sonnet 4.6 3f63fd4d2d test: strip identical retries from TestDino upload to reduce quota usage (#12539)
## Summary
- TestDino quota (~75k/month) was being consumed at ~4x rate because
each failing test uploads one result entry per retry attempt (original +
3 retries = 4 entries per test)
- This PR adds deduplication: if all retry results share the same
`status` and error first-line, only the final attempt is uploaded
- Retries with differing status or error message are preserved in full —
they carry real diagnostic signal (e.g. a test that times out then fails
with a different error)

## How it works
```
getErrorFingerprint(result) → first line of error.message (stable across retries)

allIdentical = every retry has same status AND same error fingerprint
  → true:  upload only results[last]     (strips ~3 entries per test)
  → false: upload all results as before  (keeps diagnostic data)
```

## Expected quota impact
Based on last month's data: ~65k attempts → ~16k (estimated ~75%
reduction for OSS Portal alone)

## Test plan
- [ ] Trigger a CI run that has failures with retries — confirm the
workflow log shows `stripped N identical retry results`
- [ ] Trigger a run with a genuinely flaky/environment-variable failure
— confirm all retries are preserved in TestDino

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 03:20:24 +00:00
4ca7a04864 test: model pricing E2E tests (13 journey flows) + Build tab timing fix (#12525)
## Summary

- **13 Playwright E2E journey tests** for the Model Pricing feature
(\`/settings/model_pricing\`), consolidating all P0–P2 scenarios into
journey-based flows
- New page object \`ModelPricingPage\` under \`pages/generalPages/\`
- API cleanup integrated into the centralized \`APICleanup\` class and
called from \`cleanup.spec.js\`
- CI matrix updated: \`ZO_MODEL_PRICING_ENABLED=true\` env var added;
\`model-pricing.spec.js\` added to the \`GeneralTests\` job
- **Bug fix**: \`waitForBuildTabLoaded\` now polls the Monaco editor for
non-empty content (Phase 3), fixing a timing race where Build tab SQL
tests read an empty query string on slower CI machines

## Test coverage

| Journey | Scenarios covered |
|---------|------------------|
| List, tabs & search | Controls, tab switching, search, built-in tab |
| Create & validation | All form validation cases + successful save |
| Edit, cancel & delete | Full lifecycle |
| Duplicate & clone | Org model duplicate + built-in clone |
| Bulk actions | Select, export JSON, bulk delete |
| Toggle | Disable/re-enable with correct visual state |
| Test match dialog | Empty state, no-result, clear, match result |
| Import | Valid JSON, correction flow, cancel |
| Editor features | Multi-tier, pricing template, pattern examples |
| Pricing drawer | Overflow link → drawer with all price keys |
| Empty state | CTA when org has no custom models |
| Cost applied | LLM span matched → cost stored correctly |
| No matching model | Unknown model name → zero cost stored |

## Bug fix: Build tab query editor timing

\`waitForBuildTabLoaded\`'s Phase 2 (chart-type-selected signal) fires
as soon as \`initializeFromQuery\` sets the chart type — before
\`makeAutoSQLQuery\` has run. On slower CI machines this left
\`queries[0].query\` empty when tests read the editor, causing the "SQL
ON + Auto mode" and "Auto → Custom" tests to receive \`""\` instead of
generated SQL.

Phase 3 polls the Monaco editor
(\`[data-test="logs-search-bar-query-editor"]\`) for non-empty content,
confirming \`onBuildQueryGenerated\` has been called and the query is
ready.

## Test plan

- [x] All 13 model pricing tests pass locally
- [x] \`logsQueryBuilder-editor.spec.js\` (23 tests) — all pass with
Phase 3 fix applied
- [x] Sentinel code audit passed (no blocking issues)
- [x] API cleanup added to \`cleanup.spec.js\` via
\`apiCleanup.cleanupModelPricingModels()\` — 404-safe for instances
where the feature is disabled

🤖 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>
2026-06-09 18:33:07 +00:00
Neha PandClaude Sonnet 4.6 146d5e7612 feat(tests): vortex file format test suite (scenarios 1–83) (#12472)
## Summary

- Adds **239 new tests** covering the vortex columnar file format across
78 scenarios from the test plan
- **`tests/api-testing/tests/vortex/`** — 9 test modules (83 tests):
format conversion, schema evolution, data integrity, FTS, downsampling,
API format awareness, server config, and performance/stress
- **`tests/api-testing/tests/query_agent/test_3_vortex.py`** — 156
tests: the full 155-query SQL correctness suite + scenario 39
(self-join) run post-flush against vortex files
- **`api-testing.yml`** — adds `--ignore=tests/vortex` to the OSS
default-set run; vortex tests require the enterprise binary with
`ZO_FILE_FORMAT=vortex` and are gated to enterprise CI only

## Test plan coverage

| Module | Scenarios |
|--------|-----------|
| `test_format_conversion.py` | 1–13, 7, 8, 9, 10 |
| `test_schema_evolution.py` | 14–25 |
| `test_data_integrity.py` | 55–62 |
| `test_fts.py` | 51–54 |
| `test_downsampling.py` | 47–50 |
| `test_api_format.py` | 71–73 |
| `test_config.py` | 66–67 |
| `test_performance.py` | 74–78 |
| `test_3_vortex.py` | 26–46 (155 queries + JOIN) |

## Enterprise CI

Two dedicated jobs added in the companion `openobserve/o2-enterprise` PR
on the same branch:
- **`api_query_agent_vortex`** — runs `test_3_vortex.py` with
`ZO_FILE_FORMAT=vortex`
- **`api_vortex_format_tests`** — runs the full `tests/vortex/` suite
with 4-phase server lifecycle (parquet→vortex→parquet→vortex+compaction)

OSS CI is unchanged except for the ignore rule — no vortex tests run
against the OSS binary.

## Test checklist

- [ ] `tests/vortex/` collects cleanly: `83 tests collected`
- [ ] `tests/query_agent/test_3_vortex.py` collects cleanly: `156 tests
collected`
- [ ] Enterprise CI `api_query_agent_vortex` job passes
- [ ] Enterprise CI `api_vortex_format_tests` job passes

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 13:57:17 +00:00
Abhay Padamani 8c23dd000e feat: multi-query support (#12374)
Design At:
https://github.com/openobserve/designs/tree/main/dashboards/multi-sql-query-support

Issue list : https://github.com/openobserve/openobserve/issues/11278
2026-06-08 10:51:37 +00:00
Harsh Mahajan ec5b0df819 fix: removing double pr review via deepseek and ai-code review (#12488) 2026-06-08 00:00:19 +00:00
Shrinath RaoandClaude Sonnet 4.6 af7d0e6696 test: harden rerun check step against GitHub API failures (#12486)
## Summary

- Adds `|| echo '{"jobs":[]}'` fallback on the `curl` call so a network
error or GitHub API rate-limit response never produces an empty/invalid
variable
- Adds `2>/dev/null || echo "0"` on both `jq` calls so a malformed API
response (non-JSON error body) falls back to `"0"` instead of
propagating a non-zero exit under `-eo pipefail`
- Changes the arithmetic comparison to `[ "${CURRENT_ATTEMPT_JOBS:-0}"
-eq "${TOTAL_MATRIX_JOBS:-0}" ]` with `2>/dev/null` so a `null` jq
output can't trigger "integer expression expected" and kill the step

**Failure mode fixed:** On re-runs, multiple matrix jobs query the same
GitHub API endpoint concurrently with the shared `GITHUB_TOKEN`. A
rate-limit `403` or transient network hiccup returns non-JSON, `jq`
exits non-zero, and with `set -eo pipefail` the whole "Check if this is
a rerun" step fails — blocking the job before any tests run.

**Degraded behaviour:** When the API is unavailable, both counts fall to
`0`, `0 -eq 0` → `rerun_type=all` → step succeeds → all tests run (same
as a normal rerun-all). The TestDino optimisation is skipped but nothing
is blocked.

Companion PR: openobserve/o2-enterprise#<ENT_PR>

## Test plan
- [ ] Trigger a re-run of a workflow run — "Check if this is a rerun"
step should pass even if GitHub API is slow/rate-limited
- [ ] Verify `rerun_type` is still correctly set to `failed` when the
API responds normally

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 12:25:29 +00:00
Hengfei Yang 02e17023fa fix: arm build (#12474) 2026-06-05 13:09:23 +00:00
Harsh Mahajan 80984fbf6c fix: changing layout for deepseek review comment (#12341) 2026-06-05 11:47:06 +00:00
Harsh Mahajan a107b19a2b fix: release ci with musl target (#12470) 2026-06-05 19:06:09 +08:00
c2555d116c fix: prevent license textarea from growing and fix layout spacing (#12447)
## Summary

- **OTextarea resize**: Changed default resize behaviour from `resize-y`
to `resize-none`. `OTextarea` uses `inheritAttrs: false`, so
`style`/`class` attrs passed by consumers land on the outer wrapper
`<div>`, not the native `<textarea>`. The `resize-y` class was allowing
users to manually drag the textarea to grow it indefinitely — this
didn't exist with the previous `q-input` implementation.
- **License.vue style cleanup**: Removed `style="height: 200px"` and
`style="min-height: 150px"` from the two `OTextarea` usages. These were
being applied to the outer wrapper div (wrong element) and had no effect
on the actual textarea size. The `rows` prop already controls height
correctly.
- **Button spacing**: Added `tw:mt-3` gap between the license key
textarea and the "Update License" button.

## Test plan

- [ ] Navigate to Settings → License page with no license installed
- [ ] Verify the "Enter License Key" textarea renders at a fixed height
and cannot be resized by dragging
- [ ] Verify the "Update License" button has visible spacing below the
textarea
- [ ] Verify pasting a long license key causes scroll within the
textarea (not expansion)
- [ ] Trigger the update form (on a page with an active license) and
verify the same resize-none behaviour

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-05 03:25:02 +00:00
Neha PandClaude Sonnet 4.6 73ce75c883 fix(tests): bump query_agent ingest timeout 120s → 300s (#12444)
## Summary

- ENT CI runners are slower than local/OSS runners — the
`ingest_query_agent_data` fixture was hitting the 120s timeout before
1550 records became searchable, causing all 310 query_agent tests to
fail at setup
- Bumped `wait_until` timeout to 300s

## Test plan
- [ ] OSS `api_query_agent_tests` passes as before
- [ ] ENT `api_query_agent_tests` no longer hits WaitTimeout on ingest

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 14:56:50 +00:00
udev 43d0e8cc84 ci: cache tag for build pr (#12326) 2026-06-04 11:12:13 +00:00
Neha PandClaude Opus 4.7 1196045636 test: add org-level ingestion token API and Playwright tests (#12439)
PR #11691 introduces org-level ingestion tokens with o2oi_ prefix (37
chars). This commit adds comprehensive automated test coverage:

## API Tests (35 tests in test_ingestion_tokens.py)

### Token CRUD (9 tests)
- Create token returns o2oi_ prefix and 37-char length
- Create token persists name, created_by, enabled=true, is_default=false
- Create token with name only (no description) — description is empty
- Create token with hyphens and underscores allowed
- Duplicate name returns 400 with "already exists" message
- Empty name returns 400 with "cannot be empty" message
- Whitespace-only name returns 400 with "cannot be empty" message
- Name too long (>256 chars) returns 400 with non-empty error message
- Parametrized: special chars (spaces, @, ., /) rejected with
"alphanumeric" message

### List Tokens (3 tests)
- GET returns data array
- Created token appears in list
- Token values are unmasked in list response

### Enable/Disable (5 tests)
- Disable token via PATCH {enabled: false}
- Enable disabled token via PATCH {enabled: true}
- Double disable is a no-op (idempotent)
- Toggle nonexistent token returns 404
- DELETE returns 405 (not supported)

### Ingestion Auth — Org Token (6 tests)
- Ingest with org token (org_id:o2oi_token) succeeds
- Ingest with disabled org token fails (401)
- Ingest with nonexistent o2oi_ token fails (401)
- Ingest to wrong org with valid token fails (401)
- Org token blocked on search endpoint (401)
- Org token blocked on dashboards endpoint (401)

### Ingestion Auth — Backward Compat (6 tests)
- User password ingestion still works (pre-PR behavior)
- Non-o2oi_ service account token ingestion works (falls through to user
lookup)
- User password on search succeeds (200) — mirrors org token blocking
tests
- User password on dashboards succeeds (200) — mirrors org token
blocking tests
- Non-o2oi_ SA token NOT blocked by o2oi_ prefix check on search (≠401)
- Non-o2oi_ SA token NOT blocked by o2oi_ prefix check on dashboards
(≠401)

### Multi-token and Security (6 tests)
- Create 5 tokens, all visible in list
- Disable one token, others remain enabled
- SQL injection in token name rejected (special chars → 400)
- Empty name, whitespace name, too-long name (with message assertions)
- Special chars parametrized: spaces, @, ., /

## Playwright UI Tests (7 tests in ingestionTokens.spec.js)

- Ingestion Tokens tab renders with table and columns (P0)
- Create token via UI dialog with name and description (P0)
- Create token with empty name — button disabled, enabled on fill,
disabled on clear
- Revealed token dialog — copy token with clipboard verification
- Toggle token enable/disable from table actions (P0)
- Manage Tokens button on ingestion page navigates to IAM
- Ingestion page token selector dropdown shows available tokens

## Page Object (ingestionTokensPage.js)

- data-test selectors for IAM nav, token list, create dialog, toggle,
toast, revealed dialog
- Registered in centralized PageManager

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 08:03:53 +00:00
dependabot[bot]andHengfei Yang ce0f5e8988 chore(deps): bump actions/cache from 4 to 5 (#12415)
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/releases">actions/cache's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<blockquote>
<p>[!IMPORTANT]
<strong><code>actions/cache@v5</code> runs on the Node.js 24 runtime and
requires a minimum Actions Runner version of
<code>2.327.1</code>.</strong></p>
<p>If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<hr />
<h2>What's Changed</h2>
<ul>
<li>Upgrade to use node24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1630">actions/cache#1630</a></li>
<li>Prepare v5.0.0 release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1684">actions/cache#1684</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4.3.0...v5.0.0">https://github.com/actions/cache/compare/v4.3.0...v5.0.0</a></p>
<h2>v4.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add note on runner versions by <a
href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1642">actions/cache#1642</a></li>
<li>Prepare <code>v4.3.0</code> release by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1655">actions/cache#1655</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1642">actions/cache#1642</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4...v4.3.0">https://github.com/actions/cache/compare/v4...v4.3.0</a></p>
<h2>v4.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1620">actions/cache#1620</a></li>
<li>Upgrade <code>@actions/cache</code> to <code>4.0.5</code> and move
<code>@protobuf-ts/plugin</code> to dev depdencies by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1634">actions/cache#1634</a></li>
<li>Prepare release <code>4.2.4</code> by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1636">actions/cache#1636</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/nebuk89"><code>@​nebuk89</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1620">actions/cache#1620</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4...v4.2.4">https://github.com/actions/cache/compare/v4...v4.2.4</a></p>
<h2>v4.2.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Update to use <code>@​actions/cache</code> 4.0.3 package &amp;
prepare for new release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1577">actions/cache#1577</a>
(SAS tokens for cache entries are now masked in debug logs)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1577">actions/cache#1577</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4.2.2...v4.2.3">https://github.com/actions/cache/compare/v4.2.2...v4.2.3</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's
changelog</a>.</em></p>
<blockquote>
<h1>Releases</h1>
<h2>How to prepare a release</h2>
<blockquote>
<p>[!NOTE]<br />
Relevant for maintainers with write access only.</p>
</blockquote>
<ol>
<li>Switch to a new branch from <code>main</code>.</li>
<li>Run <code>npm test</code> to ensure all tests are passing.</li>
<li>Update the version in <a
href="https://github.com/actions/cache/blob/main/package.json"><code>https://github.com/actions/cache/blob/main/package.json</code></a>.</li>
<li>Run <code>npm run build</code> to update the compiled files.</li>
<li>Update this <a
href="https://github.com/actions/cache/blob/main/RELEASES.md"><code>https://github.com/actions/cache/blob/main/RELEASES.md</code></a>
with the new version and changes in the <code>## Changelog</code>
section.</li>
<li>Run <code>licensed cache</code> to update the license report.</li>
<li>Run <code>licensed status</code> and resolve any warnings by
updating the <a
href="https://github.com/actions/cache/blob/main/.licensed.yml"><code>https://github.com/actions/cache/blob/main/.licensed.yml</code></a>
file with the exceptions.</li>
<li>Commit your changes and push your branch upstream.</li>
<li>Open a pull request against <code>main</code> and get it reviewed
and merged.</li>
<li>Draft a new release <a
href="https://github.com/actions/cache/releases">https://github.com/actions/cache/releases</a>
use the same version number used in <code>package.json</code>
<ol>
<li>Create a new tag with the version number.</li>
<li>Auto generate release notes and update them to match the changes you
made in <code>RELEASES.md</code>.</li>
<li>Toggle the set as the latest release option.</li>
<li>Publish the release.</li>
</ol>
</li>
<li>Navigate to <a
href="https://github.com/actions/cache/actions/workflows/release-new-action-version.yml">https://github.com/actions/cache/actions/workflows/release-new-action-version.yml</a>
<ol>
<li>There should be a workflow run queued with the same version
number.</li>
<li>Approve the run to publish the new version and update the major tags
for this action.</li>
</ol>
</li>
</ol>
<h2>Changelog</h2>
<h3>5.0.4</h3>
<ul>
<li>Bump <code>minimatch</code> to v3.1.5 (fixes ReDoS via globstar
patterns)</li>
<li>Bump <code>undici</code> to v6.24.1 (WebSocket decompression bomb
protection, header validation fixes)</li>
<li>Bump <code>fast-xml-parser</code> to v5.5.6</li>
</ul>
<h3>5.0.3</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v5.0.5 (Resolves: <a
href="https://github.com/actions/cache/security/dependabot/33">https://github.com/actions/cache/security/dependabot/33</a>)</li>
<li>Bump <code>@actions/core</code> to v2.0.3</li>
</ul>
<h3>5.0.2</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v5.0.3 <a
href="https://redirect.github.com/actions/cache/pull/1692">#1692</a></li>
</ul>
<h3>5.0.1</h3>
<ul>
<li>Update <code>@azure/storage-blob</code> to <code>^12.29.1</code> via
<code>@actions/cache@5.0.1</code> <a
href="https://redirect.github.com/actions/cache/pull/1685">#1685</a></li>
</ul>
<h3>5.0.0</h3>
<blockquote>
<p>[!IMPORTANT]
<code>actions/cache@v5</code> runs on the Node.js 24 runtime and
requires a minimum Actions Runner version of <code>2.327.1</code>.</p>
</blockquote>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/cache/commit/27d5ce7f107fe9357f9df03efb73ab90386fccae"><code>27d5ce7</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1747">#1747</a>
from actions/yacaovsnc/update-dependency</li>
<li><a
href="https://github.com/actions/cache/commit/f280785d7b6e1884c7d12b9136eb0f4a1574fcfd"><code>f280785</code></a>
licensed changes</li>
<li><a
href="https://github.com/actions/cache/commit/619aeb1606e195be0b36fd0ff68dcf1aff6b65a7"><code>619aeb1</code></a>
npm run build generated dist files</li>
<li><a
href="https://github.com/actions/cache/commit/bcf16c2893940a4899761e55c7ac3c1cf88a04f6"><code>bcf16c2</code></a>
Update ts-http-runtime to 0.3.5</li>
<li><a
href="https://github.com/actions/cache/commit/668228422ae6a00e4ad889ee87cd7109ec5666a7"><code>6682284</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1738">#1738</a>
from actions/prepare-v5.0.4</li>
<li><a
href="https://github.com/actions/cache/commit/e34039626f957d3e3e50843d15c1b20547fc90e2"><code>e340396</code></a>
Update RELEASES</li>
<li><a
href="https://github.com/actions/cache/commit/8a671105293e81530f1af99863cdf94550aba1a6"><code>8a67110</code></a>
Add licenses</li>
<li><a
href="https://github.com/actions/cache/commit/1865903e1b0cb750dda9bc5c58be03424cc62830"><code>1865903</code></a>
Update dependencies &amp; patch security vulnerabilities</li>
<li><a
href="https://github.com/actions/cache/commit/565629816435f6c0b50676926c9b05c254113c0c"><code>5656298</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1722">#1722</a>
from RyPeck/patch-1</li>
<li><a
href="https://github.com/actions/cache/commit/4e380d19e192ace8e86f23f32ca6fdec98a673c6"><code>4e380d1</code></a>
Fix cache key in examples.md for bun.lock</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/cache/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-06-04 04:09:15 +00:00
Hengfei YangandClaude Opus 4.8 d0591ca99a ci: publish aarch64-unknown-linux-musl release artifact (#12369) (#12438)
## What

Re-enables the `aarch64-unknown-linux-musl` release target so we publish
an `openobserve-<tag>-linux-arm64-musl.tar.gz` artifact. Closes #12369
(OSS portion).

## Why

A user requested an arm64 + musl build. The target was commented out in
`release.yml` (since #1909, late 2023). This brings it back.

## The fix

The old commented entry ran on an **x86 runner** (`ubicloud-standard-8`)
and cross-compiled. On that host the `Install Protoc for linux ARM` step
(`contains(arch, 'aarch64-unknown-linux')`) installs an **aarch64
protoc** binary, which can't execute on x86 — `prost-build` invokes
protoc at build time, so the build dies. That mismatch is the likely
original "build trouble."

This PR instead builds arm64-musl on the **native ARM runner**
(`ubicloud-standard-16-arm`), the same setup the working
`aarch64-unknown-linux-gnu` artifact already uses, which sidesteps the
host/target protoc problem.

Everything else is already in place:
- `.cargo/config.toml` already configures
`[target.aarch64-unknown-linux-musl]` (linker + `+aes,+neon`)
- the `linux-musl` deps step already installs `musl-dev`/`musl-tools` +
toolchain
- the ARM protoc step matches and runs natively
- OpenSSL-on-musl is already proven by the working `amd64-musl` build

## Verification

This only takes effect on the next `v*.*.*` tag, so it can't be
exercised until a release runs the workflow. The matrix and YAML parse
correctly and the new entry mirrors the arm64-gnu config.

## Note

This covers **OSS** only. The Enterprise arm64-musl build needs a
separate change in the o2-enterprise pipeline.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 00:11:23 +00:00
Neha PandClaude Opus 4.7 eb7cce9b96 test: query agent SQL regression suite — 155 queries, sqllogictest-style, two-phase (#12384)
## Summary

155-query SQL regression test suite covering 12 categories. Adding a new
query requires zero test code changes — drop a JSON entry into the right
category file and run `compute_counts.py`.

**Sqllogictest-style comparison**: DuckDB pre-computes full expected
result sets (not just row counts). The test runner extracts actual
values from OO hits, sorts both sides, and compares cell-by-cell with 5%
relative float tolerance. This catches value-level regressions that
row-count-only checks miss.

Two-phase execution: **memtable** (pre-flush) then **parquet**
(post-flush + Tantivy). **310/310 pass**.

## Architecture

```
tests/
├── api-testing/tests/query_agent/
│   ├── conftest.py            # Shared fixtures, run_query(), tolerance comparison
│   ├── test_1_memtable.py     # Phase 1: all queries pre-flush (FTS skipped)
│   └── test_2_parquet.py      # Phase 2: post-flush (module-scoped fixture triggers flush)
└── test-data/query-agent/
    ├── data_gen.py             # Deterministic data generator (single source of truth)
    ├── compute_counts.py       # DuckDB oracle: computes expected result sets
    ├── base_ts_override.json   # Locks BASE_TS so compute and tests share same timestamps
    └── queries/                # 12 JSON files, 155 queries with expected results
```

### How it works

1. **Deterministic data** — `data_gen.py` generates 10 records per query
(1550 total) with a warehouse/supply-chain IoT schema. Each query Q{N}
gets isolated timestamps. `BASE_TS` is locked via
`base_ts_override.json` so compute and tests share identical timestamps
(prevents histogram bucket drift on minute boundaries).

2. **Unique stream per session** — `STREAM =
f"query_agent_test_{int(time.time())}"` prevents accumulated-data bleed
from prior runs.

3. **DuckDB oracle** — `compute_counts.py` loads the same dataset into
DuckDB, creates a pre-filtered VIEW per query (so time filters work for
CTEs, subqueries, UNIONs — no fragile SQL injection), translates
OO-specific functions, and writes `expected.results` blocks into the
query JSONs.

4. **Histogram translation** — `histogram(_timestamp, 'N unit')` is
translated to integer arithmetic matching OO's `date_bin` with origin at
2001-01-01T00:00:00 UTC. Verified against DataFusion CLI — 100/100
records match across all interval types (15s, 30s, 1m, 2m, 3m, 4m, 5m).
ISO timestamp post-processing converts epoch-µs bucket values to
`YYYY-MM-DDTHH:MM:SS` strings matching OO's serialization format.

5. **Sqllogictest comparison** — `run_query()` checks for
`expected.results`. When present, it extracts column values from hits as
strings, sorts both actual and expected (`results_mode: "rowsort"`), and
compares cell-by-cell with 5% relative float tolerance (handles
cross-engine floating-point drift in AVG/STDDEV/etc.).

6. **Two-phase testing** — `test_1_memtable.py` runs all queries
pre-flush (FTS sqllogictest skipped — Tantivy indexes don't exist yet).
`test_2_parquet.py` has a module-scoped `post_flush` fixture that
triggers `/node/flush`, re-polls until data is searchable, then runs all
queries with full assertions.

### Comparison modes

| Mode | Count | Mechanism |
|------|-------|-----------|
| **Sqllogictest** | 140 | Cell-by-cell comparison with 5% float
tolerance |
| **Skip sqllogictest** | 9 | DuckDB results for documentation, fall
back to legacy assertions |
| **Legacy** | 6 | 5 auto-interval histograms + Q122 (STRING_AGG
DISTINCT ORDER BY) |

**Skip sqllogictest queries** — known OO-DuckDB divergence:

| Query | Reason |
|-------|--------|
| Q037 | ROW_NUMBER tie-breaking differs between engines |
| Q058 | Self-join pairings non-deterministic across engines |
| Q072 | FULL OUTER JOIN histogram — NULL handling differs |
| Q080 | FTS `match_all` + histogram — Tantivy vs SQL LIKE |
| Q111 | ROW_NUMBER ties in pagination |
| Q117 | STRING_AGG ordering differs between engines |
| Q121 | STRING_AGG concatenation order |
| Q127 | UNION across 5 overlapping groups — boundary records compete
for LIMIT spots |
| Q152 | PERCENT_RANK tie-breaking differs between engines |

### Key design decisions

| Decision | Why |
|----------|-----|
| Full result-set comparison | Catches value-level regressions (e.g.,
ROUND producing wrong decimal) |
| `rowsort` mode | DuckDB and OO order ties differently — sorting both
sides eliminates spurious failures |
| 5% float tolerance | Cross-engine AVG/STDDEV/PERCENTILE differ at
least-significant digits |
| `''` = `'None'` normalization | OO serializes NULL as empty string;
DuckDB uses `"None"` |
| DuckDB VIEW for time filtering | WHERE injection into CTEs/subqueries
is fragile — VIEW filters at scan level |
| Dynamic columns excluded | `_timestamp` and `_time` differ between
compute time and test time |
| OO-dropped LAG columns excluded | `prev_tput`, `hours_2_back`,
`delta_from_prev`, `temp_diff` |
| Histogram → DuckDB integer math | DuckDB lacks `date_bin`; integer
formula verified via DataFusion CLI |
| BASE_TS override file | Prevents histogram timestamp drift when
compute and test run at different minutes |
| 1s time window margins | Minimizes cross-query data bleed while
capturing all 10 records |
| `pytest.fail()` on fixture failure | Stops all tests instead of
running 310 against an empty stream |

### Categories covered

| Category | Queries | Description |
|---|---|---|
| aggregation | Q001-Q020 | GROUP BY, COUNT, AVG, SUM, MIN, MAX, FILTER,
HAVING |
| basic_select | Q021-Q035 | WHERE, IN, BETWEEN, LIKE, ORDER BY,
DISTINCT, CASE |
| combined | Q036-Q045 | JOINs, multi-condition filters, combined
aggregations |
| cte_subquery | Q046-Q062 | CTEs, subqueries, derived tables, EXISTS |
| date_time | Q063-Q073 | Date parsing, formatting, extraction, interval
arithmetic, histogram |
| full_text_search | Q074-Q082 | match_all, match against fields |
| histogram | Q083-Q093 | histogram() bucketing, aggregation over
buckets |
| math_functions | Q094-Q102 | ROUND, SQRT, ABS, POWER, arithmetic
expressions |
| pagination | Q103-Q112 | LIMIT, OFFSET, combination with filters and
sorts |
| string_functions | Q113-Q122 | SUBSTR, CONCAT, UPPER, LOWER, TRIM,
LIKE patterns |
| union | Q123-Q134 | UNION ALL, UNION (dedup), CTE + UNION combinations
|
| window | Q135-Q155 | ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, SUM/AVG
OVER |

## Test plan

- [x] All 155 queries pass in both phases (310/310)
- [x] 140 queries with sqllogictest cell-by-cell comparison
- [x] 17 histogram queries converted from legacy to sqllogictest
- [x] 9 queries with skip_sqllogictest for known OO-DuckDB divergence
- [x] 6 queries in legacy mode (auto-interval histograms + Q122)
- [x] BASE_TS locked via override file — no timestamp drift
- [x] Dedicated CI job (`api_query_agent_tests`) runs in parallel

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 09:30:02 +00:00
Hengfei YangandClaude Opus 4.8 ad9fef2242 fix: fuzzy tests (#12405)
- [x] Bulk ingestion panic
- [x] Create function panic
- [x] Dashboards/Alerts/Incidents panic when list data
- [x] Match http response error code
- [x] Skip some endpoint that fuzz can't generate data

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 05:12:57 +00:00
Hengfei Yang 3e865a3e6a ci: update rust (#12394) 2026-06-02 03:58:01 +00:00
Shrinath RaoandClaude Opus 4.7 61aa772d57 test: revamp api-testing suite (framework + 16 file rewrites + CI matrix) (#12372)
## Summary

Comprehensive rework of the `tests/api-testing/` suite. 30+ commits
implementing all 6 phases of the [revamp
plan](../../tests/ui-testing/MD_Files/api%20tests%20revamp/API_TESTS_REVAMP.md).

**Before → After:**

| | Baseline | Final | Δ |
|---|---|---|---|
| passed | 421 | **443** | **+22 ✓** |
| failed | 3 | **2** | -1 (only same pre-existing) |
| skipped | 53 | 39 | -14 (unskipped dead tests now run) |
| xfailed | 1 | 2 | +1 (new visible backend-bug signal) |
| runtime | 588s | **387s** | **-201s (34% faster)** |

**Zero tests that passed in baseline are now failing.** The 2 remaining
failures are the exact pre-existing ones
(`test_enrichment_table_join.py` backend panic + `test_workflow.py` SMTP
env-miss).

## What's in the diff

- **New `support/` framework** — `OpenObserveClient`, endpoint wrappers
(`alerts`, `dashboards`, `streams`, `search`, etc.), `wait_until()`,
payload factories, pytest fixtures, SSE parser. 14 framework selfcheck
tests.
- **16 of 16 OLD-tier test files rewritten** — using the new framework,
unique-suffix names, body validation, `wait_until` instead of
`time.sleep`, parametrize where appropriate.
- **29 files moved into 12 feature folders** mirroring the UI suite
layout
(`tests/{alerts,dashboards,ingest,orgs,pipelines,regression,rum,search,streams,users,workflow}/`).
- **−6,500 LOC net** (copy-paste + dead code removal; new framework adds
back ~1,500).
- **Ruff config** in pyproject.toml: T201 ban on `print()`, PT pytest
rules, B bugbear, UP pyupgrade.

## CI workflow changes

- New job `api_regression_tests`: `strategy.matrix` over the 4 env-flag
combinations (UTF8_VIEW × JOIN_MATCH_ONE) — now runs in parallel instead
of as 4 sequential server reboots in the main job.
- New job `api_fuzz_tests`: schemathesis OpenAPI-driven fuzz against
`/api-doc/openapi.json` (214 endpoints tested). Informational
(`continue-on-error: true`). Each run surfaces **7–10 distinct 5xx
panics** (e.g., empty `sql` body returning 500 instead of 400, traces
endpoints crashing on unescaped path params that get interpolated into
SQL). Filed to backend team for separate triage.
- Server `o2_*.log` files uploaded as artifacts on failure (was:
silently lost).
- `api_tests_summary` now requires BOTH integration + regression to
pass.

### CI infrastructure fixes

A short hardening pass landed after the initial CI run surfaced several
issues:

- **pytest-sugar count inflation** — dropped `--force-sugar` from both
pytest invocations. The flag double-registered sugar on top of the
auto-loaded entry point, inflating the CI test counter ~3x (display
showed 1364 when collection was 486). Counter is now honest.
- **schemathesis 4.x flag migration** — `--base-url` → `-u`,
`--hypothesis-max-examples` → `-n`, `--hypothesis-deadline` →
`--request-timeout`, `--data-generation-method` → `-m`, dropped
`--auth-type basic`. The fuzz job was failing immediately on flag-parse
before this.
- **Regression matrix binary path** — used `${{ github.workspace
}}/target/debug/openobserve` so the absolute path resolves correctly
under `working-directory: tests/api-testing/` (was: every matrix job
failed with "No such file or directory").
- **`permissions: contents: read`** added to all 4 workflow jobs —
closes CodeQL alert #369.
- **Removed redundant server boot** in `api_integration_tests` (leftover
from main's structure after the regression matrix split; was silently
failing to bind to :5080 and getting masked by the first server).

## Backend bugs surfaced (for backend team to track)

The rework uncovered and visibly flagged these as `xfail`/documented
test comments:

1. `DELETE /api/organizations/{id}` returns 404 unconditionally even for
just-created orgs — endpoint appears unimplemented.
2. `test_dashboard_missing_required_fields` triggers backend panic
(returns 500 instead of 400/422).
3. JS `getEnrichmentTableData()` restricted to `_meta` org AND not
exposed in the `/functions/test` endpoint runtime — `ReferenceError`
even with explicit `enrichment_tables: [...]`.
4. Bulk API silently sanitizes invalid `_index` values (`****` → `_`)
without flagging — user data lands in unexpected index.
5. `AVG` of a single value drifts by ~1e-14 (likely float reduction
order; documented tolerance in `test_advanced_sql.py`).
6. Org name validation rejects hyphens (only
`A-Z/a-z/0-9/spaces/underscores`) — not in spec.

Plus 7–10 additional 5xx panics surfaced per fuzz run (input validation
gaps — separate triage list in fuzz job logs).

## Test bugs uncovered + fixed

- `test_pipeline.py`: had two function definitions named
`test_pipeline_creation_and_action_with_schedule` — Python's last-wins
meant the first test's body never executed for years.
- `test_alertsV2.py`: `assert alert_disabled == "False"` was indented
inside an `else:` branch that never executed because the response is
always a dict; AND `enabled` is a bool, not the string `"False"`. Two
layers of broken.
- `test_bulk.py`: variable typo (`valid_bulk_payload` reused on the POST
call) made the invalid-index test silently duplicate the valid case.
- `test_organisations.py`: `test_create_organization` used pre-pytest-4
`yield`-style fixtures — silently ignored by pytest 8.
- `test_js_result_array.py`: 8 tests skipped with `"Temporarily disabled
- failing test"` — the actual cause was that JS functions are restricted
to `_meta` org. One-line fix unskipped all 8.
- `test_fuzzy.py`: 4 tests `@pytest.mark.skip`-ed because they used a
1-minute time window against older static test data → 0 hits → flake →
skip. Wider window unskips them.
- 547 LOC of zombie commented-out test blocks deleted (15 commented `#
def test_` definitions, including one orphan case where the `def` was
commented but the indented body wasn't).

## Folder layout

```
tests/api-testing/
├── support/                    # NEW framework
│   ├── client.py               # OpenObserveClient
│   ├── endpoints/              # 7 per-resource wrappers
│   ├── factories.py            # unique_name, time_window, *_payload
│   ├── wait.py                 # wait_until + WaitTimeout
│   ├── sse.py                  # read_sse_response
│   └── fixtures.py             # client, temp_user_email, temp_stream_name, ...
├── helpers/                    # Non-test shared code (was scattered in tests/)
│   ├── sourcemap_helpers.py
│   └── workflow/               # workflow chain + pages/ live here now
├── fixtures/
│   └── rum/                    # Standalone RUM ingest scripts (was in tests/)
└── tests/
    ├── alerts/                 # 3 files
    ├── dashboards/             # 4 files
    ├── ingest/                 # 4 files
    ├── orgs/                   # 2 files
    ├── pipelines/              # 10 files
    ├── regression/             # 2 files (env-flag matrix targets)
    ├── rum/                    # 3 files
    ├── search/                 # 8 files
    ├── streams/                # 1 file
    ├── users/                  # 1 file
    ├── workflow/               # 3 files
    ├── conftest.py
    └── test_framework_selfcheck.py
```

## Test plan

- [x] `rye run pytest --collect-only` — 486 tests discovered
- [x] Full default-set run (`--ignore=tests/regression`) — 443 pass / 2
fail / 39 skip / 2 xfail in 387s
- [x] `rye run pytest -m framework` — 14/14 selfcheck tests pass
- [x] `rye run ruff check support/ tests/test_framework_selfcheck.py` —
clean
- [x] CI run on this PR — `api_integration_tests` + all 4
`api_regression_tests` matrix jobs green
- [x] CI run — `api_fuzz_tests` runs cleanly (informational; surfaces
7–10 unique 5xx panics per run)

## Note on test count

The `test_streaming.py` rewrite folded 7 "tests" (`test_ingest_data`,
`test_ingest_join`, `test_disable_streaming`,
`test_update_max_query_range`, `test_enable_streaming`,
`test_delete_stream`, `test_delete_stream_join`) into pytest fixtures.
Each only checked `status_code == 200` of a setup/teardown operation —
they were imperative steps masquerading as tests. The fixtures still
perform the same operations and assert their success; they're just no
longer counted as discrete pytest items. **Functional coverage is
identical.**

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 07:19:48 +00:00
Shrinath RaoandClaude Sonnet 4.6 3e172523d5 test: sync regression workflow runners and TestDino with playwright.yml (#12370)
## Summary

- **Runners**: `merge_and_upload_reports` and `playwright_summary` now
use `ubicloud-standard-4` (was `-8`), matching `playwright.yml`
- **TestDino rerun optimization**: added `check_rerun` step + full
`last-failed` logic (same as `playwright.yml`) — on re-run-failed, only
the previously failed test in each shard is re-executed
- **Upload step**: added failures-only filter (`node -e` filterSuite),
`startTime` ISO 8601 conversion, and `--verbose`; now uploads
`report-failures-only.json` instead of the full report

## Test plan
- [ ] Trigger a regression run and confirm it completes with the new
runner sizes
- [ ] Intentionally fail a test, re-run failed jobs, and verify TestDino
optimization runs only the failed test
- [ ] Confirm Upload to TestDino step produces a filtered report

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 12:54:33 +00:00
Don Kendall 6ef8c85a75 chore: remove orphan generate-unit-tests reusable workflow (#11833) 2026-05-31 08:53:57 +08:00
Shrinath RaoandClaude Sonnet 4.6 cc1f09c5c1 test: fix selector drift across ENT specs, re-enable enterprise tests, and improve CI (#12358)
## Summary

Broad test stabilization pass covering Quasar component selector drift
in ENT UI specs, re-enabling previously disabled enterprise tests, and
CI infrastructure fixes.

### UI test fixes (selector drift)

Quasar's O2 component library wraps native elements — `OInput`,
`OTextarea`, `ODropdown`, `OToast`, `OToggleGroup`, `OToggleGroupItem`,
`ODrawer`, `ODialog`, `OFile` — in ways that break naive attribute/role
selectors. This PR updates affected specs to use the correct locators.

| Spec | Fixes |
|------|-------|
| `service-graph.spec.js` | `OToggleGroupItem` selector, `ODrawer` close
btn, `beforeAll` timeout |
| `alerts-ui-operations.spec.js` | Remove `waitForResponse` overhead
from enterprise block |
| `logoManagement.spec.js` | `OInput` / `OFile` / `ODialog` / `OToast`
locators |
| `jobSearch.spec.js` | `OInput` fill targets wrapper div, `OTable`
index-based rows |
| `searchPatterns.spec.js` | `OToggleGroup` same-element selector,
pattern details dialog |
| `pipelineImport.spec.js` | `OInput` / `ODropdown` / Monaco / `OToast`
selector drift |
| `regexPatternManagement.spec.js` | Correct test-data import file path
|
| `cipherKeys.spec.js` | `OInput`/`OTextarea` `-field` suffix, `OToast`
selector, 403 skip guard, all-toasts polling |

### Enterprise tests re-enabled

- Removed `/* ... */` block comment disabling `"Alerts & Incidents Page
Navigation"` describe block (`@enterprise`) in
`alerts-ui-operations.spec.js`
- 3 tests restored: page navigation, element visibility, round-trip nav
back to Alerts
- Requires `O2_INCIDENTS_ENABLED=true` (set in ENT CI)

### CI improvements

- **playwright.yml**: Install `ffmpeg` via local Playwright binary
(required for `video: retain-on-failure` recording)
- **api-testing.yml**: Reduce runner from `ubicloud-standard-8` →
`ubicloud-standard-4`
- **test_stream_settings_dedup.py**: Fix field-filtering logic and
assertion count in `test_multiple_distinct_fields_no_duplicates`

## Paired ENT PR
Full ENT-only test restoration (SDR, RUM, cipherKeys, etc.):
https://github.com/openobserve/o2-enterprise/pull/1835

## Test plan
- [ ] ENT CI: `"Alerts & Incidents Page Navigation"` enterprise block
passes
- [ ] Playwright CI: video artifacts generated on failure (ffmpeg
install works)
- [ ] API tests: `test_multiple_distinct_fields_no_duplicates` passes

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 16:55:05 +00:00
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>
2026-05-28 19:23:41 +05:30
+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>
2026-05-28 11:00:49 +00:00