You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/08/27 11:46:08 UTC

[PR] test(pyamber): cover the source and batch operator final methods [texera]

aglinxinyuan opened a new pull request, #8047:
URL: https://github.com/apache/texera/pull/8047

   ### What changes were proposed in this PR?
   
   `test_operator.py` goes from 32 tests to 44, covering `SourceOperator.on_finish` and `BatchOperator`'s output-conversion arms.
   
   | Metric | Before | After |
   |---|---|---|
   | Codecov fully-covered lines **today** | 173/183 | **178/183** |
   | Codecov fully-covered lines **after #8040** | 171/183 | **178/183** |
   | Branch arms | 26/30 | **30/30** |
   
   **+5 fully-covered lines today, +7 after #8040, and the file reaches 100% branch coverage.** Lines 233 and 234 are line-hit with one arm untaken, so today's branch-less CI report already scores them covered; closing their second arm is mutation-proven but invisible until #8040 lands.
   
   **This is a small PR and I would rather say so than dress it up.** What makes it worth having is that it closes the file permanently: the five remaining gap lines (153, 177, 259, 293, 515) are `@abstractmethod` bodies, and a grep of `src/main/python` for `super().process_tuple|produce|process_batch|process_table|condition` finds **zero** production call sites. 178/183 is the ceiling, so nobody needs to re-derive this target.
   
   **Scope narrowed during assessment, and the original plan is worth recording.** This began as a three-file bundle also covering the four concrete partitioners and `proxy_server.py`. Both were dropped on measurement: the partitioners' base class is bare-`pass` stubs, and `proxy_server.py` is already at 90/95 with a 268-line spec, leaving 2 honest lines. Only `operator.py` survived.
   
   ### What matters about the two covered paths
   
   `SourceOperator.on_finish` is the uncovered production path of **every** Python source UDF. `BatchOperator._process_batch`'s `None` and non-DataFrame arms decide what a batch operator emits when its handler returns nothing, or returns something that is not a DataFrame.
   
   ### Verification
   
   Measured from `amber/` with the identical full-suite scope on both sides, `--cov-branch` passed explicitly (this branch lacks #8040's config), per-line `hits` and `condition-coverage` read out of `coverage.xml` by script rather than from the summary percentage. The before-state used main's spec extracted via `git show HEAD:` into a scratch dir and restored from that snapshot — never `git restore`.
   
   Two reviewers returned nine findings against the first draft; all repaired. **Three mutants survive and are reported rather than dropped**, all three genuinely equivalent: `!= 0` to `> 0` on a list length (non-negative by construction), and deleting `@overrides.final` from either method — `overrides.final` is `typing.final`, which enforces nothing at runtime. The last two prompted a docstring correction, since the original text claimed finality as the reason the method was worth testing.
   
   Full pyamber suite: `5 failed, 1171 passed, 7 errors` against main's `5 failed, 1159 passed, 7 errors`. The `FAILED`/`ERROR` node-id sets were sorted and diffed — **identical by identity**, 12 entries. `ruff check` and `ruff format --check` pass on CI's exact scope. `git diff --numstat` is `226 0` — zero deletions.
   
   No production file is touched; `git diff -- 'amber/src/main/*'` is empty.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8043
   
   ### How was this PR tested?
   
   ```
   cd amber && python -m pytest -m "not integration" -q src/test/python/core/models/test_operator.py
   ```
   
   ```
   44 passed, 1 warning
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(pyamber): cover the source and batch operator final methods [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #8047:
URL: https://github.com/apache/texera/pull/8047


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(pyamber): cover the source and batch operator final methods [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8047:
URL: https://github.com/apache/texera/pull/8047#issuecomment-5439422032

   <!-- texera-benchmarks-comment -->
   ## ⚠️ Benchmark changes need a look
   
   🟢 2 better · 🔴 2 worse · ⚪ 11 noise (<±5%) · 0 without baseline
   
   > Compared against main `b01b11f` 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](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/33068835870)
   
   | | config | throughput | MB/s | latency | max Δ latest / 7d |
   |---|---|---:|---:|---:|---:|
   | 🔴 | bs=10 sw=10 sl=64 | 382 | 0.233 | 23,570/40,575/40,575 us | 🔴 +14.6% / 🔴 +193.1% |
   | 🟢 | bs=100 sw=10 sl=64 | 818 | 0.499 | 119,100/142,907/142,907 us | 🟢 -16.8% / 🔴 +52.6% |
   | ⚪ | bs=1000 sw=10 sl=64 | 938 | 0.572 | 1,065,257/1,117,696/1,117,696 us | ⚪ within ±5% / 🔴 +23.9% |
   
   <details><summary>Baseline details</summary>
   
   Latest main `b01b11f` from same runner
   
   | config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
   |---|---|---:|---:|---:|---:|---:|
   | bs=10 sw=10 sl=64 | throughput | 382 tuples/sec | 391 tuples/sec | 894.86 tuples/sec | -2.3% | -57.3% |
   | bs=10 sw=10 sl=64 | MB/s | 0.233 MB/s | 0.239 MB/s | 0.546 MB/s | -2.5% | -57.3% |
   | bs=10 sw=10 sl=64 | p50 | 23,570 us | 23,043 us | 11,139 us | +2.3% | +111.6% |
   | bs=10 sw=10 sl=64 | p95 | 40,575 us | 35,399 us | 13,843 us | +14.6% | +193.1% |
   | bs=10 sw=10 sl=64 | p99 | 40,575 us | 35,399 us | 16,839 us | +14.6% | +141.0% |
   | bs=100 sw=10 sl=64 | throughput | 818 tuples/sec | 797 tuples/sec | 1,166 tuples/sec | +2.6% | -29.8% |
   | bs=100 sw=10 sl=64 | MB/s | 0.499 MB/s | 0.486 MB/s | 0.711 MB/s | +2.7% | -29.9% |
   | bs=100 sw=10 sl=64 | p50 | 119,100 us | 118,606 us | 87,509 us | +0.4% | +36.1% |
   | bs=100 sw=10 sl=64 | p95 | 142,907 us | 171,661 us | 93,675 us | -16.8% | +52.6% |
   | bs=100 sw=10 sl=64 | p99 | 142,907 us | 171,661 us | 102,153 us | -16.8% | +39.9% |
   | bs=1000 sw=10 sl=64 | throughput | 938 tuples/sec | 930 tuples/sec | 1,198 tuples/sec | +0.9% | -21.7% |
   | bs=1000 sw=10 sl=64 | MB/s | 0.572 MB/s | 0.568 MB/s | 0.731 MB/s | +0.7% | -21.8% |
   | bs=1000 sw=10 sl=64 | p50 | 1,065,257 us | 1,069,991 us | 859,766 us | -0.4% | +23.9% |
   | bs=1000 sw=10 sl=64 | p95 | 1,117,696 us | 1,174,820 us | 902,897 us | -4.9% | +23.8% |
   | bs=1000 sw=10 sl=64 | p99 | 1,117,696 us | 1,174,820 us | 937,957 us | -4.9% | +19.2% |
   
   </details>
   
   <details><summary>Raw CSV</summary>
   
   ```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,523.87,200,128000,382,0.233,23569.68,40574.55,40574.55
   1,100,10,64,20,2443.99,2000,1280000,818,0.499,119100.10,142907.38,142907.38
   2,1000,10,64,20,21332.37,20000,12800000,938,0.572,1065256.98,1117696.39,1117696.39
   ```
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(pyamber): cover the source and batch operator final methods [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8047:
URL: https://github.com/apache/texera/pull/8047#issuecomment-5438859559

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@eugenegujing`
     You can notify them by mentioning `@eugenegujing` in a comment.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(pyamber): cover the source and batch operator final methods [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8047:
URL: https://github.com/apache/texera/pull/8047#issuecomment-5439176797

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8047?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 93.42%. Comparing base ([`b01b11f`](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2c396d8`](https://app.codecov.io/gh/apache/texera/commit/2c396d8c70b35cfe2609794f5871febc848d1093?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :white_check_mark: All tests successful. No failed tests found.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff            @@
   ##               main    #8047   +/-   ##
   =========================================
     Coverage     93.41%   93.42%           
     Complexity     4696     4696           
   =========================================
     Files          1179     1179           
     Lines         47713    47713           
     Branches       5314     5314           
   =========================================
   + Hits          44573    44576    +3     
   + Misses         1698     1695    -3     
     Partials       1442     1442           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `99.32% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.60% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.67% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.73% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.70% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `95.89% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `79.31% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.85% <ø> (+0.06%)` | :arrow_up: | |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/8047/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/8047?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org