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

[PR] test(validation): cover ValidationWorkflowService.combineValidation [texera]

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

   ### What changes were proposed in this PR?
   
   `ValidationWorkflowService.combineValidation` is what folds the per-check results (JSON-schema validation and operator-connection validation) into the single verdict the workflow editor acts on:
   
   ```ts
   public static combineValidation(...validations: Validation[]): Validation
   ```
   
   It had no direct test. This PR adds one, covering the three decisions the implementation actually makes:
   
   - **Validity is an AND** across all validations, independent of argument order.
   - **Messages are merged only from the validations that failed.** The merge is guarded on `validation.isValid` rather than on the `messages` key being absent, so a stray `messages` field on something reporting `isValid: true` is dropped rather than leaking into the combined result.
   - **A later failure wins** when two failing validations use the same message key, since the merge is a spread in argument order.
   
   Two shape details are asserted as well, because call sites depend on them:
   
   - The valid branch returns `{ isValid }` only — it omits `messages` entirely rather than returning an empty map, so reading `messages` off a valid result yields `undefined`.
   - A no-argument call is vacuously valid.
   
   No production code is changed; this is a test-only PR.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6684
   
   ### How was this PR tested?
   
   Nine cases were added to `validation-workflow.service.spec.ts` in a new top-level `describe`. `combineValidation` is static, so the block needs no `TestBed` setup.
   
   | Case | Asserts |
   | --- | --- |
   | no arguments | vacuously valid, `messages` is `undefined` |
   | all valid | result is exactly `{ isValid: true }` |
   | one invalid | invalid, carries that validation's messages |
   | invalid first / invalid last | invalid either way (order independence) |
   | several invalid | message maps are merged |
   | key collision | the later failure's message wins |
   | stray `messages` on a valid validation | dropped from the result |
   | invalid with an empty message map | invalid, `messages` is `{}` |
   | any combination | the input validations are not mutated |
   
   ```
   npx ng test --watch=false --include="**/validation-workflow.service.spec.ts"
   # Test Files  1 passed (1)
   #      Tests  19 passed (19)     <- 10 existing + 9 added here
   ```
   
   `npx prettier --check` reports no diff on the changed file.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Yes, partially. I (Suyash Jain) worked on this PR together with Claude Code as a pair-programming assistant. The added specs were run locally against the existing suite before opening this PR.
   
   Generated-by: Claude Code (Claude 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(validation): cover ValidationWorkflowService.combineValidation [texera]

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

   Hi @mengw15  Would you mind having a look at this one when you get a chance? It's test-only, just a few cases covering `combineValidation`.


-- 
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(validation): cover ValidationWorkflowService.combineValidation [texera]

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


-- 
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(validation): cover ValidationWorkflowService.combineValidation [texera]

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

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8604?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 92.76%. Comparing base ([`e7d1676`](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2ec9039`](https://app.codecov.io/gh/apache/texera/commit/2ec903987e29a666b0eb029775bb2e72021064d2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff            @@
   ##               main    #8604   +/-   ##
   =========================================
     Coverage     92.76%   92.76%           
     Complexity     4897     4897           
   =========================================
     Files          1236     1236           
     Lines         52155    52163    +8     
     Branches       6409     6410    +1     
   =========================================
   + Hits          48380    48391   +11     
     Misses         2194     2194           
   + Partials       1581     1578    -3     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/8604/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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `71.78% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `99.16% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.59% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.20% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.37% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.53% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `96.59% <ø> (+0.01%)` | :arrow_up: | |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.73% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.41% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `74.09% <ø> (ø)` | | Carriedforward from [e7d1676](https://app.codecov.io/gh/apache/texera/commit/e7d1676e1662879eb210a21acab8d30779b01024?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/8604?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(validation): cover ValidationWorkflowService.combineValidation [texera]

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

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