Skip to content

ci(playwright): align perf gate with 25m wrapper + surface shard-level detail - #30824

Merged
chirag-madlani merged 2 commits into
mainfrom
ci/perf-gate-align-and-detailed-summary
Aug 2, 2026
Merged

chirag-madlani merged 2 commits into
mainfrom
ci/perf-gate-align-and-detailed-summary

Conversation

@chirag-madlani

Copy link
Copy Markdown
Collaborator

Summary

The merge-queue Playwright run 30736786802 failed the summary step. Zero test failures — the blocking executionAtMostTwentyOneMinutes performance gate tripped on 10 chromium shards. The error surface made it hard to see:

Blocking Playwright performance targets not met: executionAtMostTwentyOneMinutes

…and the consolidated summary just showed "1 CI/reporting failure(s)" with no attribution.

Two things fixed

1. The gate was stale relative to the 25m wrapper

PR #30689 raised the shard-step wrapper timeout from 21m → 25m. The blocking gate at evaluate_playwright_performance.py:244 was never updated, so any shard that finished under the 25m wrapper but ran between 21-25 min was flagged as a gate failure despite passing every test.

  • executionAtMostTwentyOneMinutes → executionAtMostTwentyFiveMinutes
  • threshold 1260 → 1500 (25 × 60)
  • Table row in the summary renderer updated to match

2. Gate failures now name the offending shards

evaluate_playwright_performance.py:

  • Adds BLOCKING_TARGET_DETAILS — a mapping from each phase-attributable blocking target (execution, environment setup, elapsed-before-upload) to its label, phase field, threshold, and unit.
  • offending_shards(phases, target) iterates the per-shard shard-phases.json fixtures and returns the shards over the threshold, sorted worst-first.
  • New failedBlockingTargetDetails block on the output JSON carries each failed target's label, threshold, and offending-shard list.
  • The SystemExit message now names each failed target, the threshold, and up to five offending shards with actual seconds.

Before:

Blocking Playwright performance targets not met: executionAtMostTwentyOneMinutes

After:

Blocking Playwright performance targets not met:
  executionAtMostTwentyFiveMinutes — Maximum shard execution target ≤ 1500 s;
  exceeded on 4 shard(s): chromium-06 1621 s, chromium-02 1530 s,
  chromium-17 1482 s, chromium-21 1464 s

render_playwright_summary.cjs:

  • Reads failedBlockingTargetDetails and emits an addInfrastructureIssue(...) per failed target with the same detail — so the summary header goes from 1 CI/reporting failure(s) (generic) to lines like:

Playwright performance gate `Maximum shard execution` failed (target ≤ 1500 s) — exceeded on 4 shard(s): chromium-06 1621 s, chromium-02 1530 s, chromium-17 1482 s, chromium-21 1464 s.

Test plan

  • 5 new pytest cases (test_playwright_performance_gate.py) — threshold match against wrapper, offending-shards computation, exit-message formatting, end-to-end JSON payload.
  • All 84 tests under .github/scripts/tests/ pass locally.
  • Next merge-queue run: perf gate accepts shards up to 25 min, and any actual gate failure surfaces the specific shards in the PR comment.

Related: #30812 (planner all-zero-history fix), #30813 (plan-time warning), #30814 (harness baseline-freshness check), #30822 (glossary hang fix).

🤖 Generated with Claude Code

…l detail

Two related problems on the merge-queue Playwright run:

1. The blocking `executionAtMostTwentyOneMinutes` gate never moved when
   PR #30689 raised the shard-step wrapper from 21m to 25m. Healthy
   shards running 21-25 min (all tests passing, within the wrapper)
   were being marked as a gate failure — run 30736786802 tripped on
   this with 10 chromium shards over 21m execution. Renamed the target
   to `executionAtMostTwentyFiveMinutes`, threshold `1260` → `1500`.

