sangkyoonnam opened a new pull request, #1310: URL: https://github.com/apache/flink-agents/pull/1310
Linked issue: #1309 ### Purpose of change #### User-visible outcome On continuation and serial execution, an input queued for a key behind an input that matches no Action is now started. Before, `endInput()` could return while that input was still in the pending-input queue. #### Runtime flow In `processActionTaskForKey`, the `actionTask == null` branch now polls and starts the next pending input after removing the processing key, matching queue advancement in `processActionTask`. #### Key decisions - Mirror the existing finish path to advance the queue without introducing an internal no-op Action on these engines. ### Behavioral Semantics #### Interaction decisions | Input triggers Actions | Next input pending for the key | Result | |---|---|---| | Yes | Yes | Unchanged: started when the input finishes | | Yes | No | Unchanged | | No | Yes | Now started when the input retires; before, could stay queued through `endInput()` | | No | No | Unchanged | #### Behavioral contracts 1. On continuation and serial execution, the next pending input for the same key starts when an input that triggers no Actions retires. 2. An input that triggers no Actions and has nothing queued behind it retires as before. 3. Parallel engine behavior is unchanged. #### Failure behavior Failures while dequeuing or starting the next input propagate through the existing mailbox failure handling, as on the finish path. No fallback or retry is added. ### Tests The regression verifies queue advancement and drain completion at the operator boundary on both affected engines. | Contract | Coverage | |---|---| | 1. Queued input processed | `ActionExecutionOperatorTest.nonParallelEnginesProcessInputQueuedBehindInputWithoutTriggeredActions` (JDK 17 serial, JDK 21 continuation) | | 2. Retirement unchanged | Existing `TaskLifecycleListenerNotificationTest.recordWithoutTriggeredActionsEmitsNoLifecycleEvents` covers continuation execution on JDK 21 and the parallel engine on JDK 17 | | 3. Parallel engine unchanged | Existing parallel engine tests, including `parallelEngineRetiresInputWithoutTriggeredActions`, which runs on JDK 17 and is skipped when continuations are supported | Not verified: - This queued-input sequence in a full Flink job or with Python Actions. - Watermark, metric, and lifecycle assertions, failure injection, and checkpoint restore for this sequence. - A serial no-Action input with nothing queued behind it. <details> <summary>Test runs</summary> - `mvn -pl runtime,e2e-test/flink-agents-end-to-end-tests-integration test` with zero failures and errors. JDK 21: runtime 1,366 tests, 33 skipped; integration 71, 9 skipped. JDK 17: runtime 1,356, 44 skipped; integration 67, 12 skipped. - Without the change, the new test fails on JDK 17 and JDK 21 with output `["single-1"]`. </details> ### API No public API changes. Inputs that previously stayed queued now reach their Actions, so whatever those Actions emit reaches downstream. ### Documentation - [ ] `doc-needed` - [x] `doc-not-needed` - [ ] `doc-included` ### Was this patch authored or co-authored using generative AI tooling? - [x] Yes - [ ] No Generated-by: Claude Code 2.1.303 (Claude Opus 5.5) -- 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]
