The GitHub Actions job "Scalafmt" on pekko.git/feat/stream-expand-supervision 
has failed.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
4c1350b615c0054ddf918de3d8ce1557ef7a8fc2 / 虎鸣 <[email protected]>
fix: add supervision strategy support for expand and extrapolate

Motivation:
Issue #3110 tracks stream operators that should honor
ActorAttributes.SupervisionStrategy for user functions. The expand
operator evaluated user-provided expansion logic without supervision,
so exceptions failed the stream unconditionally. Because extrapolate is
implemented on top of Expand, the same gap applied there.

Modification:
Add supervision handling in Expand for exceptions from the expander
function and from iterator evaluation paths (hasNext/next). Stop fails
the stage, Resume drops the failed element and continues, and Restart
resets extrapolation state before continuing. A corrupt iterator (any
hasNext/next failure) is necessarily discarded under both Resume and
Restart since its state cannot be trusted.

Change the decider accessor to `private def decider` to match the
established pattern in Map, Filter, Collect, and other fusing operators.

Update Scala/Java API docs (Flow/Source/SubFlow/SubSource) and operator
docs (expand.md/extrapolate.md) to describe supervision behavior,
including iterator evaluation failures. Fix a long-standing Scaladoc
typo ("faster than the upstream" → "faster than the downstream") in the
expand documentation, and clarify in extrapolate's docs that Resume and
Restart behave identically because the original element is always
emitted before the extrapolator is invoked.

Add directional tests in FlowExpandSpec (15 tests, +10) and
FlowExtrapolateSpec (11 tests, +4) covering Stop/default-Stop/Resume/
Restart for both expander-function failures and iterator-evaluation
failures, including regression tests for iterator failures that occur
during upstream completion (onUpstreamFinish).

Result:
expand and extrapolate now honor ActorAttributes.SupervisionStrategy for
user-function and iterator-evaluation failures, with deterministic
regression coverage for all supervision branches.

Tests:
- sbt "stream-tests/Test/testOnly 
org.apache.pekko.stream.scaladsl.FlowExpandSpec 
org.apache.pekko.stream.scaladsl.FlowExtrapolateSpec" -- 26/26 passed
- sbt "stream/mimaReportBinaryIssues" -- clean (unchanged from prior commits)
- sbt "docs/paradox" -- passed (unchanged from prior commits)

References:
Refs #3110

Report URL: https://github.com/apache/pekko/actions/runs/28316307247

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to