Skip to content

ci(playwright): raise shard timeouts 21m/30m → 25m/35m (hotfix) - #30689

Merged
chirag-madlani merged 1 commit into
mainfrom
ci/bump-playwright-shard-timeout
Jul 30, 2026
Merged

chirag-madlani merged 1 commit into
mainfrom
ci/bump-playwright-shard-timeout

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Jul 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Hotfix — chromium-07 on PR #30681 was TERM'd at exactly PW_EXECUTION_SECONDS=1260 (21 min), blocking the merge queue: https://github.com/open-metadata/OpenMetadata/actions/runs/30526682203/job/90823511137

The planner budgets shards to a 20 min target and LPT can pack right up against that ceiling. A 21m inner timeout has only 60s of drift room before it kills a shard whose tests are still running fine. Same class of failure as the earlier chromium-09 diagnosis (which hit the 30m job clock).

  • Inner (timeout ... 21m on npx playwright test) → 25m — 5m headroom above the 20m planner target, enough to absorb LPT imprecision + per-test retries.
  • Outer (timeout-minutes: 30) → 35m — keeps setup + tests + teardown under the job clock even on slow runners.

Not masking real regressions — plan-playwright's LPT still targets 20m, timing history + shadow gate still catch drift. This just stops the wrappers from firing before the planner's own signal does.

Test plan

  • YAML parses
  • Merge-queue chromium shards stop hitting the 21m timeout mid-test
  • No shard blows past 35m (would indicate a real regression to investigate)

Greptile Summary

Raises the PostgreSQL Playwright shard’s inner test timeout from 21 to 25 minutes and its GitHub Actions job timeout from 30 to 35 minutes.

  • Adds comments documenting the planner, setup, execution, and teardown budget.
  • Provides additional headroom for shards approaching the planner’s 20-minute target.

Confidence Score: 5/5

The PR appears safe to merge because the timeout changes consistently increase execution and job-level headroom.

The Playwright wrapper remains shorter than the enclosing job timeout, and the changed values do not alter test selection, shell input handling, permissions, or artifact behavior.

Important Files Changed

Filename Overview
.github/workflows/playwright-postgresql-e2e.yml The inner and outer timeout increases remain ordered correctly and introduce no actionable workflow defect.

Reviews (1): Last reviewed commit: "ci(playwright): raise shard timeouts 21m..." | Re-trigger Greptile

Hotfix — PR #30681's chromium-07 shard was TERM'd at exactly
PW_EXECUTION_SECONDS=1260 (21 min), blocking the merge queue. The
planner budgets shards to a 20 min target and LPT can pack right up
against that ceiling; a 21m inner timeout has only 60s of drift room
before it kills a shard whose tests are still running fine.

- Inner (`timeout ... 21m` around `npx playwright test`) → 25m: 5m
  headroom above the 20m planner target, enough to absorb LPT
  imprecision plus per-test retries without cliff-edge failures.
- Outer (`timeout-minutes: 30`) → 35m: keeps setup + tests + teardown
  under the job clock. The earlier chromium-09 diagnosis showed slow
  shards hitting the 30m job timeout even when playwright itself
  finished under the inner wrapper — same class of false-negative.

We're not "hiding" slow shards — plan-playwright's LPT bin-packing
still targets 20m, and the shadow-gate + timing history still catch
drift. This just stops the wrapper from firing before the planner's
own signal does.
Copilot AI review requested due to automatic review settings July 30, 2026 09:23

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

gitar-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Increases Playwright shard inner and outer timeouts to prevent premature termination during long-running tests in the merge queue. 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

@chirag-madlani
chirag-madlani merged commit 754eae0 into main Jul 30, 2026
59 of 61 checks passed
@chirag-madlani
chirag-madlani deleted the ci/bump-playwright-shard-timeout branch July 30, 2026 09:30
siddhant1 added a commit that referenced this pull request Jul 31, 2026
#30689 raised the shard step's `timeout ... 21m` wrapper to 25m and the job
`timeout-minutes` 30 -> 35, but left the blocking performance target at
`maxExecutionSeconds <= 1260`. That opened a 21-25 minute band where a shard
completes well inside its timeout and every test passes, yet
evaluate_playwright_performance.py fails the run and playwright-summary
reports it as a CI/reporting failure with zero test failures.

