Skip to content

Chore(UI): Fix the flakiness in SearchRBAC test - #30768

Merged
ShaileshParmar11 merged 1 commit into
mainfrom
SearchRBAC-flakiness
Aug 2, 2026
Merged

Chore(UI): Fix the flakiness in SearchRBAC test#30768
ShaileshParmar11 merged 1 commit into
mainfrom
SearchRBAC-flakiness

Conversation

@aniketkatkar97

@aniketkatkar97 aniketkatkar97 commented Jul 31, 2026

Copy link
Copy Markdown
Member

This pull request updates the search RBAC (Role-Based Access Control) Playwright tests to improve reliability and specificity by requiring the entity name to be explicitly provided and used when interacting with the UI. The main changes involve updating the searchForEntityShouldWork utility function and its usages to accept and utilize an entityName parameter, ensuring the correct entity is selected in the UI during tests.

Test improvements:

  • Updated the searchForEntityShouldWork function in searchRBAC.ts to require an entityName parameter, and modified the function to select the correct entity in the UI based on this name. [1] [2]
  • Updated all calls to searchForEntityShouldWork in SearchRBAC.spec.ts to pass the appropriate entity name, ensuring tests are explicit and less prone to flakiness. [1] [2]

Greptile Summary

Updates the Search RBAC Playwright flow to select the intended entity category explicitly.

  • Adds a required entity-name argument to searchForEntityShouldWork.
  • Selects the matching Explore menu item before asserting search results.
  • Updates entity and table-column test cases with their corresponding category names.

Confidence Score: 5/5

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

The new arguments correspond to the Explore entity-category menu labels, and the helper waits for loading both before and after selecting the requested category.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/SearchRBAC.spec.ts Supplies entity category names to the updated search assertion helper for general entities and columns.
openmetadata-ui/src/main/resources/ui/playwright/utils/searchRBAC.ts Selects the matching Explore entity-type menu item and waits for loading to complete before asserting the result.

Reviews (1): Last reviewed commit: "Fix the flakiness in SearchRBAC test" | Re-trigger Greptile

@aniketkatkar97 aniketkatkar97 self-assigned this Jul 31, 2026
Copilot AI review requested due to automatic review settings July 31, 2026 15:13
@aniketkatkar97
aniketkatkar97 requested a review from a team as a code owner July 31, 2026 15:13
@aniketkatkar97 aniketkatkar97 added the To release Will cherry-pick this PR into the release branch label Jul 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

gitar-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Updates the SearchRBAC Playwright tests to require explicit entity names in the search utility, improving reliability and eliminating test flakiness. 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 Jul 31, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 2642e1cac4ddf98ef84e2244a9b20b99f7c960d2 in Playwright run 30649458599, attempt 1.

✅ 550 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 58m 57s

⏱️ Max setup 2m 53s · max shard execution 19m 32s · max shard-job elapsed before upload 25m 40s · reporting 3s

🌐 201.31 requests/attempt · 2.83 app boots/UI scenario · 11.77% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 201.31 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.83 per UI scenario (1617 boots / 571 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 143 0 0 3 0 0
✅ Shard chromium-02 133 0 0 0 0 0
✅ Shard chromium-03 123 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@aniketkatkar97 aniketkatkar97 added safe to test Add this label to run secure Github workflows on PRs and removed To release Will cherry-pick this PR into the release branch safe to test Add this label to run secure Github workflows on PRs labels Jul 31, 2026
@aniketkatkar97
aniketkatkar97 enabled auto-merge July 31, 2026 17:01
@aniketkatkar97
aniketkatkar97 added this pull request to the merge queue Jul 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-01T00:10:41Z)

These checks failed on merge-queue commit 3dbc06e:

@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Aug 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-01T07:20:20Z)

These checks failed on merge-queue commit b5fe1e8:

chirag-madlani pushed a commit that referenced this pull request Aug 1, 2026
…ock the merge queue (#30784)

* ci(playwright): raise the chromium shard budget to 21 minutes

The chromium lane outgrew a 19-minute shard. At the COMMON_MAX_SHARDS
ceiling of 24 the heaviest shard is predicted at 19.2m, so
assign_lane_within_budget() raises SystemExit and full-mode planning
aborts before a single test runs. Every merge_group run today failed
this way (PRs #30705, #30768, #30458, #30725, #30754), while
pull_request_target runs pass because targeted selection is far smaller.

Raise COMMON_SHARD_BUDGET_MS from 19m to 21m. At 24 shards the heaviest
is 19.2m, so the loop is guaranteed to converge at or before the
ceiling. 21m stays inside the 25m `timeout` wrapper around
`npx playwright test` and the 35m playwright-ci-postgresql job clock,
leaving ~4m of headroom.

Note the common lane now sits 1m above the dedicated lanes rather than
1m below. The strict 20-minute TARGET_MS ceiling is unaffected: it
bounds a single atomic unit, not a shard, so a 21m shard built from
units each under 20m does not trip it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test(playwright): cover full-mode allocator convergence at the shard ceiling

Addresses review on #30784.

assign_lane_within_budget() was only exercised in "targeted" mode, so
neither the full-mode convergence path nor the SystemExit at
COMMON_MAX_SHARDS had coverage -- the exact code path that took the
merge queue down. Add both:

- test_full_mode_chromium_converges_at_the_shard_ceiling builds a lane
  that needs the window above 19m and asserts the allocator converges
  at or before the ceiling. Verified as a real guard: with the budget
  reverted to 19m it fails with "needs more than 24 shards ... heaviest
  shard is predicted at 20.4m".
- test_full_mode_chromium_reports_a_lane_the_ceiling_cannot_hold pins
  the SystemExit path, which had no coverage at all.

Also reword the budget comment: ~4m of headroom is relative to the 25m
playwright timeout wrapper specifically, not to the 35m job clock, which
is looser and additionally absorbs setup/teardown.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Aug 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-01T11:14:16Z)

These checks failed on merge-queue commit 3992d83:

@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Aug 1, 2026
ShaileshParmar11 added a commit that referenced this pull request Aug 1, 2026
…ity category (#30800)

"Table Column > User without permission" fails deterministically on both
1.13 AUT runs, in two different ways that share one cause:

  MySQL      expect(locator).not.toBeAttached() failed
             locator('[data-testid="entity-header-display-name"]')
               .filter({ hasText: 'user_ida06c5f92' }) -- was attached
  PostgreSQL expect(locator).toBeVisible() failed
             getByTestId('no-search-results').getByText('No result found.')

searchForEntityShouldWorkShowNoResult searches globally and then asserts
absence against whatever entity category Explore happens to be showing.
A match from an unrelated category leaves a result attached and the
"no results" placeholder unrendered -- the two failures above are the
same defect seen from either side.

Its sibling searchForEntityShouldWork already selects the category
before asserting presence (#30768). Apply the same scoping here and pass
the category from both call sites, so the negative assertion is made
against the category under test rather than the whole index.

Note this is not a port of #30768: that change is already on 1.13, and
it only touched the positive-case helper. The negative one was missed.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-01T18:18:37Z)

These checks failed on merge-queue commit 13eb001:

@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Aug 2, 2026
Merged via the queue into main with commit a0bbf26 Aug 2, 2026
190 of 203 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the SearchRBAC-flakiness branch August 2, 2026 13:54
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.

3 participants