build: let WorkflowOperator route Python-executing tests to amber-integration - #7207
Open
kz930 wants to merge 2 commits into
Open
build: let WorkflowOperator route Python-executing tests to amber-integration#7207kz930 wants to merge 2 commits into
kz930 wants to merge 2 commits into
Conversation
…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>
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 tasks
Contributor
|
| 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.11The 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
The
amberjob runs theWorkflowOperatortest suite and installs no Python packages. A test that executes an operator's generated template, rather than onlypy_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
WorkflowOperatorthe splitamberalready has:IntegrationTestundercommon/workflow-operator/src/test. amber's cannot be reused: it lives inamber/src/test/integration, and amber depends on this module rather than the reverse.common/workflow-operator/build.sbtreads the sameAMBER_TEST_FILTER. Theamberjob already sets it on the step that invokesWorkflowOperator/jacoco, so no workflow change is needed for the exclusion to take effect."WorkflowOperator/test"added toamber-integration, which already runsintegration-onlywithamber/requirements.txtandamber/operator-requirements.txtinstalled (pandas 2.2.3, plotly 5.24.1).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.PythonCodeRawInvalidTextSpecgains a tagged case asserting that pandas and plotly import in the interpreter it already resolves:py_compileonly 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 inamber-integrationinto 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?
amberis unchanged by the extraction:show WorkflowExecutionService/Test/testOptionsunder all three env values gives arguments byte-identical to its previous inline code —-l <tag>,-n <tag>, nothing when unset.WorkflowOperatorwas checked the same way and yields its own tag in those positions.WorkflowOperator/testOnly *PythonCodeRawInvalidTextSpec: passes underintegration-only(1 test selected); is excluded underskip-integrationwhile the spec's two existing tests still run; and, pointed at a bare interpreter, fails underintegration-onlyand cancels with no filter set.sbt scalafmtCheckAllis clean, andWorkflowOperator'sCompileandTestscalafix checks pass.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)