Merge-queue run 30590319979 for #30451 landed in exactly that band: all 34
shards green, slowest execution 1396s, blocked solely by this target.

Move the target to 1500s so it tracks the wrapper, and rename it to match.
timothybrush pushed a commit to timothybrush/OpenMetadata that referenced this pull request Jul 31, 2026
…pen-metadata#30451)

* test(ui): re-enable Domains, Data Product & domain-rename E2E suites

Re-enables E2E coverage that was disabled by the mass-skip open-metadata#29909 and a
few one-off skips, fixing the tests that had broken from UI migrations.

Fixed:
- Domains (9 suites): 47/49 already passed once run; fixed the 2 real
  failures, both migration selector drifts — "Add Assets" moved to the
  core-ui `asset-selection-modal` Dialog (old `form-heading` testid
  gone), and the tree toggle is now a `radio`, not a `button`.
- DomainDataProductsWidgets: marked `test.describe.serial` (the suite is
  one sequential scenario: assign widgets -> add assets -> verify ->
  remove), and fixed the data-product asset-removal count-timing bug —
  wait for the asset card to render before counting, otherwise count()
  reads 0 and removes nothing.
- GlossaryNavigation empty-state: assert the empty-glossary placeholder
  (message.no-glossary-term) instead of the "No Glossary Term found" row
  that only a non-matching status filter shows.

Unskipped as-is (passed without changes):
- Glossary "Request description task for Glossary Term"
- EntityRenameConsolidation domain rename (x2)

