Repository navigation
fix(test): declare SUCCESSFUL_RUN_STATUS in the 1.13 SearchIndexApplication spec - #30786
ShaileshParmar11 wants to merge 1 commit into
Conversation
…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>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
Code Review ✅ ApprovedDeclares the missing SUCCESSFUL_RUN_STATUS constant in the 1.13 SearchIndexApplication test specification to fix a deterministic ReferenceError. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
❌ UI Checkstyle Failed❌ Antd + Less Deprecation GuardA new Affected filesat Function._resolveFilename (node:internal/modules/cjs/loader:1401:15) Fix locally (fast - only checks files changed in this branch): make ui-checkstyle-changed |
|
Folded into #30787 — same base branch, same reviewers, and one merge-queue pass instead of two. The |
Describe your changes:
SearchIndexApplication.spec.tsfails deterministically on both 1.13 AUT runs (MySQL and PostgreSQL), 3/3 attempts, in ~12s each:Root cause
A cherry-pick landed the usages of a constant without its declaration.
ed5e68c2a5(Make SearchIndexing distributed-only #27971, "Make SearchIndexing distributed-only") declaresconst SUCCESSFUL_RUN_STATUS = /success|completed|activeError/i;.git branch -r --contains ed5e68c2a5returns main and 2.0 only — not 1.13.214e5c572fis a cherry-pick of fix failing searchIndexApplication #30577 onto 1.13 which replaced the inline literal/success|activeError/gwith the identifierSUCCESSFUL_RUN_STATUSat 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
ReferenceErroron 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_NAMEis 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-undefgate on backport PRs to release branches would have caught this one outright.Type of change:
Tests:
Verified with
tsc, before and after, same config.Unmodified
origin/1.13copy:This branch: no TS2304.
Line 158 is exactly where the AUT
ReferenceErrorfires, 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-undefis off for TypeScript, as is conventional. Onlytsccatches 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.
🤖 Generated with Claude Code
Greptile Summary
This PR restores the missing
SUCCESSFUL_RUN_STATUSdeclaration used by the Search Index Application Playwright spec.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
Reviews (1): Last reviewed commit: "fix(test): declare SUCCESSFUL_RUN_STATUS..." | Re-trigger Greptile