Skip to content

test(workflow-operator): share chart spec drivers and output schema checks - #9733

Merged
aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:test/chart-spec-fixtures
Nov 30, 2026
Merged

aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:test/chart-spec-fixtures

Conversation

@aglinxinyuan

@aglinxinyuan aglinxinyuan commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Thirty-nine chart operator specs share their Python drivers and two common checks instead of writing them out.

  • ChartPythonTestSupport, new next to the chart specs, runs a generated table operator inside the stubbed pytexera module, runs exported standalone code once per case and reads back the page it wrote, and parses the CASE <id> <verdict> lines that both drivers print. The Tables Plot and Figure Factory Table specs, which carried the same driver, call one verifyTableChartCases.
  • GeneratedCodeAssertions gains assertHtmlOutputSchema for the single html-content STRING output column, and expectEmptyFieldError for the "cannot be empty" validation errors.

Each spec keeps its own cases, inputs, expected pages and messages, and every case keeps its name and expected outcome, in the same order. PieChartOpDescSpec keeps its own checks because #9633 edits it.

Any related issues, documentation, discussions?

Closes #9732.

How was this PR tested?

  • sbt "WorkflowOperator/testOnly <the 42 chart suites>" with UDF_PYTHON_PATH set to a Python 3.12 that has pandas and plotly: main and this branch each run 378 cases in 42 suites (376 passing, 2 pending), with the same names, outcomes and order, compared case by case from the JUnit XML reports.
  • Mutation check: each break was applied to main and to this branch and reverted afterwards.
    • PythonVisualizationOpDesc naming its output column HTML-CONTENT: 10 output-schema cases fail on main and 24 on this branch, where every chart spec now checks the column's exact name.
    • Volcano Plot's exported code putting a space before the comma after its x-axis label: the same two export label cases fail on both.
    • Carpet Plot's exported code rewording its numeric-conversion error page: the same standalone page case fails on both.
  • sbt "WorkflowOperator/Test/scalafmtCheck" "WorkflowOperator/Test/scalafix --check".

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Codex (GPT-6) and Claude Code (Claude Opus 5.5 and Claude Fable 5.2)

…hecks

Thirty-eight chart operator specs wrote out the same pieces by hand: the stubbed
pytexera driver that runs a generated table operator, the driver that runs
exported standalone code once per case and reads back the page it wrote,
the CASE verdict parser, the html-content output schema check and the
empty-field error check. ChartPythonTestSupport now holds the two drivers
and the parser, and GeneratedCodeAssertions holds the two checks. Each spec
keeps its own cases, inputs and expected pages.
Copilot AI balanced review requested due to automatic review settings November 27, 2026 22:27
@aglinxinyuan aglinxinyuan self-assigned this Nov 27, 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @kz930, @eugenegujing
    You can notify them by mentioning @kz930, @eugenegujing in a comment.

@codecov-commenter

codecov-commenter commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.77%. Comparing base (923c982) to head (a92006a).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9733      +/-   ##
============================================
- Coverage     91.77%   91.77%   -0.01%     
+ Complexity     5136     5133       -3     
============================================
  Files          1308     1308              
  Lines         58048    58051       +3     
  Branches       7558     7558              
============================================
+ Hits          53274    53275       +1     
  Misses         2887     2887              
- Partials       1887     1889       +2     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø)
agent-service 99.56% <ø> (ø) Carriedforward from 7e1eeac
amber 85.94% <ø> (-0.01%) ⬇️
computing-unit-managing-service 63.84% <ø> (+0.03%) ⬆️
config-service 87.50% <ø> (ø)
file-service 82.16% <ø> (ø)
frontend 96.45% <ø> (ø) Carriedforward from 7e1eeac
notebook-migration-service 83.84% <ø> (ø)
pyamber 98.70% <ø> (ø) Carriedforward from 7e1eeac
result-service 86.48% <ø> (ø)
workflow-compiling-service 80.90% <ø> (ø)

*This pull request uses carry forward flags. 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:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 2 better · 🔴 4 worse · ⚪ 9 noise (<±5%) · 0 without baseline

Compared against main e8c37e6 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🟢 bs=10 sw=10 sl=64 846 0.516 11,438/14,830/14,830 us 🟢 -23.5% / 🔴 -16.0%
🔴 bs=100 sw=10 sl=64 1,866 1.139 52,305/63,778/63,778 us 🔴 +6.9% / 🟢 +35.9%
⚪ bs=1000 sw=10 sl=64 2,158 1.317 461,860/514,337/514,337 us ⚪ within ±5% / 🟢 +52.5%
Baseline details

Latest main e8c37e6 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 846 tuples/sec 873 tuples/sec 1,007 tuples/sec -3.1% -16.0%
bs=10 sw=10 sl=64 MB/s 0.516 MB/s 0.533 MB/s 0.615 MB/s -3.2% -16.0%
bs=10 sw=10 sl=64 p50 11,438 us 11,846 us 9,985 us -3.4% +14.6%
bs=10 sw=10 sl=64 p95 14,830 us 19,398 us 13,138 us -23.5% +12.9%
bs=10 sw=10 sl=64 p99 14,830 us 19,398 us 16,874 us -23.5% -12.1%
bs=100 sw=10 sl=64 throughput 1,866 tuples/sec 1,972 tuples/sec 1,373 tuples/sec -5.4% +35.9%
bs=100 sw=10 sl=64 MB/s 1.139 MB/s 1.203 MB/s 0.838 MB/s -5.3% +35.9%
bs=100 sw=10 sl=64 p50 52,305 us 50,055 us 77,555 us +4.5% -32.6%
bs=100 sw=10 sl=64 p95 63,778 us 59,657 us 84,312 us +6.9% -24.4%
bs=100 sw=10 sl=64 p99 63,778 us 59,657 us 96,779 us +6.9% -34.1%
bs=1000 sw=10 sl=64 throughput 2,158 tuples/sec 2,171 tuples/sec 1,415 tuples/sec -0.6% +52.5%
bs=1000 sw=10 sl=64 MB/s 1.317 MB/s 1.325 MB/s 0.864 MB/s -0.6% +52.5%
bs=1000 sw=10 sl=64 p50 461,860 us 459,687 us 756,894 us +0.5% -39.0%
bs=1000 sw=10 sl=64 p95 514,337 us 510,467 us 797,387 us +0.8% -35.5%
bs=1000 sw=10 sl=64 p99 514,337 us 510,467 us 849,332 us +0.8% -39.4%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,236.52,200,128000,846,0.516,11437.96,14829.91,14829.91
1,100,10,64,20,1071.76,2000,1280000,1866,1.139,52304.59,63777.89,63777.89
2,1000,10,64,20,9268.56,20000,12800000,2158,1.317,461859.85,514337.45,514337.45

@aglinxinyuan
aglinxinyuan requested a review from kunwp1 November 28, 2026 00:00

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

LGTM! One optional suggestion and two nits below.

The 13 specs that compared against expectedHtmlOutputSchema call
assertHtmlOutputSchema, which checks the column's exact name, and the
former is gone. FilledArea, BoxViolin and TreePlot use the shared
empty-field and output-schema checks. Volcano's two export label cases
pin their include lines again, trailing commas included, as on main.
@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Nov 30, 2026
Merged via the queue into apache:main with commit fe9f75a Nov 30, 2026
40 checks passed
@aglinxinyuan
aglinxinyuan deleted the test/chart-spec-fixtures branch November 30, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Share chart spec drivers and output schema checks

4 participants