rosemarYuan commented on code in PR #756:
URL: https://github.com/apache/flink-agents/pull/756#discussion_r3361312092


##########
plan/src/main/java/org/apache/flink/agents/plan/serializer/ActionJsonDeserializer.java:
##########
@@ -66,10 +66,15 @@ public Action deserialize(JsonParser jsonParser, 
DeserializationContext deserial
             throw new IOException("Unsupported function type: " + funcType);
         }
 
-        // Deserialize listenEventTypes
-        List<String> listenEventTypes = new ArrayList<>();
-        node.get("listen_event_types")
-                .forEach(eventTypeNode -> 
listenEventTypes.add(eventTypeNode.asText()));
+        // Deserialize trigger_conditions (fall back to legacy 
listen_event_types for older JSONs)
+        List<String> triggerConditions = new ArrayList<>();
+        JsonNode triggerNode = node.get("trigger_conditions");
+        if (triggerNode == null) {
+            triggerNode = node.get("listen_event_types");

Review Comment:
   Good catch — you're right that the regenerated snapshot fixtures mean the 
legacy branch is never exercised under test. I'll add a focused deserialization 
test that feeds a JSON blob with the old listen_event_types key and asserts it 
maps correctly to getTriggerConditions().



-- 
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