2. When any blocking gate fails, the exit message was just:

     Blocking Playwright performance targets not met: executionAtMostTwentyOneMinutes

   The consolidated summary then said only "1 CI/reporting failure(s)"
   with no attribution to which target failed, which shard exceeded, or
   by how much. Every diagnosis had to open the raw job log.

   `evaluate_playwright_performance.py` now:
   - Owns a `BLOCKING_TARGET_DETAILS` map (label, phase field, threshold,
     unit) for the three phase-attributable blocking targets — execution,
     environment setup, and shard-elapsed-before-upload.
   - Computes `offending_shards()` per target from the per-shard
     `shard-phases.json` fixtures already flowing through the reporter.
   - Emits a `failedBlockingTargetDetails` block in the output JSON with
     each failed target's label, threshold, unit, and the sorted list of
     shards that exceeded it (shardId + lane + value).
   - Rewrites the exit message to name each failed target, its threshold,
     and up to five offending shards with actual seconds — e.g.
     `Maximum shard execution target ≤ 1500 s; exceeded on 4 shard(s):
     chromium-06 1621 s, chromium-02 1530 s, chromium-17 1482 s,
     chromium-21 1464 s`.

   `render_playwright_summary.cjs` now reads
   `failedBlockingTargetDetails` and emits an `addInfrastructureIssue`
   per failed blocking target with the same shard-level attribution. The
   summary header changes from a generic
   "1 CI/reporting failure(s)" to a line that names the failed gate and
   the shards that tripped it. Also updated the performance-table row to
   reference the renamed target key and the new 1500-s threshold.

5 new pytest cases cover the threshold match against the wrapper, the
offending-shards computation, the exit-message formatting, and the
end-to-end JSON output shape. 84 total tests pass locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings August 2, 2026 08:17
@github-actions

github-actions Bot commented Aug 2, 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 2, 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.

Pull request overview

This PR updates the Playwright CI performance gate to align with the existing 25-minute shard wrapper and improves failure diagnostics by surfacing shard-level attribution in both the gate failure message and the rendered PR summary comment.

Changes:

  • Updates the blocking execution gate from 21 minutes (1260s) to 25 minutes (1500s) and renames the target accordingly.
  • Adds shard-attribution details (failedBlockingTargetDetails) to the performance evaluator output and uses it to emit per-target infrastructure issues in the PR summary.
  • Adds pytest coverage to validate the new 25-minute threshold and shard-attribution payload/formatting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/scripts/evaluate_playwright_performance.py Renames/raises the blocking execution gate to 25 minutes and adds shard-level attribution metadata + richer exit messaging for failed blocking targets.
.github/scripts/render_playwright_summary.cjs Consumes failedBlockingTargetDetails and emits per-target infra issues; updates the summary table row to the new 25-minute execution target.
.github/scripts/tests/test_playwright_performance_gate.py Adds unit tests covering the updated threshold, offending-shards computation, exit message content, and JSON payload shape.

Comment on lines +145 to +164
for (const [name, detail] of Object.entries(failedBlockingTargetDetails)) {
const label = detail?.label ?? name;
const threshold = detail?.threshold;
const unit = detail?.unit ?? '';
const offending = Array.isArray(detail?.offendingShards)
? detail.offendingShards
: [];
const shardText = offending.length > 0
? ` — exceeded on ${offending.length} shard(s): ${
offending
.slice(0, 5)
.map(shard => `${shard.shardId ?? 'unknown'} ${shard.value ?? '?'} ${unit}`)
.join(', ')
}${offending.length > 5 ? ` (+${offending.length - 5} more)` : ''}`
: '';
const targetText = Number.isFinite(threshold) ? ` (target ≤ ${threshold} ${unit})` : '';
addInfrastructureIssue(
`Playwright performance gate \`${label}\` failed${targetText}${shardText}.`
);
}
import sys
from pathlib import Path

import pytest
- render_playwright_summary.cjs: build a `unitSuffix` (either ` ${unit}`
  or an empty string) and use it for both the shard and target segments
  of the failure message. Prevents trailing whitespace when a payload
  omits `unit` (older/malformed data).
