test(e2e): use route.fallback in ETag strip so spec mocks still apply#30413
test(e2e): use route.fallback in ETag strip so spec mocks still apply#30413ShaileshParmar11 wants to merge 7 commits into
Conversation
The stripEtagConditionalReads catch-all page.route('**/api/v1/**') used
route.continue(), which terminates Playwright's route chain and sends the
request straight to the network. Because Playwright evaluates matching
handlers in reverse registration order and the strip is installed via
redirectToHomePage after each spec registers its own more-specific
route.fulfill() mocks, the catch-all ran first and shadowed those mocks —
forwarding /api/v1/rdf/** and /api/v1/services/ingestionPipelines/** to the
real backend.
Switch to route.fallback({ headers }) so the header is stripped and control
still defers to the earlier spec-specific mocks. Re-enable the two suites
that were skipped as a reaction to this regression.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013urWrUkaz75D39KfW3Z84o
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
Revert the un-skip of the RDF exports block. The route.fallback fix in common.ts still applies, but leave this suite disabled for now. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013urWrUkaz75D39KfW3Z84o
🔴 Playwright Results — workflow failedValidated commit ✅ 536 passed · ❌ 1 failed · 🟡 1 flaky · ⏭️ 5 skipped · 🧰 0 lifecycle flaky PerformanceBlocking 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) 50m 38s ⏱️ Max setup 2m 56s · max shard execution 15m 19s · max shard-job elapsed before upload 19m 42s · reporting 5s 🌐 199.83 requests/attempt · 2.86 app boots/UI scenario · 13.49% common-shard skew Optimization targets still in progress:
Genuine Failures (failed on all attempts)❌
|
Code Review ✅ Approved 1 resolved / 1 findingsSwitches the Playwright ETag-stripping route handler from route.continue() to route.fallback(), allowing spec-specific mocks to execute correctly. No issues found. ✅ 1 resolved✅ Quality: Unused isOpen=false branch in openCloseAgentActions
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Describe your changes:
Follow-up to #30371, which introduced
stripEtagConditionalReads.What / why: The ETag strip added in #30371 registered a catch-all
page.route('**/api/v1/**')that removedIf-None-Matchand then calledroute.continue(). Because Playwright evaluates matching route handlers in reverse registration order (last-registered runs first) androute.continue()terminates the chain, and because the strip is installed viaredirectToHomePageafter each spec registers its own more-specificroute.fulfill()mocks, the catch-all ran first and shadowed those mocks — forwarding the request to the real backend instead of the mocked response.Change: Switch the strip to
route.fallback({ headers })— Playwright's documented idiom for modifying headers on every request while still allowing other handlers to run. The header is stripped and control defers to the earlier spec-specific mocks; when no other handler exists,fallbackcontinues to the network with the stripped headers, so the original anti-stale-read behavior is byte-for-byte unchanged.Type of change:
High-level design:
N/A — small test-infra change.
Tests:
Use cases covered
/api/v1/**endpoints now receive their mocked responses instead of having the ETag catch-all bypass them.If-None-Matchstripped and a fresh200(unchanged from test(e2e): strip ETag If-None-Match at the network layer #30371).Unit tests
Not applicable.
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
openmetadata-ui/.../playwright/utils/common.ts(route.continue→route.fallback)openmetadata-ui/.../playwright/e2e/Features/ServiceAgentsPauseResume.spec.tsManual testing performed
End-to-end confirmation is the Playwright CI run on this branch. The mechanism is verified against Playwright's route-chain semantics: reverse-order handler evaluation +
fallbackdeferring to earlier handlers while preserving header overrides.UI screen recording / screenshots:
Not applicable — test-only change.
Checklist:
🤖 Generated with Claude Code
Summary by Gitar
waitForIncidentToBeIndexedutility to poll TestCase search for clearedincidentIdwhen verifying resolved statusServiceAgentsPauseResumespecThis will update automatically on new commits.
Greptile Summary
This PR updates Playwright E2E coverage for service-agent pause behavior and resolved data-quality incidents.
incidentIdbefore continuing after an incident is resolved.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (6): Last reviewed commit: "Work on the comments" | Re-trigger Greptile