Repository navigation
Replies: 21 comments 15 replies
|
Let me convert this to a Discussion post. sorry if that's not clear. for uncertain topics, we use disucussions. once a consensus is reached, we open an issue (or feel free to use umbrella issue + multiple sub-issues) to track decided todos. Discussions can have back and forth ideas. issues should be clear on what exactly to do. |
|
@carloea2 Let's do a meeting to discuss the details and report the results here. |
|
We discussed this feature offline. We agreed that the design in #5115 is more general in that it has explicit encapsulation of the input and output ports, and that the user chooses which ports of the macro workflow is exposed. |
|
Maybe @carloea2 can take the lead to finish it? Notice that @Xiao-zhen-Liu's availability in the summer is limited. It will be good to have a discussion before that, and report the plan here. |
|
I think we can wait for @Xiao-zhen-Liu to come back since he raised the PR first, and his design was chosen, I could take his code and raise the PRs but I feel it is not right |
|
I don't think we're on the same page. Let's have a group discussion next Monday. If we cannot finish, we can have one more discussion on Wednesday. |
|
We had an offline discussion about this topic. @carloea2 : please summarize the results. |
|
In summary:
|
|
@carloea2 Please provide more details as suggested. |
|
@carloea2 Thanks for the summary. Not sure if I fully understand your question. I believe we are allowed to do offline discussions for efficiency reasons, but we need to publish the discussed proposals to the community to maintain the transparency. |
|
Hi, I was suggested to fold my recent proposal (#6066, now closed) into this discussion. I've been prototyping something adjacent to macros: a "Blocks" gallery for saving and reusing workflow pieces across workflows. Reading through this thread, my design is different in direction (drop-in reuse vs. in-place collapsing). But a few pieces from the prototype might be useful for the macros work:
Demo of the prototype: https://drive.google.com/file/d/12pPeBUvbLlsrO5t5pp0C9G2xeEordTD2/view?usp=sharing Would any of these be useful to fold into the macros direction? Thank you! |
|
@carloea2 Please chime in. If needed, we can have a discussion and report the results here. |
|
After meeting with @carloea2, here's a summary of what we discussed. The base macro feature (the #5115 direction — explicit input/output port encapsulation and in-place collapse) will be built first. Once it's merged, I can open separate PRs adding these extra features on top:
|
We have been exploring a revised approach to macros and would like to discuss it here before settling the design. Some ideas we are considering:
This would broaden the earlier proposal that deferred reuse. Whether these capabilities should be included initially or introduced in stages is also open for discussion. Some questions we would like feedback on:
These are starting points for discussion. Suggestions for alternative models, missing use cases, or a simpler initial scope would be welcome. |
|
I'm glad this got revisited. I didn't follow the earlier discussion. I'm glad it led to form views, but I think macros are a separate and useful thing. I agree with the idea of treating macros as a kind of special workflow, which cannot be run on its own. I think the simple inlining of those workflows into whatever workflow they are used in, as a special kind of operator, is a very common and natural thing. AsterixDB's SQL++ UDFs are implemented in exactly the same way; they are simply queries which get written into some other query where the function appears in the main query. P.S. (Mentor hat): I noticed this thread kind of devolved into a series of offline discussions, and while the latest post did an OK job of trying to share the state and loop everyone else in, the rest of the thread is really an antipattern. The point of discussing it here is to make the discussion entirely open, and not to agree on when closed discussions should or shouldn't take place. It can't be the case that discussions end up as a dumping ground for designs which have already been agreed to a priori by a clique of contributors before ever being brought out into the open, basically as an afterthought. |
|
I support treating macros as reusable subgraphs with explicit ports and independently pinned versions. I think having the below might be nice,
|
|
@carloea2 If you have issues and PRs related to this discussion, please include them in this discussion. |
|
Hi, I have a some user-centric thoughts on how workflows could become reusable macros and how they could be managed in Texera. I'm a little against of having macros as a separate entity. Please let me know your thoughts. 1. Any workflow should be able to become a macroI believe allowing any workflow to be published and used as a macro would be a more user friendly approach to reusability. The reason I say this is that the more terminology users have to learn, the more they have to understand the system before they can use it intuitively. I would like to see this as a way for researchers to organize their algorithms into multiple smaller workflows and reuse them as needed as well. For example, a researcher could create separate workflows for data preprocessing, feature extraction, and classification. These workflows could remain private or be shared with others. The researcher could then combine them into a larger algorithm, publish that workflow as a macro, and allow others to use it. This could be particularly useful when reproducing or building upon someone else's research. A researcher might want to use an algorithm associated with a particular paper as a macro within their own workflow. 2. Workflow and macro dependenciesI think it would be useful to make the relationships between workflows and macros visible. When viewing a workflow (both on listing and detailed view), users should be able to see which macros it depends on. Similarly, when viewing a particular macro, users should be able to see which workflows are using it. This information could be useful in several ways.
3. Publishing a workflow as a macroThe workflow author should be able to define the following before publishing it.
Once these details are defined, the author should be able to publish the workflow as a reusable macro. I would also suggest that researchers specify the macro's workflow version they want to use when including a macro in their workflows. This would help avoid conflicts when the original workflow is updated. It would also mean that we may not need to maintain a separate versioning system specifically for macros, since macros could simply reference specific versions of the workflows. 4. Macro execution and visibilityI believe macros should maintain their own execution history, regardless of which parent workflow triggered them. The macro author should be able to see the executions of their macro across the different workflows that use it. This could provide useful information about usage, execution performance, and potential issues. On the other hand, when someone uses a macro within their workflow, I think the macro should generally be treated just as another single operator. The user trusts the algorithm implemented by the macro and does not necessarily need to see all the internal execution details. I would make the internal execution details available as an optional view rather than displaying them by default. This would provide a balance between keeping the parent workflow simple and allowing users to inspect the internal execution when needed. 5. Error handling and troubleshootingMaking execution visible and transparent to both researchers and macro authors could also create opportunities for collaboration. For example, this could provide a way for researchers using a macro to report bugs, share execution errors, or seek help from the macro author (could be a chat window as well). The macro author could then use the execution information to understand the issue and provide guidance which make troubleshooting easier. |
|
@dinukadesilva Thank you for the insightful comments. All these points look valid to me. Here are my thoughts:
|

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Feature Summary
Workflow macros are an important feature for Texera, but the current discussion in #5179 mixes several design choices with implementation review. Based on the feedback from @Yicong-Huang and @chenlica, we should move the macro design discussion into an issue, hold a focused live discussion, and record the decisions here before continuing.
References:
Proposed Solution or Design
Use this issue to align on the macro design before reviewing code in detail. The discussion should decide:
Macro creation UX
Create Macrofrom the context menu?Macro representation and reuse
My Macros?Macro internal view and editing
Runtime and statistics behavior
Macro lifecycle and persistence
Impact / Priority
?
Affected Area
All reactions