- test_playwright_performance_gate.py: drop the unused `import pytest`.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 4e4d6617865325c3e903757b16fc93d443a037ab in Playwright run 30739777841, attempt 1.

✅ 549 passed · ❌ 0 failed · 🟡 1 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) 42m 33s

⏱️ Max setup 3m 4s · max shard execution 18m 9s · max shard-job elapsed before upload 21m 7s · reporting 5s

🌐 201.47 requests/attempt · 2.83 app boots/UI scenario · 3.58% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 201.47 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.83 per UI scenario (1620 boots / 572 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 139 0 0 3 0 0
🟡 Shard chromium-02 135 0 1 0 0 0
✅ Shard chromium-03 124 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
🟡 1 flaky test(s) (passed on retry)
  • Pages/Entity.spec.ts › Domain Propagation (shard chromium-02, 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

@chirag-madlani
chirag-madlani merged commit dc394bc into main Aug 2, 2026
74 of 75 checks passed
@chirag-madlani
chirag-madlani deleted the ci/perf-gate-align-and-detailed-summary branch August 2, 2026 09:10
@gitar-bot

gitar-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Aligns the Playwright performance gate timeout with the 25-minute wrapper and surfaces detailed shard-level failures in the summary output. 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

k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
…l detail (open-metadata#30824)

* ci(playwright): align perf gate with 25m wrapper + surface shard-level detail

Two related problems on the merge-queue Playwright run:

1. The blocking `executionAtMostTwentyOneMinutes` gate never moved when
   PR open-metadata#30689 raised the shard-step wrapper from 21m to 25m. Healthy
   shards running 21-25 min (all tests passing, within the wrapper)
   were being marked as a gate failure — run 30736786802 tripped on
   this with 10 chromium shards over 21m execution. Renamed the target
   to `executionAtMostTwentyFiveMinutes`, threshold `1260` → `1500`.

2. When any blocking gate fails, the exit message was just:

     Blocking Playwright performance targets not met: executionAtMostTwentyOneMinutes

   The consolidated summary then said only "1 CI/reporting failure(s)"
   with no attribution to which target failed, which shard exceeded, or
   by how much. Every diagnosis had to open the raw job log.

   `evaluate_playwright_performance.py` now:
   - Owns a `BLOCKING_TARGET_DETAILS` map (label, phase field, threshold,
     unit) for the three phase-attributable blocking targets — execution,
     environment setup, and shard-elapsed-before-upload.
   - Computes `offending_shards()` per target from the per-shard
     `shard-phases.json` fixtures already flowing through the reporter.
   - Emits a `failedBlockingTargetDetails` block in the output JSON with
     each failed target's label, threshold, unit, and the sorted list of
     shards that exceeded it (shardId + lane + value).
   - Rewrites the exit message to name each failed target, its threshold,
     and up to five offending shards with actual seconds — e.g.
     `Maximum shard execution target ≤ 1500 s; exceeded on 4 shard(s):
     chromium-06 1621 s, chromium-02 1530 s, chromium-17 1482 s,
     chromium-21 1464 s`.

   `render_playwright_summary.cjs` now reads
   `failedBlockingTargetDetails` and emits an `addInfrastructureIssue`
   per failed blocking target with the same shard-level attribution. The
   summary header changes from a generic
   "1 CI/reporting failure(s)" to a line that names the failed gate and
   the shards that tripped it. Also updated the performance-table row to
   reference the renamed target key and the new 1500-s threshold.

5 new pytest cases cover the threshold match against the wrapper, the
offending-shards computation, the exit-message formatting, and the
end-to-end JSON output shape. 84 total tests pass locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* address Copilot review nits

- render_playwright_summary.cjs: build a `unitSuffix` (either ` ${unit}`
  or an empty string) and use it for both the shard and target segments
  of the failure message. Prevents trailing whitespace when a payload
  omits `unit` (older/malformed data).
- test_playwright_performance_gate.py: drop the unused `import pytest`.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

This branch was previously deployed

1 inactive deployment
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