Repository navigation
test(workflow-operator): share chart spec drivers and output schema checks - #9733
Conversation
…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.
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| 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
kunwp1
left a comment
There was a problem hiding this comment.
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.
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 stubbedpytexeramodule, runs exported standalone code once per case and reads back the page it wrote, and parses theCASE <id> <verdict>lines that both drivers print. The Tables Plot and Figure Factory Table specs, which carried the same driver, call oneverifyTableChartCases.GeneratedCodeAssertionsgainsassertHtmlOutputSchemafor the singlehtml-contentSTRING output column, andexpectEmptyFieldErrorfor 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.
PieChartOpDescSpeckeeps 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>"withUDF_PYTHON_PATHset 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.PythonVisualizationOpDescnaming its output columnHTML-CONTENT: 10 output-schema cases fail on main and 24 on this branch, where every chart spec now checks the column's exact name.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)