Left skipped (blocked on product/BE work, still documented):
- DataMarketplace x3 (routes removed in open-metadata#27377)
- GlossaryStatusFilterNestedTerms x5 (flat nested status-filter results
  not implemented; status-only queries route through directChildrenOf)
- Glossary "Term should stay approved" (BE approval-workflow reverts it)

BulkImport is untouched.

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

* fix(e2e): repair three specs that broke against current main

Domains "Create DataProducts and add remove assets": the assets empty-state
CTA lost its data-testid in open-metadata#30489 — CreatePlaceholder maps the action's id
onto the button's DOM id — so select it by id instead.

GlossaryNavigation empty state: open-metadata#30057 replaced the ErrorPlaceHolder text
("...there are no Glossary Terms defined...") with an EmptyPlaceholder, and
message.no-glossary-term is now unused. Assert the placeholder testid, matching
CustomizeDetailPage.spec.ts.

Glossary "Request description task for Glossary Term": restore
{ navigate: true } so performAdminLogin returns an authenticated page rather
than taking the API-only path, and replace the one-shot textContent read with a
web-first assertion — it read an empty container before the description
rendered, mirroring the sibling glossary-level test.

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

* ci(playwright): track the 25m shard wrapper in the perf gate

open-metadata#30689 raised the shard step's `timeout ... 21m` wrapper to 25m and the job
`timeout-minutes` 30 -> 35, but left the blocking performance target at
`maxExecutionSeconds <= 1260`. That opened a 21-25 minute band where a shard
completes well inside its timeout and every test passes, yet
evaluate_playwright_performance.py fails the run and playwright-summary
reports it as a CI/reporting failure with zero test failures.

Merge-queue run 30590319979 for open-metadata#30451 landed in exactly that band: all 34
shards green, slowest execution 1396s, blocked solely by this target.

Move the target to 1500s so it tracks the wrapper, and rename it to match.

* ci(playwright): give shards 30m and keep the gates tracking the wrapper

chromium-18 was killed by the 25m timeout wrapper on merge-queue run
30603720876 (exit 124, PW_EXECUTION_SECONDS=1500): 244 tests planned, 236
finished, 8 never ran. The shard genuinely needs more than 25 minutes, so
raising the gate alone is not enough — the wrapper has to move too.

- shard wrapper 25m -> 30m
- job timeout-minutes 35 -> 40; the killed job's wall was 28m46s against a
  25m wrapper, so overhead is ~4m and 35 would leave almost none. Keeping the
  job clock a clear 10m above the wrapper means the wrapper always trips
  first, which fails the shard cleanly instead of cancelling mid-upload.
- executionAtMostTwentyFiveMinutes (1500) -> executionAtMostThirtyMinutes (1800)
- shardsAtMostThirtyMinutesBeforeUpload (1800) ->
  shardsAtMostThirtyFiveMinutesBeforeUpload (2100); elapsed runs ~200s above
  execution, so a 30m wrapper would otherwise breach the old 1800s cap.

This does not reduce the underlying skew: the same run had 35.67% common
shard skew, so one shard runs ~30m while others finish in 3m. That stays a
convergence warning and wants a planner fix, not a bigger timeout.

* ci(playwright): restore real weights for re-enabled specs in the timing baseline

The planner weights every test from timing-baseline.json. load_history pins a
recorded `skipped` entry to 0:

    elif test_id and test.get("outcome") == "skipped":
        durations[test_id].append(0)

and build_playwright_shards.py reads it as

    test_weights.get(test_id, identity_weights.get(..., FALLBACK_TEST_MS))

so an explicit 0 wins over the 20 s fallback. Once a PR re-enables those specs
the planner still costs them at zero, packs them onto one shard, and the shard
overruns its wrapper with no warning: on merge-queue run 30603720876 chromium-18
was predicted at 18.8 min (predictedExecutionMs 1128075) and was killed at the
25 min wrapper with 8 of 244 tests unrun. Domains.spec.ts alone ran 1157 s there
against a recorded weight of 0.

Refresh the 76 entries that were recorded `skipped` with 0 ms and have real
durations in the timing history of run 30590319979 (mode=full, all 34 shards
green): +1500 s of weight the planner could not previously see. Entries still
skipped in that run keep their zero, and the two genuinely instant `expected`
0 ms entries are left alone — they already fall through to FALLBACK_TEST_MS,
and test_versioned_baseline_only_uses_zero_weight_for_skipped_ids asserts it.

Replanned locally against the real `playwright test --list` for this branch:

    workers  Domains.spec.ts spread   max tests/shard   chromium shards
    3        2 -> 9 shards            243 -> 213        22 -> 23
    4        2 -> 7 shards            343 -> 280        17 -> 17

Predicted execution stays ~18.5-18.8 min, but it is now honest: the weight the
shard actually carries is visible to the planner instead of arriving as ~7.5 min
of unbudgeted work at 3 workers.

* Revert "ci(playwright): restore real weights for re-enabled specs in the timing baseline"

Drops the timing-baseline.json change from this PR so it carries only the
re-enabled specs. The zero-weight planner blind spot it addressed is real —
Domains.spec.ts is recorded at 0 ms against ~1073 s of actual work, which is
what let chromium-18 be planned at 18.8 min and killed by the 25 min wrapper —
but it will be handled by splitting the spec instead: moving the tests to new
files changes their Playwright ids (the id prefix is a per-file hash), so the
stale zero-weight entries no longer match and the tests fall through to
FALLBACK_TEST_MS.

Note this also gives up the restored weights for the other files the baseline
patch covered, ~468 s in total, notably DomainDataProductsWidgets.spec.ts
(186.5 s) and EntityRenameConsolidation.spec.ts (26.6 s), both re-enabled by
this PR and now back at zero.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
siddhant1 added a commit that referenced this pull request Jul 31, 2026
…30451) (#30777)

* test(ui): re-enable Domains, Data Product & domain-rename E2E suites

Re-enables E2E coverage that was disabled by the mass-skip #29909 and a
few one-off skips, fixing the tests that had broken from UI migrations.

Fixed:
- Domains (9 suites): 47/49 already passed once run; fixed the 2 real
  failures, both migration selector drifts — "Add Assets" moved to the
  core-ui `asset-selection-modal` Dialog (old `form-heading` testid
  gone), and the tree toggle is now a `radio`, not a `button`.
- DomainDataProductsWidgets: marked `test.describe.serial` (the suite is
  one sequential scenario: assign widgets -> add assets -> verify ->
  remove), and fixed the data-product asset-removal count-timing bug —
  wait for the asset card to render before counting, otherwise count()
  reads 0 and removes nothing.
- GlossaryNavigation empty-state: assert the empty-glossary placeholder
  (message.no-glossary-term) instead of the "No Glossary Term found" row
  that only a non-matching status filter shows.

Unskipped as-is (passed without changes):
- Glossary "Request description task for Glossary Term"
- EntityRenameConsolidation domain rename (x2)

Left skipped (blocked on product/BE work, still documented):
- DataMarketplace x3 (routes removed in #27377)
- GlossaryStatusFilterNestedTerms x5 (flat nested status-filter results
  not implemented; status-only queries route through directChildrenOf)
- Glossary "Term should stay approved" (BE approval-workflow reverts it)

BulkImport is untouched.



* fix(e2e): repair three specs that broke against current main

Domains "Create DataProducts and add remove assets": the assets empty-state
CTA lost its data-testid in #30489 — CreatePlaceholder maps the action's id
onto the button's DOM id — so select it by id instead.

GlossaryNavigation empty state: #30057 replaced the ErrorPlaceHolder text
("...there are no Glossary Terms defined...") with an EmptyPlaceholder, and
message.no-glossary-term is now unused. Assert the placeholder testid, matching
CustomizeDetailPage.spec.ts.

Glossary "Request description task for Glossary Term": restore
{ navigate: true } so performAdminLogin returns an authenticated page rather
than taking the API-only path, and replace the one-shot textContent read with a
web-first assertion — it read an empty container before the description
rendered, mirroring the sibling glossary-level test.



* ci(playwright): track the 25m shard wrapper in the perf gate

#30689 raised the shard step's `timeout ... 21m` wrapper to 25m and the job
`timeout-minutes` 30 -> 35, but left the blocking performance target at
`maxExecutionSeconds <= 1260`. That opened a 21-25 minute band where a shard
completes well inside its timeout and every test passes, yet
evaluate_playwright_performance.py fails the run and playwright-summary
reports it as a CI/reporting failure with zero test failures.

Merge-queue run 30590319979 for #30451 landed in exactly that band: all 34
shards green, slowest execution 1396s, blocked solely by this target.

Move the target to 1500s so it tracks the wrapper, and rename it to match.

* ci(playwright): give shards 30m and keep the gates tracking the wrapper

chromium-18 was killed by the 25m timeout wrapper on merge-queue run
30603720876 (exit 124, PW_EXECUTION_SECONDS=1500): 244 tests planned, 236
finished, 8 never ran. The shard genuinely needs more than 25 minutes, so
raising the gate alone is not enough — the wrapper has to move too.

- shard wrapper 25m -> 30m
- job timeout-minutes 35 -> 40; the killed job's wall was 28m46s against a
  25m wrapper, so overhead is ~4m and 35 would leave almost none. Keeping the
  job clock a clear 10m above the wrapper means the wrapper always trips
  first, which fails the shard cleanly instead of cancelling mid-upload.
- executionAtMostTwentyFiveMinutes (1500) -> executionAtMostThirtyMinutes (1800)
- shardsAtMostThirtyMinutesBeforeUpload (1800) ->
  shardsAtMostThirtyFiveMinutesBeforeUpload (2100); elapsed runs ~200s above
  execution, so a 30m wrapper would otherwise breach the old 1800s cap.

This does not reduce the underlying skew: the same run had 35.67% common
shard skew, so one shard runs ~30m while others finish in 3m. That stays a
convergence warning and wants a planner fix, not a bigger timeout.

* ci(playwright): restore real weights for re-enabled specs in the timing baseline

The planner weights every test from timing-baseline.json. load_history pins a
recorded `skipped` entry to 0:

    elif test_id and test.get("outcome") == "skipped":
        durations[test_id].append(0)

and build_playwright_shards.py reads it as

    test_weights.get(test_id, identity_weights.get(..., FALLBACK_TEST_MS))

so an explicit 0 wins over the 20 s fallback. Once a PR re-enables those specs
the planner still costs them at zero, packs them onto one shard, and the shard
overruns its wrapper with no warning: on merge-queue run 30603720876 chromium-18
was predicted at 18.8 min (predictedExecutionMs 1128075) and was killed at the
25 min wrapper with 8 of 244 tests unrun. Domains.spec.ts alone ran 1157 s there
against a recorded weight of 0.

Refresh the 76 entries that were recorded `skipped` with 0 ms and have real
durations in the timing history of run 30590319979 (mode=full, all 34 shards
green): +1500 s of weight the planner could not previously see. Entries still
skipped in that run keep their zero, and the two genuinely instant `expected`
0 ms entries are left alone — they already fall through to FALLBACK_TEST_MS,
and test_versioned_baseline_only_uses_zero_weight_for_skipped_ids asserts it.

Replanned locally against the real `playwright test --list` for this branch:

    workers  Domains.spec.ts spread   max tests/shard   chromium shards
    3        2 -> 9 shards            243 -> 213        22 -> 23
    4        2 -> 7 shards            343 -> 280        17 -> 17

Predicted execution stays ~18.5-18.8 min, but it is now honest: the weight the
shard actually carries is visible to the planner instead of arriving as ~7.5 min
of unbudgeted work at 3 workers.

* Revert "ci(playwright): restore real weights for re-enabled specs in the timing baseline"

Drops the timing-baseline.json change from this PR so it carries only the
re-enabled specs. The zero-weight planner blind spot it addressed is real —
Domains.spec.ts is recorded at 0 ms against ~1073 s of actual work, which is
what let chromium-18 be planned at 18.8 min and killed by the 25 min wrapper —
but it will be handled by splitting the spec instead: moving the tests to new
files changes their Playwright ids (the id prefix is a per-file hash), so the
stale zero-weight entries no longer match and the tests fall through to
FALLBACK_TEST_MS.

Note this also gives up the restored weights for the other files the baseline
patch covered, ~468 s in total, notably DomainDataProductsWidgets.spec.ts
(186.5 s) and EntityRenameConsolidation.spec.ts (26.6 s), both re-enabled by
this PR and now back at zero.

---------


(cherry picked from commit 64c33fc)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chirag-madlani added a commit that referenced this pull request Aug 2, 2026
…l detail (#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 #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) <noreply@anthropic.com>

* 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) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
…pen-metadata#30451)

* test(ui): re-enable Domains, Data Product & domain-rename E2E suites

Re-enables E2E coverage that was disabled by the mass-skip open-metadata#29909 and a
few one-off skips, fixing the tests that had broken from UI migrations.

Fixed:
- Domains (9 suites): 47/49 already passed once run; fixed the 2 real
  failures, both migration selector drifts — "Add Assets" moved to the
  core-ui `asset-selection-modal` Dialog (old `form-heading` testid
  gone), and the tree toggle is now a `radio`, not a `button`.
- DomainDataProductsWidgets: marked `test.describe.serial` (the suite is
  one sequential scenario: assign widgets -> add assets -> verify ->
  remove), and fixed the data-product asset-removal count-timing bug —
  wait for the asset card to render before counting, otherwise count()
  reads 0 and removes nothing.
- GlossaryNavigation empty-state: assert the empty-glossary placeholder
  (message.no-glossary-term) instead of the "No Glossary Term found" row
  that only a non-matching status filter shows.

Unskipped as-is (passed without changes):
- Glossary "Request description task for Glossary Term"
- EntityRenameConsolidation domain rename (x2)

Left skipped (blocked on product/BE work, still documented):
- DataMarketplace x3 (routes removed in open-metadata#27377)
- GlossaryStatusFilterNestedTerms x5 (flat nested status-filter results
  not implemented; status-only queries route through directChildrenOf)
- Glossary "Term should stay approved" (BE approval-workflow reverts it)

BulkImport is untouched.

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

* fix(e2e): repair three specs that broke against current main

Domains "Create DataProducts and add remove assets": the assets empty-state
CTA lost its data-testid in open-metadata#30489 — CreatePlaceholder maps the action's id
onto the button's DOM id — so select it by id instead.

GlossaryNavigation empty state: open-metadata#30057 replaced the ErrorPlaceHolder text
("...there are no Glossary Terms defined...") with an EmptyPlaceholder, and
message.no-glossary-term is now unused. Assert the placeholder testid, matching
CustomizeDetailPage.spec.ts.

Glossary "Request description task for Glossary Term": restore
{ navigate: true } so performAdminLogin returns an authenticated page rather
than taking the API-only path, and replace the one-shot textContent read with a
web-first assertion — it read an empty container before the description
rendered, mirroring the sibling glossary-level test.

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

* ci(playwright): track the 25m shard wrapper in the perf gate

open-metadata#30689 raised the shard step's `timeout ... 21m` wrapper to 25m and the job
`timeout-minutes` 30 -> 35, but left the blocking performance target at
`maxExecutionSeconds <= 1260`. That opened a 21-25 minute band where a shard
completes well inside its timeout and every test passes, yet
evaluate_playwright_performance.py fails the run and playwright-summary
reports it as a CI/reporting failure with zero test failures.

Merge-queue run 30590319979 for open-metadata#30451 landed in exactly that band: all 34
shards green, slowest execution 1396s, blocked solely by this target.

Move the target to 1500s so it tracks the wrapper, and rename it to match.

* ci(playwright): give shards 30m and keep the gates tracking the wrapper

chromium-18 was killed by the 25m timeout wrapper on merge-queue run
30603720876 (exit 124, PW_EXECUTION_SECONDS=1500): 244 tests planned, 236
finished, 8 never ran. The shard genuinely needs more than 25 minutes, so
raising the gate alone is not enough — the wrapper has to move too.

- shard wrapper 25m -> 30m
- job timeout-minutes 35 -> 40; the killed job's wall was 28m46s against a
  25m wrapper, so overhead is ~4m and 35 would leave almost none. Keeping the
  job clock a clear 10m above the wrapper means the wrapper always trips
  first, which fails the shard cleanly instead of cancelling mid-upload.
- executionAtMostTwentyFiveMinutes (1500) -> executionAtMostThirtyMinutes (1800)
- shardsAtMostThirtyMinutesBeforeUpload (1800) ->
  shardsAtMostThirtyFiveMinutesBeforeUpload (2100); elapsed runs ~200s above
  execution, so a 30m wrapper would otherwise breach the old 1800s cap.

This does not reduce the underlying skew: the same run had 35.67% common
shard skew, so one shard runs ~30m while others finish in 3m. That stays a
convergence warning and wants a planner fix, not a bigger timeout.

* ci(playwright): restore real weights for re-enabled specs in the timing baseline

The planner weights every test from timing-baseline.json. load_history pins a
recorded `skipped` entry to 0:

    elif test_id and test.get("outcome") == "skipped":
        durations[test_id].append(0)

and build_playwright_shards.py reads it as

    test_weights.get(test_id, identity_weights.get(..., FALLBACK_TEST_MS))

so an explicit 0 wins over the 20 s fallback. Once a PR re-enables those specs
the planner still costs them at zero, packs them onto one shard, and the shard
overruns its wrapper with no warning: on merge-queue run 30603720876 chromium-18
was predicted at 18.8 min (predictedExecutionMs 1128075) and was killed at the
25 min wrapper with 8 of 244 tests unrun. Domains.spec.ts alone ran 1157 s there
against a recorded weight of 0.

Refresh the 76 entries that were recorded `skipped` with 0 ms and have real
durations in the timing history of run 30590319979 (mode=full, all 34 shards
green): +1500 s of weight the planner could not previously see. Entries still
skipped in that run keep their zero, and the two genuinely instant `expected`
0 ms entries are left alone — they already fall through to FALLBACK_TEST_MS,
and test_versioned_baseline_only_uses_zero_weight_for_skipped_ids asserts it.

Replanned locally against the real `playwright test --list` for this branch:

    workers  Domains.spec.ts spread   max tests/shard   chromium shards
    3        2 -> 9 shards            243 -> 213        22 -> 23
    4        2 -> 7 shards            343 -> 280        17 -> 17

Predicted execution stays ~18.5-18.8 min, but it is now honest: the weight the
shard actually carries is visible to the planner instead of arriving as ~7.5 min
of unbudgeted work at 3 workers.

* Revert "ci(playwright): restore real weights for re-enabled specs in the timing baseline"

Drops the timing-baseline.json change from this PR so it carries only the
re-enabled specs. The zero-weight planner blind spot it addressed is real —
Domains.spec.ts is recorded at 0 ms against ~1073 s of actual work, which is
what let chromium-18 be planned at 18.8 min and killed by the 25 min wrapper —
but it will be handled by splitting the spec instead: moving the tests to new
files changes their Playwright ids (the id prefix is a per-file hash), so the
stale zero-weight entries no longer match and the tests fall through to
FALLBACK_TEST_MS.

Note this also gives up the restored weights for the other files the baseline
patch covered, ~468 s in total, notably DomainDataProductsWidgets.spec.ts
(186.5 s) and EntityRenameConsolidation.spec.ts (26.6 s), both re-enabled by
this PR and now back at zero.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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) <noreply@anthropic.com>

* 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) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

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.

2 participants