You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by GitBox <gi...@apache.org> on 2026/06/20 13:02:30 UTC
[GH] (pekko/add-throttle-supervisor-strategy): Workflow run "Pull Requests" failed!
The GitHub Actions job "Pull Requests" on pekko.git/add-throttle-supervisor-strategy has failed.
Run started by GitHub user He-Pin (triggered by He-Pin).
Head commit for run:
629312860286466519fdbc76024ec9a0ef08de4d / 虎鸣 <he...@alibaba-inc.com>
feat(stream): add supervisor strategy support to Throttle costCalculation
Motivation:
The Throttle stage's costCalculation function had no exception handling.
If the user-provided cost function threw, the exception propagated directly
and failed the stage unconditionally. Unlike other stages (MapAsync, Filter,
Log), Throttle did not consult the SupervisionStrategy decider, preventing
users from configuring Resume or Restart behavior for bad elements.
Modification:
- Add try-catch around costCalculation(elem) with NonFatal handling
- Add decider lookup via SupervisionStrategy mandatory attribute
- On Stop: failStage (preserves default behavior)
- On Resume/Restart: log at debug level and pull next element
- Mix in StageLogging for observability
- Add tests for Resume, Restart, Stop directives and Enforcing mode
Result:
Users can now configure supervision strategy on Throttle to skip elements
that cause costCalculation exceptions, matching the behavior of other
stages in Pekko Streams.
Tests:
- sbt "stream-tests / Test / testOnly org.apache.pekko.stream.scaladsl.FlowThrottleSpec"
- 27 tests passed (4 new + 23 existing)
References:
Fixes #3101
Inspired by akkadotnet/akka.net#6886
Report URL: https://github.com/apache/pekko/actions/runs/27871180834
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org