mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
* feat(stepfunctions): describe a distributed Map run after it finishes DescribeMapRun was not implemented, and arn:aws:states:::aws-sdk:sfn:describeMapRun reached the end of the dispatch chain in invokeResource, so a distributed Map could not be inspected once it was over: the Map run ARN was minted from a fresh UUID, written into the S3 manifest, returned in the Map result and then dropped. A run is now retained where the ResultWriter mints that ARN, which is also the only place an ASL author reads it. The manifest is no shortcut to the counters, since it writes FAILED and PENDING as empty arrays and puts every item under SUCCEEDED, so the run carries the item count taken where the iterations complete. A Map fails on the first item that fails, so a retained run is one whose every item succeeded. That fixes the status, both tolerances and the redrive counters at the values us-east-1 reports for such a run, and leaves succeeded, total and resultsWritten as the item count. An unbounded Map, which ASL spells as MaxConcurrency 0 or by omitting it, is reported as Integer.MAX_VALUE. The Task integration recases the wire response rather than restating it, so the two renderings of a run cannot drift, and renders both dates as the SDK's ISO-8601. Closes #2671 * refactor(stepfunctions): close a Map run's window on the export that mints its ARN recordMapRun sampled the wall clock and then folded the child timings into both ends of the run's window, but the clock is read after MapIterationScheduler has joined every child and after applyResultWriter has exported, so it is at or past every child's stop. Math.max over the timings could therefore never move stop off that sample, and the javadoc promised a last-item stop the code never computed. The sampled value is the faithful one: AWS closes a Map run's window on the export rather than on the last item, and the sample is taken immediately after it. Only start is recovered from the timings, which is the one end the Map state records nowhere else. DescribeMapRun returns the same startDate and stopDate as before. * test(compatibility): cover DescribeMapRun through the AWS SFN SDK client StepFunctionsDescribeMapRunIntegrationTest only exercises the endpoint via RestAssured, leaving the SDK's own request serialization, endpoint routing and response deserialization untested, contrary to AGENTS.md's rule that management APIs be validated with AWS SDK clients. --------- Co-authored-by: Facundo Paredes <25681464+facuparedes@users.noreply.github.com>