Yicong-Huang opened a new pull request, #5022:
URL: https://github.com/apache/texera/pull/5022

   ### What changes were proposed in this PR?
   
   Add `WorkflowCompilerSpec` for `workflow-compiling-service` exercising the 
editing-time compiler's lenient-mode contract: `compile` never throws, 
per-operator failures land in `operatorIdToError`, and `physicalPlan` is `None` 
whenever any error occurred. The existing `WorkflowCompilationResourceSpec` 
only covers a REST happy path, so none of these properties had direct coverage.
   
   Cases:
   
   - happy path: populated `physicalPlan`, empty `operatorIdToError`, all 
output-port schemas are `Some(non-null)`
   - scan source with no `fileName` → `"no input file name"` accumulated, 
`physicalPlan = None`
   - scan source with unresolvable `fileName` → FileResolver's `"not a file"` 
error accumulated
   - projection of a missing attribute → downstream op in `operatorIdToError`, 
upstream op's schemas retained
   - empty plan → empty physical plan, no errors
   - multiple unrelated failing ops → both appear in the error map
   
   The new spec invokes `WorkflowCompiler.compile` directly rather than going 
through the REST resource. This sidesteps a separate response-serialization NPE 
in `WorkflowCompilationResource` (filed as apache/texera#5021); the 
lenient-mode contract tests will keep passing once that bug is fixed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #5020. References #5021 (bug surfaced while writing these tests).
   
   ### How was this PR tested?
   
   `sbt "WorkflowCompilingService/testOnly 
org.apache.texera.amber.compiler.WorkflowCompilerSpec"` — 6 passed. Running the 
new spec alongside the existing `WorkflowCompilationResourceSpec` shows 7/7 
green. `WorkflowCompilingService/Test/scalafmtCheck` and `Test/compile` are 
clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 4.7 (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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to