Skip to content

workload-replay: add console-scalability nightly workflow - #38048

Merged
leedqin merged 6 commits into
MaterializeInc:mainfrom
leedqin:console-scalability-nightly
Aug 6, 2026
Merged

workload-replay: add console-scalability nightly workflow#38048
leedqin merged 6 commits into
MaterializeInc:mainfrom
leedqin:console-scalability-nightly

Conversation

@leedqin

@leedqin leedqin commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Adds a nightly CI step that measures console performance against replayed production workloads.

For each captured workload (sharded across 3 parallel jobs, --skip-large, 1% initial data), the console-scalability workflow:

  1. Boots the workload and waits for hydration.
  2. Keeps the captured queries and ingestions running as background load.
  3. Runs the Playwright scalability suite (page loads, per-query timing audits, multi-tab stress) against the console bundled in the materialized image.
  4. Replays the freshly dumped console query set with k6, ramping 0→100 virtual users against the SQL HTTP endpoint.
  5. Uploads per-workload timing reports, query dumps, and k6 summaries as build artifacts.

The runs are metrics-only while thresholds are determined from nightly trends: test failures and k6 threshold breaches are logged but do not fail the step. A red step means infrastructure breakage.

Supporting changes:

  • The workload-replay executor's test() gains an optional during_continuous callback, so the continuous load phase can last exactly as long as the tests.
  • mzcompose allows the ipc service config key (Chromium needs more than the 64MB /dev/shm docker default).
  • The k6 script's labels are refreshed for the current console query set (clusters.list and replicaUtilizationHistory are SUBSCRIBE-fed now and no longer appear as HTTP queries).

Validated end-to-end in nightly build 17658 (single-workload version): 13/14 Playwright tests passed under load, k6 completed the full ramp with 0% request failures, and all artifacts uploaded. The two k6 p95 outliers it found (clusterFreshness 3.8s, materializationLag 4.9s at 100 VUs) match the known production bottleneck ranking.

Motivation

Gives us recurring visibility into console performance under load. Part of CNS-122.

🤖 Generated with Claude Code

Run the console Playwright scalability suite against the console bundled
in the materialized image while a captured workload (prod-analytics by
default) provides continuous ingestion and query load.

The suite only reports timings. Suite failures do not fail the workflow,
the nightly runs collect data for determining thresholds. A red step
means infrastructure breakage.

* executor: test() gains a during_continuous callback. When set, the
  continuous phase runs until the callback returns instead of for a
  fixed runtime.
* workload-replay: new console-scalability workflow and a Playwright
  runner service. The image tag must track @playwright/test in
  console/package.json so the preinstalled browsers stay compatible.
* mzcompose: allow the ipc service config key, used to give Chromium a
  usable /dev/shm.
* nightly: new console-scalability step. Uploads Playwright artifacts
  and the dumped console query set, which doubles as a fresh k6 input.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@leedqin leedqin added the ci-nightly PR CI control: also trigger Nightly label Aug 4, 2026
leedqin and others added 3 commits August 4, 2026 11:52
After the Playwright suite finishes, replay the query set that its
dump-queries step captured against the SQL HTTP endpoint at increasing
virtual-user counts, while the workload load keeps running. Like the
Playwright suite, k6 failures (including its thresholds) do not fail
the workflow, the summary export is uploaded for determining
thresholds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Tear down the idle Playwright runner container when the workflow ends
  so it cannot outlive the workflow into CI teardown.
* Raise the page-load visibility ceiling to 120s. The suite measures
  load times rather than asserting them, and the navigation-flow test
  hit the old 30s ceiling under workload-replay load.
* Refresh the k6 label set. clusters.list and replicaUtilizationHistory
  are SUBSCRIBE-fed now and never appear in queries.json, so their
  thresholds passed vacuously on empty metrics. Replace them with the
  newly captured maintainedObjectNames, replicaOfflineEvents, and
  roles.owners labels, with poll intervals matching the console.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-nightly

# Conflicts:
#	console/e2e-tests/k6/cluster-detail.ts
@leedqin
leedqin marked this pull request as ready for review August 4, 2026 19:28
@leedqin
leedqin requested review from a team as code owners August 4, 2026 19:28
@leedqin
leedqin requested review from def- and jdonelson August 4, 2026 19:28

@def- def- 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.

Nice idea! Let's see how stable this will be.

Comment thread test/workload-replay/mzcompose.py Outdated
parser.add_argument(
"files",
nargs="*",
default=["workload_prod_analytics.yml"],

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.

Why are we only running against this one file by default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the console suite measures fixed pages whose query cost scales with the catalog shape (object counts), not the data content — running every workload would mostly re-measure the same queries against smaller catalogs, and night-over-night timing trends are only comparable against a stable shape. prod-analytics is the largest capture (1,002 tables, 25 MVs, 7 clusters), so it's the single most representative one. Other workloads can still be passed explicitly, e.g. run console-scalability workload_ddnet.yml for a quick local run. Documented the rationale in 80fbbe4 — and if per-shape coverage becomes interesting later, sharding it like the benchmark step is straightforward.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in 912516f: the workflow now runs every captured workload, sharded across parallel jobs like the benchmark step (--skip-large in nightly), with per-workload Playwright output and k6 dumps/summaries as artifacts.

@def-

def- commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

One side note: when you trigger nightly and you only changed one workload, you can only run that one; instead of all of it

leedqin and others added 2 commits August 5, 2026 16:32
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Shard the workloads across parallel jobs like the benchmark workflow,
with --skip-large in nightly. Playwright output and the k6 query dump
and summary are kept per workload so artifacts from one workload do not
overwrite the next one's.

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

leedqin commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback: as of 912516f the scalability tests now run against all captured workloads instead of just prod-analytics. The workloads are sharded across parallel jobs like the benchmark step (--skip-large in nightly), and each workload keeps its own Playwright output and k6 query dump/summary as build artifacts.

@leedqin
leedqin merged commit 533cabe into MaterializeInc:main Aug 6, 2026
332 of 335 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-nightly PR CI control: also trigger Nightly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants