Skip to content

ci(e2e): stop gunicorn worker recycling mid-run; slow-test budget for mixed-chart filter spec - #42867

Open
sadpandajoe wants to merge 2 commits into
masterfrom
pw-e2e-followups
Open

ci(e2e): stop gunicorn worker recycling mid-run; slow-test budget for mixed-chart filter spec#42867
sadpandajoe wants to merge 2 commits into
masterfrom
pw-e2e-followups

Conversation

@sadpandajoe

Copy link
Copy Markdown
Member

SUMMARY

Two small E2E follow-ups discovered while working on the edit-mode Playwright migration (#41438), which had already merged before these were pushed:

  1. Stop recycling the single gunicorn worker mid-run. The E2E backend runs with --workers 1 alongside --max-requests 500 --max-requests-jitter 50. With one worker there is nothing to roll over to, so every recycle takes the whole backend offline: gunicorn drains for the full 30s graceful timeout (browser keep-alive connections hold it open), then the replacement worker spends ~5s booting. A Playwright run issues roughly 3800 requests over ~8 minutes, so the cap fired seven times, producing seven ~35s outages — visible as flaky tests (retried past a hung navigation) rather than as an infra failure. Removing the recycle removes the outage; there's no leak evidence over an 8-minute process to justify keeping it.
  2. Give mixed-chart-dashboard-filters.spec.ts the slow-test budget. Every sibling dashboard spec that builds its fixtures over the API (clear-all-filters, gauge-interval, dashboard-controls) raises its timeout to TIMEOUT.SLOW_TEST. This one didn't, despite doing four API round-trips before a full dashboard load with a preselected native filter.

TESTING INSTRUCTIONS

  • CI: playwright-tests / playwright-tests-required should show fewer/no flaky retries tied to worker-recycle windows.
  • mixed-chart-dashboard-filters.spec.ts runs under its own budget instead of the 30s default.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration
  • Introduces new feature or API
  • Removes existing feature or API

sadpandajoe and others added 2 commits August 6, 2026 15:32
The E2E backend runs with `--workers 1` (deliberately — multi-worker
exposes races in the SQL Lab to Explore flow) alongside `--max-requests
500 --max-requests-jitter 50`. With one worker there is nothing to roll
over to, so every recycle takes the whole backend offline: gunicorn
drains for the full 30s graceful timeout because browser keep-alive
connections stay open, then the replacement worker spends ~5s booting
Superset.

A Playwright run issues roughly 3800 requests over ~8 minutes, so the
cap fired seven times, producing seven ~35s total outages. Specs that
happened to navigate during one timed out waiting for the page to
render and were rescued by retries — visible as "flaky" rather than as
failures. Cypress runs hit the same windows, absorbed by
`cypress_run.py --retries 5`.

Lowering `--graceful-timeout` is not sufficient: even at 5s the gap
exceeds the 6-10s a dashboard load plus chart render needs. Removing
the recycle removes the outage, and there is no leak evidence to
justify keeping it for an 8-minute process.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every other dashboard spec that builds its fixtures over the API — the
clear-all-filters, gauge-interval, and dashboard-controls specs — raises
its budget to TIMEOUT.SLOW_TEST. This one did not, so it ran on the 30s
config default despite doing four API round-trips before a full
dashboard load with a preselected native filter.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dosubot dosubot Bot added the infra:webserver Infra setup and configuration related to webserver label Aug 6, 2026
@bito-code-review

bito-code-review Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #10ba52

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: b0bc04a..7e772fd
    • .github/workflows/bashlib.sh
    • superset-frontend/playwright/tests/dashboard/mixed-chart-dashboard-filters.spec.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label Aug 6, 2026
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.29%. Comparing base (01a9fdc) to head (7e772fd).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #42867      +/-   ##
==========================================
+ Coverage   65.73%   66.29%   +0.55%     
==========================================
  Files        2843     2857      +14     
  Lines      162666   162825     +159     
  Branches    37239    37356     +117     
==========================================
+ Hits       106926   107940    +1014     
+ Misses      53647    52792     -855     
  Partials     2093     2093              
Flag Coverage Δ
javascript 73.18% <ø> (+1.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code infra:webserver Infra setup and configuration related to webserver size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant