Skip to content

fix(test): declare SUCCESSFUL_RUN_STATUS in the 1.13 SearchIndexApplication spec - #30786

Closed
ShaileshParmar11 wants to merge 1 commit into
1.13from
fix/searchindexapp-missing-const-113
Closed

ShaileshParmar11 wants to merge 1 commit into
1.13from
fix/searchindexapp-missing-const-113

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

SearchIndexApplication.spec.ts fails deterministically on both 1.13 AUT runs (MySQL and PostgreSQL), 3/3 attempts, in ~12s each:

ReferenceError: SUCCESSFUL_RUN_STATUS is not defined
  at verifyLastExecutionRun (SearchIndexApplication.spec.ts:158:31)

Root cause

A cherry-pick landed the usages of a constant without its declaration.

  • ed5e68c2a5 (Make SearchIndexing distributed-only #27971, "Make SearchIndexing distributed-only") declares const SUCCESSFUL_RUN_STATUS = /success|completed|activeError/i;. git branch -r --contains ed5e68c2a5 returns main and 2.0 only — not 1.13.
  • 214e5c572f is a cherry-pick of fix failing searchIndexApplication #30577 onto 1.13 which replaced the inline literal /success|activeError/g with the identifier SUCCESSFUL_RUN_STATUS at two call sites (lines 141 and 160).

The pick applied cleanly because the surrounding context matched, so nothing flagged that its prerequisite was missing — and it introduced a guaranteed ReferenceError on a branch where the symbol does not exist.

Fix

Declare the constant with the same value it carries on main and 2.0.

I checked for a second instance of the same problem: SEARCH_INDEX_APP_NAME is also declared on main and absent from 1.13, but the 1.13 copy never references it, so this is the only missing symbol.

Worth noting

This class of failure is invisible to review and to unit CI, and only a nightly catches it. A tsc --noEmit / no-undef gate on backport PRs to release branches would have caught this one outright.

Type of change:

  • Bug fix

Tests:

Verified with tsc, before and after, same config.

Unmodified origin/1.13 copy:

playwright/e2e/Pages/SearchIndexApplication.spec.ts(139,36): error TS2304: Cannot find name 'SUCCESSFUL_RUN_STATUS'.
playwright/e2e/Pages/SearchIndexApplication.spec.ts(158,31): error TS2304: Cannot find name 'SUCCESSFUL_RUN_STATUS'.

This branch: no TS2304.

Line 158 is exactly where the AUT ReferenceError fires, so the static check reproduces the runtime failure and the fix clears it.

Worth noting for the backport-gating discussion: the project's ESLint config passes this file both before and after — no-undef is off for TypeScript, as is conventional. Only tsc catches it. Any guard against this class of bad cherry-pick has to be a typecheck, not a lint.

No behaviour change — the regex is identical to the one on main and 2.0.

Note: Validate PR Metadata will be red for want of a linked issue. It is not a required status check.

🤖 Generated with Claude Code

Greptile Summary

This PR restores the missing SUCCESSFUL_RUN_STATUS declaration used by the Search Index Application Playwright spec.

  • Defines the shared successful-run status matcher.
  • Prevents the existing status assertions from throwing a ReferenceError.

Confidence Score: 5/5

The PR appears safe to merge and restores the failing Playwright spec without changing its intended assertion behavior.

The added declaration supplies the previously undefined identifier, and its matcher accepts the known successful terminal statuses while excluding running and failed statuses.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchIndexApplication.spec.ts Adds the missing regex constant required by two existing application-run status assertions; no issues identified.

Reviews (1): Last reviewed commit: "fix(test): declare SUCCESSFUL_RUN_STATUS..." | Re-trigger Greptile

…cation spec

SearchIndexApplication.spec.ts fails deterministically on both 1.13 AUT
runs (MySQL and PostgreSQL), 3/3 attempts:

    ReferenceError: SUCCESSFUL_RUN_STATUS is not defined
      at verifyLastExecutionRun (SearchIndexApplication.spec.ts:158:31)

214e5c5 cherry-picked #30577 onto 1.13, replacing the inline regex
/success|activeError/g with the identifier SUCCESSFUL_RUN_STATUS at two
call sites. That identifier is declared by #27971 (ed5e68c), which
`git branch -r --contains` places on main and 2.0 only -- not 1.13. The
pick applied cleanly because the surrounding context matched, and
introduced a guaranteed ReferenceError.

Declare the constant with the same value it carries on main and 2.0.
Verified there is no second undeclared identifier: SEARCH_INDEX_APP_NAME
exists on main but is never referenced by the 1.13 copy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner August 1, 2026 08:16
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Aug 1, 2026
@gitar-bot

gitar-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Declares the missing SUCCESSFUL_RUN_STATUS constant in the 1.13 SearchIndexApplication test specification to fix a deterministic ReferenceError. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

❌ UI Checkstyle Failed

❌ Antd + Less Deprecation Guard

A new antd import or new .less file was added. Use UntitledUI + Tailwind for new work.

Affected files

at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {


Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@ShaileshParmar11

Copy link
Copy Markdown
Contributor Author

Folded into #30787 — same base branch, same reviewers, and one merge-queue pass instead of two. The tsc before/after evidence carried over verbatim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant