feat: expose is_inside_foreach in DAG step info endpoint response#470
Conversation
is_inside_foreach in DAG step info endpoint response
is_inside_foreach in DAG step info endpoint responseis_inside_foreach in DAG step info endpoint response
is_inside_foreach in DAG step info endpoint responseis_inside_foreach in DAG step info endpoint response
|
Looked through this. Clean change, is_inside_foreach is already computed on DAGNode during graph traversal, just wasn't being serialized. Makes sense to expose it for the UI. No overlap with the pagination work on the service side. |
Thanks, @Aryan95614 Appreciate. Glad to hear this aligns well with the existing DAG traversal and doesn’t conflict with the pagination work. Goal is, exposing is_inside_foreach to help improve how the UI identifies and represents foreach tasks, suited for the UI representation on the metaflow UI. |
Requirements for a pull request
Description of the Change
This PR exposes the
is_inside_foreachboolean for DAG steps in the API response. While the service was already calculating this value during graph traversal, it was not being serialized in the final JSON output.Exposing this field is the backend enhancement for the Expanded DAG Mode implemented in metaflow-ui#180. It allows the UI to:
Alternate Designs
-
Possible Drawbacks
-
This is a purely additive change to a JSON response and maintains full backwards compatibility.
Verification Process
is_inside_foreachreturnsTrueonly for nodes within the foreach block andFalsefor the splitting node and subsequent joins.is_inside_foreachfield #469Release Notes
Exposed
is_inside_foreachin DAG step metadata to support enhanced foreach visualization in the Metaflow UI.