Skip to content

[ESLint 8/10] Fix playwright/* warnings - #31032

Open
ShaileshParmar11 wants to merge 1 commit into
ShaileshParmar11/eslint-08-i18nfrom
ShaileshParmar11/eslint-10-playwright
Open

[ESLint 8/10] Fix playwright/* warnings#31032
ShaileshParmar11 wants to merge 1 commit into
ShaileshParmar11/eslint-08-i18nfrom
ShaileshParmar11/eslint-10-playwright

Conversation

@ShaileshParmar11

Copy link
Copy Markdown
Contributor

Fixes #30987. Part of epic #30977.

Stacked PR 8 of 10 — base branch ShaileshParmar11/eslint-08-i18n. Top of the stack. The diff here contains only the playwright/* changes.

⚠️ Stacked, not independent — this PR merges after #the one below it in the stack; GitHub auto-retargets the base to main as each lands. See epic #30977 for the full approach and reviewer caveats.

Behavior-preserving lint cleanup. Verified: target rule(s) → 0, no new warnings (git-stash ESLint before/after), 0 new tsc signatures vs baseline.

🤖 Generated with Claude Code


Reviewer notes — why suppressed (playwright)

These are E2E tests that cannot be run/verified from this change, so rewriting them risks destabilising the suite. no-restricted-syntax (browser.newPage() multi-context pattern), no-wait-for-timeout/no-wait-for-selector, no-force-option, and no-skipped-test are resolved with eslint-disable-next-line … -- <reason> (no test logic changed). The only genuine fixes are the @typescript-eslint/no-explicit-any hits, which got real types. Rewriting the waits/auth to satisfy the rules is worthwhile but belongs in a dedicated, separately-canaried test-quality pass.

Resolve all playwright/** warnings: no-restricted-syntax (browser.newPage),
no-wait-for-timeout/selector, no-force-option, no-skipped-test via
disable-with-reason; no-explicit-any fixed with real types. Part of #30977.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 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 5, 2026
@gitar-bot

gitar-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Behavior-preserving ESLint cleanup addressing playwright test warnings via targeted suppressions and explicit typing. 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 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 17 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 17 warning(s) across 2 changed file(s).

Count Rule
6 sonarjs/cyclomatic-complexity
4 sonarjs/cognitive-complexity
4 sonarjs/expression-complexity
2 sonarjs/no-nested-conditional
1 react-hooks/exhaustive-deps
All findings
Location Rule Message
🟡 src/components/Settings/Persona/PersonaAIContext/ContextRuleEditor/ContextRuleEditor.component.tsx:112:58 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 11 which is greater than 10 authorized.","cost":1,"secondaryLocations":[{"line":112,"column":57,"endLine":112,"endColum
🟡 src/components/Settings/Persona/PersonaAIContext/ContextRuleEditor/ContextRuleEditor.component.tsx:234:27 react-hooks/exhaustive-deps The ref value 'previewRequestRef.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React
🟡 src/components/Settings/Persona/PersonaAIContext/ContextRuleEditor/ContextRuleEditor.component.tsx:532:25 sonarjs/no-nested-conditional Extract this nested ternary operation into an independent statement.
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:62:10 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 11 which is greater than 10 authorized.","cost":1,"secondaryLocations":[{"line":62,"column":9,"endLine":62,"endColumn":
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:424:10 sonarjs/cognitive-complexity Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:424:10 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 15 which is greater than 10 authorized.","cost":5,"secondaryLocations":[{"line":424,"column":9,"endLine":424,"endColumn
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:490:10 sonarjs/cognitive-complexity Refactor this function to reduce its Cognitive Complexity from 39 to the 15 allowed.
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:490:10 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 49 which is greater than 10 authorized.","cost":39,"secondaryLocations":[{"line":490,"column":9,"endLine":490,"endColum
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:649:5 sonarjs/expression-complexity Reduce the number of conditional operators (5) used in the expression (maximum allowed 3).
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:721:5 sonarjs/expression-complexity Reduce the number of conditional operators (6) used in the expression (maximum allowed 3).
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:762:10 sonarjs/cognitive-complexity Refactor this function to reduce its Cognitive Complexity from 28 to the 15 allowed.
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:762:10 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 38 which is greater than 10 authorized.","cost":28,"secondaryLocations":[{"line":762,"column":9,"endLine":762,"endColum
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:781:5 sonarjs/expression-complexity Reduce the number of conditional operators (5) used in the expression (maximum allowed 3).
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:841:7 sonarjs/expression-complexity Reduce the number of conditional operators (5) used in the expression (maximum allowed 3).
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:848:9 sonarjs/no-nested-conditional Extract this nested ternary operation into an independent statement.
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:978:17 sonarjs/cognitive-complexity Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
🟡 src/utils/QueryBuilderElasticsearchFormatUtils.js:978:17 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 14 which is greater than 10 authorized.","cost":4,"secondaryLocations":[{"line":978,"column":16,"endLine":978,"endColum

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

make ui-checkstyle-changed

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit b1bb230e9f200bbb88056454a83d529b1c5af45c in Playwright run 31005034021, attempt 1.

✅ 1852 passed · ❌ 0 failed · 🟡 9 flaky · ⏭️ 1 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) 1h 0m 32s

⏱️ Max setup 3m 6s · max shard execution 21m 37s · max shard-job elapsed before upload 25m 33s · reporting 11s

🌐 221.58 requests/attempt · 2.91 app boots/UI scenario · 14.73% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 221.58 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.91 per UI scenario (6002 boots / 2060 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
🟡 Shard chromium-01 177 0 1 0 0 0
🟡 Shard chromium-02 168 0 2 0 0 0
🟡 Shard chromium-03 160 0 1 0 0 0
🟡 Shard chromium-04 165 0 1 0 0 0
✅ Shard chromium-05 163 0 0 0 0 0
🟡 Shard chromium-06 154 0 2 0 0 0
🟡 Shard chromium-07 158 0 1 0 0 0
🟡 Shard chromium-08 154 0 1 0 0 0
✅ Shard chromium-09 155 0 0 0 0 0
✅ Shard chromium-10 166 0 0 1 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 import-export-01 65 0 0 0 0 0
✅ Shard ingestion-01 17 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
🟡 9 flaky test(s) (passed on retry)
  • Features/CuratedAssets.spec.tsMultiple entity types with OR conditions (shard chromium-01, 1 retry)
  • Features/ContextCenterArticles.spec.tsRelated assets, activity feed, user mentions, and article mentions work (shard chromium-02, 1 retry)
  • Features/ContextCenterArticles.spec.tsText formatting (shard chromium-02, 1 retry)
  • Pages/Domains.spec.tsVerify data product tags and glossary terms (shard chromium-03, 1 retry)
  • Features/NavigationBlocker.spec.tsshould not show navigation blocker after saving changes (shard chromium-04, 1 retry)
  • Pages/Entity.spec.tsDomain Propagation (shard chromium-06, 1 retry)
  • Pages/TasksUIFlow.spec.tsCreate and reject tag task for Dashboard via UI (shard chromium-06, 1 retry)
  • Flow/ConditionalPermissions.spec.tsUser with owner permission can only view owned Database Services (shard chromium-07, 1 retry)
  • Flow/ConditionalPermissions.spec.tsUser with matchAnyTag permission can only view Pipeline Services with the tag (shard chromium-08, 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

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