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


##########
plan/src/main/java/org/apache/flink/agents/plan/AgentPlan.java:
##########
@@ -184,27 +184,27 @@ private void readObject(ObjectInputStream in) throws 
IOException, ClassNotFoundE
 
     private void extractActions(
             String actionName,
-            String[] listenEventTypeStrings,
+            String[] triggerEntries,
             org.apache.flink.agents.plan.Function function,
             Map<String, Object> config)
             throws Exception {
-        List<String> eventTypeNames = new 
ArrayList<>(Arrays.asList(listenEventTypeStrings));
+        List<String> triggerConditions = new 
ArrayList<>(Arrays.asList(triggerEntries));
 
-        if (eventTypeNames.isEmpty()) {
+        if (triggerConditions.isEmpty()) {
             throw new IllegalArgumentException(
                     "Action "
                             + actionName
-                            + " must specify at least one event type via 
listenEventTypes.");
+                            + " must specify at least one trigger entry via 
@Action(value = ...).");
         }
 
         // Create an Action
-        Action action = new Action(actionName, function, eventTypeNames, 
config);
+        Action action = new Action(actionName, function, triggerConditions, 
config);
 
         // Add to actions map
         actions.put(action.getName(), action);
 
         // Add to actionsByEvent map
-        for (String eventTypeName : eventTypeNames) {
+        for (String eventTypeName : triggerConditions) {

Review Comment:
   Thanks for flagging this. The inconsistency wasn't intentional — when 
writing `extractActions`, the `triggerConditions` local variable was right at 
hand so I used it directly; same on the Python. Since all three return 
identical values in this PR, the divergence slipped through unnoticed. A simple 
oversight on my part.
   
   The follow-up CEL PR consolidates all three sites into a single 
`registerAction() `method that routes exclusively via `getListenEventTypes()`, 
which by then performs real filtering. So the three sites end up in lockstep 
once CEL lands.



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