Skip to content

Fixes 31799: make BundleSuiteBulkOperations act on its own test cases [1.13] - #31806

Merged
ShaileshParmar11 merged 1 commit into
1.13from
cherry-1.13-31799
Aug 20, 2026
Merged

Fixes 31799: make BundleSuiteBulkOperations act on its own test cases [1.13]#31806
ShaileshParmar11 merged 1 commit into
1.13from
cherry-1.13-31799

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #31799

Cherry-pick of #31800 (main) onto 1.13, with the row/checkbox locators ported to this branch — see the caveat below.

BundleSuiteBulkOperations.spec.ts › Add test case to existing Bundle Suite ticked row 1 of the global Test Cases list, which is sorted by most-recent result descending. The spec's own test cases are created without a result, so they can never be row 1 — under CI parallelism row 1 is reliably a test case another worker created seconds ago and is about to hard-delete. When that cleanup ran (?recursive=true&hardDelete=true), it cascaded to the test case and removed the CONTAINS edge this spec had just created, so the suite read back tests: []. When the delete landed earlier, the add was rejected with 400 "You are trying to add one or more test cases that do not exist." Full analysis in #31799.

The two tests that act on their selection now search for a test case the spec created:

- await selectTestCasesByCheckbox(page, 1);
+ await searchAndSelectTestCase(page, uniqueTestCase);

The search term is the uuid segment, not the whole name — the list search is Elasticsearch-backed and tokenises on _, so a full <prefix>_<uuid> name matches every <prefix>_* test case on the server and the wanted one ranks off page 1.

Important

This is not a clean pick, even though git applied it without conflict.
1.13 still renders the Test Cases list with the antd table, whereas main/2.0 use the core Table. The cherry-pick merged textually but would have been silently wrong — the new helper would have looked for tr[data-key] + label[slot="selection"], neither of which exists here. searchAndSelectTestCase therefore uses tr[data-row-key] + input[type="checkbox"].check() on this branch, matching this branch's own selectTestCasesByCheckbox. Worth a careful look during review.

The data-testid="searchbar" the helper types into does exist on 1.13 (via common/SearchBarComponent), and this same page is already driven that way by dataQuality.ts — so that part needed no change.

Type of change:

  • Bug fix

High-level design:

N/A — cherry-pick with a locator port.

Tests:

Use cases covered

  • Adding a bulk-selected test case to an existing Bundle Suite while other specs concurrently create and hard-delete test cases against the same server
  • Creating a new Bundle Suite from a bulk-selected test case under the same conditions

Unit tests

Not applicable — Playwright-only change.

Backend integration tests

Not applicable — no backend API changes.

Ingestion integration tests

Not applicable — no ingestion changes.

Playwright (UI) tests

  • Files updated:
    • openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/BundleSuiteBulkOperations.spec.ts
    • openmetadata-ui/src/main/resources/ui/playwright/utils/dataQuality.ts

Manual testing performed

The behavioural validation was done on the main PR (#31800): the pre-fix spec was made to fail 4/8 under a script reproducing the race, and interleaved under one live churn the old spec failed 2/6 while the fixed spec passed 6/6; the fixed spec passed 24/24 unchurned and 8/8 under churn.

That run-time evidence does not fully transfer to this branch, because the ported locators are branch-specific and were not exercised against a 1.13 server locally. What was verified here:

  • The ported locators match this branch's own working idiom in selectTestCasesByCheckbox (tr[data-row-key] + input[type="checkbox"].check()).
  • data-testid="searchbar" is present on this branch's Test Cases page and already used by dataQuality.ts:157.
  • @playwright/test is 1.57.0 on both branches, so no API-compatibility gap in expect.poll / Locator.filter / APIResponse.ok().
  • tsc reports zero errors in both changed files; eslint and prettier clean.

Please let CI exercise this one before merging rather than relying on the main validation alone.

UI screen recording / screenshots:

Not applicable — test-only change.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For UI changes: not applicable, test-only change.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • I have added a test that covers the exact scenario we are fixing.

Greptile Summary

The PR stabilizes Bundle Suite bulk-operation Playwright coverage by selecting test cases owned by the spec rather than globally sorted rows.

  • Assigns each actionable test case a unique searchable UUID segment.
  • Polls the Elasticsearch-backed endpoint until created cases are indexed.
  • Searches for and selects the exact antd table row before performing bundle operations.
  • Surfaces failed bulk-add API responses at the operation that caused them.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The new polling request matches the branch's Test Cases search contract, the selection helper uses the table structure already used on this branch, and each mutating test targets a distinct UUID-named resource it created.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/BundleSuiteBulkOperations.spec.ts Creates uniquely identifiable test cases, waits for indexing, and selects the exact owned case in both state-mutating scenarios.
openmetadata-ui/src/main/resources/ui/playwright/utils/dataQuality.ts Adds ownership, indexing, and exact-selection helpers using branch-appropriate antd locators, plus an immediate bulk-add response assertion.

Reviews (1): Last reviewed commit: "Fixes 31799: make BundleSuiteBulkOperati..." | Re-trigger Greptile

Note

Why skip-pr-checks is applied. Validate PR Metadata resolves same-repo links through GitHub's closingIssuesReferences, which GitHub only populates for PRs targeting the default branch. A backport targeting a release branch therefore cannot satisfy it from the description, no matter how the Fixes # line is written — every current release-branch PR hits this (e.g. #31808, #31807). The issue is #31799 and is linked from the main PR #31800.

Cherry-pick of the main-branch fix, with the row/checkbox locators
ported to 1.13.

The spec ticked row 1 of the global Test Cases list, which is sorted by
most-recent result descending. Its own test cases are created without a
result, so they can never be row 1 -- under CI parallelism row 1 is
reliably a test case another worker created seconds ago and is about to
hard-delete. When that cleanup ran, the CONTAINS edge this spec had just
created was cascade-deleted, and the suite read back empty (or the add
was rejected outright with "test cases that do not exist").

Select by name instead. The list search is Elasticsearch-backed and
tokenises names on `_`, so searching a whole `<prefix>_<uuid>` name
matches every `<prefix>_*` test case on the server and the wanted one
ranks off page 1; `ownedTestCase` therefore pairs each name with the
uuid segment that actually narrows it, and the row assertion is an exact
`toHaveCount(1)` rather than `.first()`.

Also assert the bulk add response. A rejected add left the modal open
and only surfaced 15s later as a confusing "URL never changed" timeout,
hiding the server's explanation.

1.13 still renders the Test Cases list with the antd table, so
`searchAndSelectTestCase` uses `tr[data-row-key]` +
`input[type="checkbox"]`.check() here, matching this branch's existing
`selectTestCasesByCheckbox`, rather than main's core-Table
`tr[data-key]` + `label[slot="selection"]`. The cherry-pick applies
without conflict but would have been silently wrong without this.

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

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 20, 2026
@gitar-bot

gitar-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Updates BundleSuiteBulkOperations to select test cases via dedicated search and ported 1.13-compatible locators, preventing race conditions from concurrent test creation and deletion. 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 👍 / 👎 | Powered by Gitar — free for open source

@ShaileshParmar11 ShaileshParmar11 added the skip-pr-checks Bypass PR metadata validation check label Aug 20, 2026
@ShaileshParmar11
ShaileshParmar11 merged commit 17c3802 into 1.13 Aug 20, 2026
121 of 131 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the cherry-1.13-31799 branch August 20, 2026 06:29
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 skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant