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

[PR] test(workflow-operator): add unit tests for MediaGenCodegen [texera]

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

   ### What changes were proposed in this PR?
   Adds dedicated unit test coverage for MediaGenCodegen, the TaskCodegen object that generates the Python payload/parse snippets for Hugging Face media-generation operators (text-to-image and text-to-video). This class previously had no direct test coverage.
   
   A new spec file, [MediaGenCodegenSpec.scala was created in the same test package, mirroring the structure and patterns of TextGenCodegenSpec (shared makeCtx helper; assertions on snippet structure/markers rather than exact whitespace). It adds 9 tests covering:
   - task equals "text-to-image"
   - tasks equals exactly Set("text-to-image", "text-to-video")
   - payloadPython emits the static {"inputs": prompt_value} payload
   - parsePython branches on both media tasks, routes URL responses through the shared _url_to_data_url helper, converts OpenAI b64_json payloads into a data:image/png;base64, URL, and falls back to json.dumps(body)
   - Snippets never inline raw CodegenContext string values (no sentinel leakage)
   - Context-independence: identical output across two unrelated CodegenContext instances
   
   ### Any related issues, documentation, discussions?
   Closes #6252
   
   ### How was this PR tested?
   Added 9 unit tests in the new spec file, all passing via sbt:
   
   sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.huggingFace.codegen.MediaGenCodegenSpec"
   
   [info] Tests: succeeded 9, failed 0, canceled 0, ignored 0, pending 0
   [info] All tests passed.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   Co-authored with Claude Opus 4.8 in compliance with ASF


-- 
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(workflow-operator): add unit tests for MediaGenCodegen [texera]

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


-- 
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(workflow-operator): add unit tests for MediaGenCodegen [texera]

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

   <!-- texera-benchmarks-comment -->
   ## ⚠️ Benchmark changes need a look
   
   🟢 0 better · 🔴 5 worse · ⚪ 10 noise (<±5%) · 0 without baseline
   
   > Compared against main `aa0bc44` 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/29455487770)
   
   | | config | throughput | MB/s | latency | max Δ latest / 7d |
   |---|---|---:|---:|---:|---:|
   | 🔴 | bs=10 sw=10 sl=64 | 397 | 0.242 | 24,096/33,841/33,841 us | 🔴 -8.3% / 🔴 +139.1% |
   | ⚪ | bs=100 sw=10 sl=64 | 936 | 0.571 | 107,840/125,412/125,412 us | ⚪ within ±5% / 🔴 +28.3% |
   | 🔴 | bs=1000 sw=10 sl=64 | 1,082 | 0.66 | 914,402/1,036,691/1,036,691 us | 🔴 +8.6% / 🔴 +10.1% |
   
   <details><summary>Baseline details</summary>
   
   Latest main `aa0bc44` from same runner
   
   | config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
   |---|---|---:|---:|---:|---:|---:|
   | bs=10 sw=10 sl=64 | throughput | 397 tuples/sec | 433 tuples/sec | 847.3 tuples/sec | -8.3% | -53.1% |
   | bs=10 sw=10 sl=64 | MB/s | 0.242 MB/s | 0.264 MB/s | 0.517 MB/s | -8.3% | -53.2% |
   | bs=10 sw=10 sl=64 | p50 | 24,096 us | 22,262 us | 11,621 us | +8.2% | +107.3% |
   | bs=10 sw=10 sl=64 | p95 | 33,841 us | 33,637 us | 14,154 us | +0.6% | +139.1% |
   | bs=10 sw=10 sl=64 | p99 | 33,841 us | 33,637 us | 19,069 us | +0.6% | +77.5% |
   | bs=100 sw=10 sl=64 | throughput | 936 tuples/sec | 955 tuples/sec | 1,104 tuples/sec | -2.0% | -15.2% |
   | bs=100 sw=10 sl=64 | MB/s | 0.571 MB/s | 0.583 MB/s | 0.674 MB/s | -2.1% | -15.2% |
   | bs=100 sw=10 sl=64 | p50 | 107,840 us | 103,636 us | 91,279 us | +4.1% | +18.1% |
   | bs=100 sw=10 sl=64 | p95 | 125,412 us | 130,772 us | 97,771 us | -4.1% | +28.3% |
   | bs=100 sw=10 sl=64 | p99 | 125,412 us | 130,772 us | 107,798 us | -4.1% | +16.3% |
   | bs=1000 sw=10 sl=64 | throughput | 1,082 tuples/sec | 1,111 tuples/sec | 1,127 tuples/sec | -2.6% | -4.0% |
   | bs=1000 sw=10 sl=64 | MB/s | 0.66 MB/s | 0.678 MB/s | 0.688 MB/s | -2.7% | -4.1% |
   | bs=1000 sw=10 sl=64 | p50 | 914,402 us | 900,977 us | 902,553 us | +1.5% | +1.3% |
   | bs=1000 sw=10 sl=64 | p95 | 1,036,691 us | 954,963 us | 941,491 us | +8.6% | +10.1% |
   | bs=1000 sw=10 sl=64 | p99 | 1,036,691 us | 954,963 us | 979,025 us | +8.6% | +5.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,504.22,200,128000,397,0.242,24096.18,33840.50,33840.50
   1,100,10,64,20,2136.55,2000,1280000,936,0.571,107839.95,125412.38,125412.38
   2,1000,10,64,20,18485.33,20000,12800000,1082,0.660,914401.77,1036690.62,1036690.62
   ```
   
   </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(workflow-operator): add unit tests for MediaGenCodegen [texera]

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

   request-review @aglinxinyuan 


-- 
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(workflow-operator): add unit tests for MediaGenCodegen [texera]

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

   > request-review @aglinxinyuan
   
   You missed the "/" in the command.


-- 
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(workflow-operator): add unit tests for MediaGenCodegen [texera]

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

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - No candidates found from `git blame` history.
   


-- 
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(workflow-operator): add unit tests for MediaGenCodegen [texera]

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

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6438?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 70.17%. Comparing base ([`aa0bc44`](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c078957`](https://app.codecov.io/gh/apache/texera/commit/c0789571f177bbef47f97fe80f6fbca2bc5b90be?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff            @@
   ##               main    #6438   +/-   ##
   =========================================
     Coverage     70.17%   70.17%           
     Complexity     3388     3388           
   =========================================
     Files          1142     1142           
     Lines         44844    44844           
     Branches       4949     4949           
   =========================================
     Hits          31471    31471           
     Misses        11739    11739           
     Partials       1634     1634           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/6438/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/6438/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 [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.76% <ø> (ø)` | | Carriedforward from [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.67% <ø> (ø)` | | Carriedforward from [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `9.97% <ø> (ø)` | | Carriedforward from [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.30% <ø> (ø)` | | |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.63% <ø> (ø)` | | Carriedforward from [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.91% <ø> (ø)` | | Carriedforward from [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.94% <ø> (ø)` | | Carriedforward from [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.19% <ø> (ø)` | | Carriedforward from [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [aa0bc44](https://app.codecov.io/gh/apache/texera/commit/aa0bc44a86f9b8ac5d6ccab6dd767c669057d86f?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/6438?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