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

[PR] test(amber): cover version-importance helpers and the email message builder [texera]

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

   ### What changes were proposed in this PR?
   
   Covers the remaining unit-testable pure logic in two of the three classes the
   issue lists. No production code was changed.
   
   **`WorkflowVersionResource`** (+7 tests) — the version-importance helpers, all
   private and exercised through `PrivateMethodTester`:
   
   - `isSnapshotImportant` — a patch whose ops are all `replace` is unimportant, any
     other op makes it important, and an empty patch is unimportant.
   - `isVersionImportant` — a patch touching only `/operatorPositions/` is
     unimportant; anything else is important.
   - `isWithinTimeLimit` — holds inside the aggregate window, not outside it.
   - `encodeVersionImportance` — the latest version is always important, a version
     inside the aggregate window is folded in as unimportant, and one outside it is
     judged on its content.
   
   > The issue calls this gap `jsonTreeIterator`; that is a local variable inside
   > `isSnapshotImportant` / `isVersionImportant` rather than a method, so the tests
   > target those two methods (plus the rest of the family).
   
   **`WorkflowEmailNotifier`** (+2 tests)
   
   - `createEmailMessage` — the assembled message addresses the recipient and
     carries the same subject the dedicated builder produces, plus the workflow
     name, id and state in its content.
   - `sendStatusEmail` — the invalid-recipient arm returns before dispatching, so
     the test never reaches `GmailResource.sendEmail`.
   
   After this change (measured with `sbt WorkflowExecutionService/jacoco`):
   `WorkflowVersionResource` 116/121 lines (95%), `WorkflowEmailNotifier` 40/43
   (93%). The lines that remain are not unit-reachable:
   
   - `updateLatestVersion` — defined but has no callers anywhere in the repo.
   - `sendStatusEmail`'s dispatch arm — it calls `GmailResource.sendEmail`, i.e. it
     would send real mail.
   - `cloneVersion`'s catch block — needs a database-layer failure to trigger.
   - `isSnapshotInRangeUnimportant`'s `lowerBound == UpperBound` early return is
     already asserted by an existing test, but jacoco still reports it unhit: the
     parameters are `java.lang.Integer`, so `==` compares references rather than
     values. Worth a look separately — this PR does not change production code.
   
   **`ResultExportService`** — no tests added. Its in-scope pure logic is already
   covered by the existing spec: `parseOperators` (valid / empty / malformed),
   `validateExportRequest` (both arms), `convertFieldToBytes` (all three cases),
   `generateFileName` (parquet→zip, path-separator stripping), `streamCellData`
   (all three guards), and the `errorMessages` accumulation the issue mentions
   (`exportToDataset` "collect one message per operator" / "turn a thrown
   per-operator failure into an error entry"). The `download.dat` default the issue
   asks for is unreachable: when `exportOperatorResultAsStream` returns no file
   name it also returns a null stream, and the preceding line throws. The remaining
   uncovered methods (`exportOperatorsAsZip`, `exportSingleOperatorToDataset`,
   `getOperatorDocument`) all go through `DocumentFactory`/storage, which the issue
   places out of scope.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7537
   
   ### How was this PR tested?
   
   Unit tests, run locally against embedded Postgres (`MockTexeraDB`). All pass, and
   the failure path was verified by breaking an assertion to confirm the suite goes
   red:
   
   ```
   sbt "WorkflowExecutionService/testOnly *WorkflowVersionResourceSpec *WorkflowEmailNotifierSpec"
   # Tests: succeeded 37, failed 0
   sbt "WorkflowExecutionService/Test/scalafmtCheck"      # clean
   sbt "WorkflowExecutionService/Test/scalafix --check"   # clean
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
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(amber): cover version-importance helpers and the email message builder [texera]

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

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7540?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 87.44%. Comparing base ([`561cd0e`](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`5bf1290`](https://app.codecov.io/gh/apache/texera/commit/5bf12900553764fafdd189676a75f20ac7e975c3?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    #7540      +/-   ##
   ============================================
   + Coverage     87.42%   87.44%   +0.01%     
   + Complexity     4253     4252       -1     
   ============================================
     Files          1176     1176              
     Lines         46986    46986              
     Branches       5245     5245              
   ============================================
   + Hits          41077    41085       +8     
   + Misses         4178     4165      -13     
   - Partials       1731     1736       +5     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/7540/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/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?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/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.62% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?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/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `82.25% <ø> (+0.04%)` | :arrow_up: | |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `60.38% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?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/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.97% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?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/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.05% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?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/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.47% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?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/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.89% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?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/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.52% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/7540/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `26.31% <ø> (ø)` | | Carriedforward from [561cd0e](https://app.codecov.io/gh/apache/texera/commit/561cd0ef1fb85da3f2f59fe846947d93f5c14262?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/7540?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


Re: [PR] test(amber): cover version-importance helpers and the email message builder [texera]

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

   <!-- texera-benchmarks-comment -->
   ## ⚠️ Benchmark changes need a look
   
   🟢 2 better · 🔴 5 worse · ⚪ 8 noise (<±5%) · 0 without baseline
   
   > Compared against main `561cd0e` 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/31462791651)
   
   | | config | throughput | MB/s | latency | max Δ latest / 7d |
   |---|---|---:|---:|---:|---:|
   | 🔴 | bs=10 sw=10 sl=64 | 354 | 0.216 | 27,795/42,345/42,345 us | 🔴 +19.7% / 🔴 +154.9% |
   | 🟢 | bs=100 sw=10 sl=64 | 772 | 0.471 | 126,293/157,180/157,180 us | 🟢 -8.2% / 🔴 +38.8% |
   | ⚪ | bs=1000 sw=10 sl=64 | 906 | 0.553 | 1,111,964/1,148,310/1,148,310 us | ⚪ within ±5% / 🔴 +7.0% |
   
   <details><summary>Baseline details</summary>
   
   Latest main `561cd0e` from same runner
   
   | config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
   |---|---|---:|---:|---:|---:|---:|
   | bs=10 sw=10 sl=64 | throughput | 354 tuples/sec | 420 tuples/sec | 740.3 tuples/sec | -15.7% | -52.2% |
   | bs=10 sw=10 sl=64 | MB/s | 0.216 MB/s | 0.256 MB/s | 0.452 MB/s | -15.6% | -52.2% |
   | bs=10 sw=10 sl=64 | p50 | 27,795 us | 23,227 us | 13,173 us | +19.7% | +111.0% |
   | bs=10 sw=10 sl=64 | p95 | 42,345 us | 35,735 us | 16,615 us | +18.5% | +154.9% |
   | bs=10 sw=10 sl=64 | p99 | 42,345 us | 35,735 us | 19,272 us | +18.5% | +119.7% |
   | bs=100 sw=10 sl=64 | throughput | 772 tuples/sec | 794 tuples/sec | 939.86 tuples/sec | -2.8% | -17.9% |
   | bs=100 sw=10 sl=64 | MB/s | 0.471 MB/s | 0.485 MB/s | 0.574 MB/s | -2.9% | -17.9% |
   | bs=100 sw=10 sl=64 | p50 | 126,293 us | 122,365 us | 106,062 us | +3.2% | +19.1% |
   | bs=100 sw=10 sl=64 | p95 | 157,180 us | 171,215 us | 113,212 us | -8.2% | +38.8% |
   | bs=100 sw=10 sl=64 | p99 | 157,180 us | 171,215 us | 123,853 us | -8.2% | +26.9% |
   | bs=1000 sw=10 sl=64 | throughput | 906 tuples/sec | 919 tuples/sec | 966.11 tuples/sec | -1.4% | -6.2% |
   | bs=1000 sw=10 sl=64 | MB/s | 0.553 MB/s | 0.561 MB/s | 0.59 MB/s | -1.4% | -6.2% |
   | bs=1000 sw=10 sl=64 | p50 | 1,111,964 us | 1,093,586 us | 1,038,733 us | +1.7% | +7.0% |
   | bs=1000 sw=10 sl=64 | p95 | 1,148,310 us | 1,118,086 us | 1,085,289 us | +2.7% | +5.8% |
   | bs=1000 sw=10 sl=64 | p99 | 1,148,310 us | 1,118,086 us | 1,115,555 us | +2.7% | +2.9% |
   
   </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,564.91,200,128000,354,0.216,27794.74,42345.45,42345.45
   1,100,10,64,20,2592.30,2000,1280000,772,0.471,126292.71,157180.02,157180.02
   2,1000,10,64,20,22080.42,20000,12800000,906,0.553,1111963.75,1148309.71,1148309.71
   ```
   
   </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(amber): cover version-importance helpers and the email message builder [texera]

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


-- 
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(amber): cover version-importance helpers and the email message builder [texera]

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

   <!-- 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:** `@aglinxinyuan`
     You can notify them by mentioning `@aglinxinyuan` 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