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

[PR] test(amber): expand ExecutionResultService spec coverage [texera]

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

   ### What changes were proposed in this PR?
   - Pin the exact binary-preview formatting in `convertTuplesToJson`: the existing spec asserted only byte size and the presence of an ellipsis, so this adds the 13-bits-or-fewer branch (a 1-byte field renders its full bit string with no ellipsis) and the exact leading-10 + ellipsis + trailing-3 format for larger fields.
   - Add serialization-contract tests for the `WebOutputMode` / `WebResultUpdate` ADTs the frontend dispatches on: the `type` discriminator for `PaginationMode`/`SetSnapshotMode`/`SetDeltaMode`, plus the shapes of `WebPaginationUpdate` and `WebDataUpdate`.
   ### Any related issues, documentation, or discussions?
   Closes: #5389
   ### How was this PR tested?
   - Run `sbt "WorkflowExecutionService/testOnly *ExecutionResultServiceSpec"` and expect 16 examples to pass (11 existing, 5 new).
   - Local sbt test runs are blocked by JaCoCo 0.8.11 (cannot instrument Java 25 bytecode, major version 69), so the suite was run directly via ScalaTest off the dependency classpath; all 16 passed. CI runs it on a supported JDK.
   ### 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(amber): expand ExecutionResultService spec coverage [texera]

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

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5390?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 51.62%. Comparing base ([`8a4cb29`](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`6748988`](https://app.codecov.io/gh/apache/texera/commit/6748988d66f88cdb5e4b082317dec7714bfc6b3e?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    #5390   +/-   ##
   =========================================
     Coverage     51.62%   51.62%           
   + Complexity     2420     2417    -3     
   =========================================
     Files          1056     1056           
     Lines         41046    41046           
     Branches       4407     4407           
   =========================================
   + Hits          21190    21191    +1     
   + Misses        18617    18613    -4     
   - Partials       1239     1242    +3     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/5390/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/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.89% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?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/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.76% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?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/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.23% <ø> (+<0.01%)` | :arrow_up: | |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `1.38% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?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/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `54.68% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?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/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.42% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?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/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `46.32% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?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/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.69% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [python](https://app.codecov.io/gh/apache/texera/pull/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.84% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?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/5390/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.39% <ø> (ø)` | | Carriedforward from [8a4cb29](https://app.codecov.io/gh/apache/texera/commit/8a4cb29e1045f18cbfaf5f143473e0f05b25d4ea?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/5390?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): expand ExecutionResultService spec coverage [texera]

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


-- 
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): expand ExecutionResultService spec coverage [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on code in PR #5390:
URL: https://github.com/apache/texera/pull/5390#discussion_r3366051815


##########
amber/src/test/scala/org/apache/texera/web/service/ExecutionResultServiceSpec.scala:
##########
@@ -475,4 +486,67 @@ class ExecutionResultServiceSpec extends AnyFlatSpec with Matchers {
     resultsDefault(2).get("value").asText() shouldBe "medium length"
     resultsDefault(3).get("value").asText() should endWith("...")
   }
+
+  // The existing binary cases assert only the byte size and the presence of an
+  // ellipsis. They never pin the actual preview bits, and they never exercise
+  // the "<= 13 bits" branch with a non-empty array (only the empty-array edge
+  // hits it). The next two cases pin both branches exactly.
+
+  it should "render the full bit string for a binary field of 13 bits or fewer" in {
+    val schema = new Schema(List(new Attribute("b", AttributeType.BINARY)))
+    // 1 byte = 8 bits <= 10 (leading) + 3 (trailing), so no truncation/ellipsis.
+    val tuple = Tuple.builder(schema).add("b", AttributeType.BINARY, Array[Byte](5)).build()
+
+    val text = ExecutionResultService.convertTuplesToJson(List(tuple)).head.get("b").asText()

Review Comment:
   nit: for the source code, I think this method should be moved out of ExecutionResultService, but to the component which is displaying it.
   
   not to change in this PR.



-- 
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