[Core feature] Reduce load from dynamic closure
Motivation: Why do you think this is important?
I'm frustrated when leveraging dynamic workflows that either have large input or a larger number of nodes due to the UI becoming sluggish, and it will regularly exceed gRPC limits, causing execution failures.
Goal: What should the final outcome look like, ideally?
This feature will resolve UI response time issues and execution problems when submitting larger dynamic workflows. We should not see exceeds GRPC limit errors or any errors about EventSinkErrors due to Flyteadmin stalling with the larger content
Describe alternatives you've considered
We increased grpc message size, and increasing timeouts however the issue is still there and we have only processed ~0.6 % of the data we have. When we attempt to even get to 1% we run into issues.
Propose: Link/Inline OR Additional context
I noticed this PR https://github.com/flyteorg/flyte/pull/6234 attempts to solve the same issue, however it was closed without any context or information as to why.
I am happy to take a stab at it this way or a different approach if the other approach is undesired.
Are you sure this issue hasn't been raised already?
- [x] Yes
Have you read the Code of Conduct?
- [x] Yes
Thank you for opening your first issue here! 🛠
The issue of sluggish UI and gRPC limit errors in dynamic workflows with large inputs or many nodes is caused by Flyte including all node inputs in the dynamic closure, which bloats event messages and can exceed gRPC payload limits. A proposed solution, as seen in PR #6234, is to remove node inputs from the dynamic closure before sending events to FlyteAdmin, significantly reducing payload size and improving UI performance. This approach was verified to speed up page loads and prevent gRPC limit errors, but the PR was closed without explanation, so its status in mainline Flyte is unclear.
Increasing gRPC message size or timeouts does not address the root cause, as the payload size remains a bottleneck. The recommended path is to implement or revive the approach from PR #6234, which programmatically clears node inputs from dynamic workflow event messages, thus preventing both UI sluggishness and execution failures due to large dynamic closures. Would you like a step-by-step breakdown of how this solution works or guidance on how to implement it in your environment?
Sources:
This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.
Mention @runllm to ask follow-up questions. See runllm.com for more!