carloea2 opened a new pull request, #9541: URL: https://github.com/apache/texera/pull/9541
### What changes were proposed in this PR? Add versioned workflow macros. Users can select operators on the canvas, expose inputs, outputs and Form View fields, and reuse the resulting macro in another workflow. Breadcrumbs open a nested occurrence on the same canvas. Each occurrence pins a saved revision. Saving an edit through a parent updates that path. Other usages and earlier workflow snapshots keep their pins. Export includes the transitive macro definitions and revisions needed to reopen the graph on another deployment. The Scala compiler resolves the pins, validates exposed properties, and removes macro boundaries before submitting a native graph to Amber. It retains the occurrence paths used to display errors, schemas, results and live or historical statistics. Agent edits use the same compiler validation. **Draft status.** The tested feature branch has merge conflicts with current `main`, including in the compiler, result service and frontend. Integration and verification on the merged tree are pending. ### Any related issues, documentation, discussions? Closes #8913. The draft moves expansion into the compiler, updating the frontend-expansion proposal recorded in that issue. The lifecycle and portability questions are open for community feedback. [Design discussion](https://github.com/apache/texera/discussions/5248#discussioncomment-18788116) · [Xiaozhen’s original UI demo](https://www.youtube.com/watch?v=ZYQIoPiEIfo) ### How was this PR tested? On the feature branch, 411 Scala tests, 6,921 Angular tests (one skipped), 28 standard Chromium tests and 325 agent tests passed. A focused Chromium run also passed all 39 nested navigation tests. All 22 compiler snapshot cases matched their original input, expected output and error trees. A real Amber execution ran five occurrences of the same macro at three depths, processing 10, 20, 30, 40 and 50 rows. The test reopened the saved execution from Iceberg and checked the macro, inner Split, and both terminals against their respective live per-port counts. Other regressions cover nested saves, Undo/Redo and Canvas/Form View import/export. ```sh sbt "WorkflowCore/testOnly *WorkflowGraphIDsSpec" \ "WorkflowCompiler/testOnly *Macro* *LogicalPlanSpec *WorkflowCompilerSpec" \ "WorkflowCompilingService/testOnly *WorkflowCompilationResourceSpec" \ "WorkflowExecutionService/testOnly *ExecutionStatsServiceSpec *SyncMacroExecutionSpec *ExecutionResultServiceSpec *WorkflowServiceSpec *WorkflowResourceSpec *WorkflowMacroCloneSpec *WorkflowGraphIDsResourceSpec *SyncExecutionResourceSpec *WorkflowVersionResourceSpec *SessionStateSpec" (cd frontend && node node_modules/@angular/cli/bin/ng.js test --watch=false --progress=false) (cd frontend && node node_modules/@angular/cli/bin/ng.js run gui:test-browser --watch=false --progress=false) (cd agent-service && bun test) ``` To try it in the UI, select connected operators, create a macro, then drag a second instance onto the canvas. Run the workflow and open each occurrence using its breadcrumb path. Reopen the saved execution to compare the same per-port counts. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex (GPT-6) -- 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]
