Skip to content

build: let WorkflowOperator route Python-executing tests to amber-integration - #7207

Open
kz930 wants to merge 2 commits into
apache:mainfrom
kz930:fix/workflow-operator-integration-split
Open

build: let WorkflowOperator route Python-executing tests to amber-integration#7207
kz930 wants to merge 2 commits into
apache:mainfrom
kz930:fix/workflow-operator-integration-split

Conversation

@kz930

@kz930 kz930 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The amber job runs the WorkflowOperator test suite and installs no Python packages. A test that executes an operator's generated template, rather than only py_compile-ing it, therefore fails its dependency probe and cancels — and a cancellation is neither a pass nor a failure, so the suite still reports "All tests passed" and the gap leaves no trace in the build.

This gives WorkflowOperator the split amber already has:

  • TagIntegrationTest under common/workflow-operator/src/test. amber's cannot be reused: it lives in amber/src/test/integration, and amber depends on this module rather than the reverse.
  • Filtercommon/workflow-operator/build.sbt reads the same AMBER_TEST_FILTER. The amber job already sets it on the step that invokes WorkflowOperator/jacoco, so no workflow change is needed for the exclusion to take effect.
  • Job"WorkflowOperator/test" added to amber-integration, which already runs integration-only with amber/requirements.txt and amber/operator-requirements.txt installed (pandas 2.2.3, plotly 5.24.1).
  • Shared logic — the env-var-to-ScalaTest-args mapping moves to project/TestFilters.scala, beside the build's other shared helpers (AddMetaInfLicenseFiles.scala, JdkOptions.scala); each module passes its own env var and tag. Its third parameter, for extra arguments on the integration side, is unused here and exists for a suite that forks a process per test and wants its pool bounded.
  • First userPythonCodeRawInvalidTextSpec gains a tagged case asserting that pandas and plotly import in the interpreter it already resolves: py_compile only parses the emitted code, while running it needs the packages it imports. Being tagged, it also exercises the routing, and it turns a missing install in amber-integration into a failure rather than the silent cancellation above. Elsewhere a bare interpreter is a local-setup fact, so it cancels instead.

Any related issues, documentation, discussions?

Fixes #7186. Found while reviewing #7149, whose runtime test is the case cancelling today; tagging it is a one-line follow-up once this is in.

How was this PR tested?

  • amber is unchanged by the extraction: show WorkflowExecutionService/Test/testOptions under all three env values gives arguments byte-identical to its previous inline code — -l <tag>, -n <tag>, nothing when unset. WorkflowOperator was checked the same way and yields its own tag in those positions.
  • The new case, run as WorkflowOperator/testOnly *PythonCodeRawInvalidTextSpec: passes under integration-only (1 test selected); is excluded under skip-integration while the spec's two existing tests still run; and, pointed at a bare interpreter, fails under integration-only and cancels with no filter set.
  • sbt scalafmtCheckAll is clean, and WorkflowOperator's Compile and Test scalafix checks pass.

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

Generated-by: Claude Code (Claude Opus 5)

…egration

The `amber` job runs this module's test suite and installs no Python packages.
The runner's interpreter is there — PythonCodeRawInvalidTextSpec uses it for a
stdlib-only py_compile check — but pandas and plotly are not importable, so a
test that executes an operator's generated template rather than only compiling
it fails its dependency probe and cancels. A cancellation is neither a pass nor
a failure, so the suite still reports "All tests passed" and the missing
coverage leaves no trace in the build.

This gives WorkflowOperator the split amber already has, reading the same
AMBER_TEST_FILTER the amber job sets on the step that invokes
WorkflowOperator/jacoco, so that job needs no change for the exclusion to take
effect. amber's tag cannot be reused: it lives in amber/src/test/integration,
and amber depends on WorkflowOperator, not the other way around. With the
selection logic now wanted in two modules it moves to project/TestFilters.scala,
beside the build's other shared sbt helpers, and each module passes its own env
var and tag.

PythonCodeRawInvalidTextSpec gains a tagged case asserting that pandas and
plotly import in the interpreter it already resolves: py_compile only parses the
emitted code, while running it needs the packages it imports. Being the first
user of the tag it also exercises the routing, and it turns a missing install in
amber-integration into a failure rather than the silent cancellation above.
Elsewhere a bare interpreter is a local-setup fact, so it cancels instead.

