Skip to content

Chore(UI): Ensure the runner selection to avoid flaky behaviour - #31541

Merged
aniketkatkar97 merged 1 commit into
mainfrom
fix-service-form-auts
Aug 14, 2026
Merged

Chore(UI): Ensure the runner selection to avoid flaky behaviour#31541
aniketkatkar97 merged 1 commit into
mainfrom
fix-service-form-auts

Conversation

@aniketkatkar97

@aniketkatkar97 aniketkatkar97 commented Aug 14, 2026

Copy link
Copy Markdown
Member

This pull request improves the Playwright test codebase by introducing a reusable utility for selecting the ingestion runner in service forms and updating tests to use this utility. It also adds support for authentication overrides in the BigQuery ingestion class. These changes enhance maintainability, reduce code duplication, and provide more flexibility for test configuration.

Test utility improvements:

  • Added a new constant COLLATE_SAAS_RUNNER to serviceForm.ts for consistent reference to the runner display name.
  • Introduced a reusable selectIngestionRunnerFromDropdown function in serviceFormUtils.ts to standardize the selection of the ingestion runner in forms, replacing duplicated logic in multiple tests. [1] [2]

Test refactoring and usage:

  • Updated various test specs (ServiceForm.spec.ts, ApiServiceRest.spec.ts, ConnectionConfigLayout.spec.ts) to use the new utility and constant when selecting the ingestion runner, improving code clarity and reducing duplication. [1] [2] [3] [4] [5] [6] [7]

BigQuery ingestion enhancements:

  • Added an authOverrides property to BigQueryIngestionClass, allowing test cases to override authentication parameters (such as privateKey) for greater flexibility in test configuration. [1] [2] [3]
Screenshot 2026-08-14 at 6 03 12 PM Screenshot 2026-08-14 at 6 03 25 PM

@aniketkatkar97 aniketkatkar97 self-assigned this Aug 14, 2026
Copilot AI lite review requested due to automatic review settings August 14, 2026 12:36

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 Aug 14, 2026
Comment on lines +94 to +96
const runnerOption = page.getByRole('option').getByText(runnerDisplayName);
await runnerOption.waitFor({ state: 'visible' });
await runnerOption.click();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Edge Case: Removed .first() may trigger Playwright strict-mode violation

The old code used page.getByRole('option', { name: /Collate SaaS/i }).first(), while the new util uses page.getByRole('option').getByText(runnerDisplayName) without .first(). getByText matches by substring/case-insensitively by default, so if more than one option contains the runner display name the locator resolves to multiple elements and waitFor/click throws a strict-mode violation, reintroducing the flakiness this PR aims to remove. Append .first() (e.g. page.getByRole('option', { name: runnerDisplayName, exact: true }).first()) to keep the selection deterministic.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Introduces a reusable runner selection utility to prevent flaky Playwright tests and adds BigQuery authentication overrides. Consider restoring .first() to prevent strict-mode violations when locating service form elements.

💡 Edge Case: Removed .first() may trigger Playwright strict-mode violation

📄 openmetadata-ui/src/main/resources/ui/playwright/utils/serviceFormUtils.ts:94-96

The old code used page.getByRole('option', { name: /Collate SaaS/i }).first(), while the new util uses page.getByRole('option').getByText(runnerDisplayName) without .first(). getByText matches by substring/case-insensitively by default, so if more than one option contains the runner display name the locator resolves to multiple elements and waitFor/click throws a strict-mode violation, reintroducing the flakiness this PR aims to remove. Append .first() (e.g. page.getByRole('option', { name: runnerDisplayName, exact: true }).first()) to keep the selection deterministic.

🤖 Prompt for agents
Code Review: Introduces a reusable runner selection utility to prevent flaky Playwright tests and adds BigQuery authentication overrides. Consider restoring .first() to prevent strict-mode violations when locating service form elements.

1. 💡 Edge Case: Removed .first() may trigger Playwright strict-mode violation
   Files: openmetadata-ui/src/main/resources/ui/playwright/utils/serviceFormUtils.ts:94-96

   The old code used `page.getByRole('option', { name: /Collate SaaS/i }).first()`, while the new util uses `page.getByRole('option').getByText(runnerDisplayName)` without `.first()`. `getByText` matches by substring/case-insensitively by default, so if more than one option contains the runner display name the locator resolves to multiple elements and `waitFor`/`click` throws a strict-mode violation, reintroducing the flakiness this PR aims to remove. Append `.first()` (e.g. `page.getByRole('option', { name: runnerDisplayName, exact: true }).first()`) to keep the selection deterministic.

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 27371ff8211cdc2a38a364161ab8856bbc4a08a5 in Playwright run 31801061835, attempt 1.

✅ 562 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 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) 52m 34s

⏱️ Max setup 3m 37s · max shard execution 17m 46s · max shard-job elapsed before upload 21m 44s · reporting 4s

🌐 211.13 requests/attempt · 2.82 app boots/UI scenario · 4.69% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 211.13 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.82 per UI scenario (1649 boots / 585 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 138 0 0 0 0 0
✅ Shard chromium-02 123 0 0 0 0 0
✅ Shard chromium-03 142 0 0 0 0 0
🟡 Shard data-asset-rules-01 60 0 1 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 10 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
🟡 1 flaky test(s) (passed on retry)
  • Features/DataAssetRulesDisabled.spec.tsVerify the ApiEndpoint entity item action after rules disabled (shard data-asset-rules-01, 1 retry)

📦 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 this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit b0245c0 Aug 14, 2026
87 of 89 checks passed
@aniketkatkar97
aniketkatkar97 deleted the fix-service-form-auts branch August 14, 2026 16:53
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.

4 participants