Verified in all four states: with the packages present the case passes under
integration-only; under skip-integration it is excluded while the spec's two
existing tests still run; pointed at a bare interpreter it fails under
integration-only and cancels with no filter set. Both modules' testOptions were
compared under all three env values before and after the extraction.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added engine dependencies Pull requests that update a dependency file fix ci changes related to CI common labels Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

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: @aglinxinyuan, @carloea2
    You can notify them by mentioning @aglinxinyuan, @carloea2 in a comment.

@codecov-commenter

codecov-commenter commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.93%. Comparing base (348fa88) to head (5fa413e).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7207      +/-   ##
============================================
+ Coverage     80.58%   80.93%   +0.35%     
- Complexity     3890     3959      +69     
============================================
  Files          1162     1162              
  Lines         46264    46264              
  Branches       5153     5153              
============================================
+ Hits          37280    37442     +162     
+ Misses         7319     7148     -171     
- Partials       1665     1674       +9     
Flag Coverage Δ
access-control-service 70.00% <ø> (ø)
agent-service 77.42% <ø> (ø)
amber 76.55% <ø> (+0.95%) ⬆️
computing-unit-managing-service 20.49% <ø> (ø)
config-service 65.97% <ø> (ø)
file-service 66.80% <ø> (ø)
frontend 83.22% <ø> (ø)
notebook-migration-service 78.89% <ø> (ø)
pyamber 97.36% <ø> (ø)
workflow-compiling-service 26.31% <ø> (ø)

☔ 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 Aug 1, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 0107183 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 363 0.222 27,737/33,072/33,072 us 🔴 +16.0% / 🔴 +118.3%
🔴 bs=100 sw=10 sl=64 798 0.487 127,312/136,431/136,431 us 🟢 -7.7% / 🔴 +23.2%
bs=1000 sw=10 sl=64 901 0.55 1,115,590/1,152,692/1,152,692 us ⚪ within ±5% / 🔴 +9.7%
Baseline details

Latest main 0107183 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 363 tuples/sec 412 tuples/sec 765.25 tuples/sec -11.9% -52.6%
bs=10 sw=10 sl=64 MB/s 0.222 MB/s 0.252 MB/s 0.467 MB/s -11.9% -52.5%
bs=10 sw=10 sl=64 p50 27,737 us 23,907 us 12,703 us +16.0% +118.3%
bs=10 sw=10 sl=64 p95 33,072 us 34,114 us 16,199 us -3.1% +104.2%
bs=10 sw=10 sl=64 p99 33,072 us 34,114 us 19,557 us -3.1% +69.1%
bs=100 sw=10 sl=64 throughput 798 tuples/sec 810 tuples/sec 965.22 tuples/sec -1.5% -17.3%
bs=100 sw=10 sl=64 MB/s 0.487 MB/s 0.495 MB/s 0.589 MB/s -1.6% -17.3%
bs=100 sw=10 sl=64 p50 127,312 us 121,176 us 103,830 us +5.1% +22.6%
bs=100 sw=10 sl=64 p95 136,431 us 147,830 us 110,778 us -7.7% +23.2%
bs=100 sw=10 sl=64 p99 136,431 us 147,830 us 118,713 us -7.7% +14.9%
bs=1000 sw=10 sl=64 throughput 901 tuples/sec 902 tuples/sec 992.33 tuples/sec -0.1% -9.2%
bs=1000 sw=10 sl=64 MB/s 0.55 MB/s 0.55 MB/s 0.606 MB/s 0.0% -9.2%
bs=1000 sw=10 sl=64 p50 1,115,590 us 1,109,354 us 1,016,959 us +0.6% +9.7%
bs=1000 sw=10 sl=64 p95 1,152,692 us 1,146,886 us 1,062,501 us +0.5% +8.5%
bs=1000 sw=10 sl=64 p99 1,152,692 us 1,146,886 us 1,082,611 us +0.5% +6.5%
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,550.40,200,128000,363,0.222,27736.67,33071.72,33071.72
1,100,10,64,20,2506.83,2000,1280000,798,0.487,127311.98,136431.03,136431.03
2,1000,10,64,20,22185.98,20000,12800000,901,0.550,1115590.41,1152692.11,1152692.11

The javadoc explained what the tag means and how the build routes it, but not
how a test opts in — and the two ScalaTest styles in this module take the tag in
different positions. Naming both, and noting that per-case tagging keeps a
spec's cheaper assertions in the unit job and its coverage report, saves the next
reader a trip through build.sbt and ScalaTest's docs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI common dependencies Pull requests that update a dependency file engine fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WorkflowOperator tests that execute generated Python cancel silently in CI

2 participants