You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@streampark.apache.org by GitBox <gi...@apache.org> on 2026/08/13 00:26:26 UTC

[GH] (streampark/fix/build-pipeline-null-step-result): Workflow run "E2E" is working again!

The GitHub Actions job "E2E" on streampark.git/fix/build-pipeline-null-step-result has succeeded.
Run started by GitHub user 88fantasy (triggered by wolfboys).

Head commit for run:
47a023c4c866278023be8c77d91780368c61ae7b / 阮伟儿 <ru...@dgmed.cn>
fix(packer): stop conflating step success with a non-null step result in BuildPipeline

execStep() wrapped every successful step result in Optional.of(result), which
throws NullPointerException whenever a step's Callable legitimately returns
null -- and returning null is the normal case for steps that only perform a
side effect (e.g. "create/clean the build workspace") and have nothing
meaningful to hand to the next step. This is a textbook Scala-to-Java
migration bug: the original Scala code almost certainly used Option(x), which
tolerates null, not the strict Optional.of(x).

Every one of BuildPipeline's ~20 call sites already followed the same
execStep(seq, ...).orElseThrow(() -> pipelineException()) pattern purely to
turn a failed step into a thrown exception -- Optional was being used as a
success/failure signal, not as a genuine "maybe absent" value, so it could
never actually represent "succeeded, but there's no value" once any step
returned null. FlinkRemoteBuildPipeline's step 1 hit exactly that: it
succeeded (the workspace really was created), but execStep threw
NullPointerException at Optional.of(null) before the SUCCESS status update
even had a chance to matter, and the console reported the pipeline as failed
building the app jar for every Flink SQL application.

Change execStep() to return R directly and throw pipelineException() itself
on failure -- the exact exception every caller was already constructing via
orElseThrow(). This removes the null ambiguity entirely: a normal return means
success (whatever the value, including null), and failure is always signaled
by an exception, matching how the callers actually use it. Drop the now
redundant .orElseThrow(...) at all 20 call sites across
BuildPipeline#runYarnSqlBuildSteps, FlinkRemoteBuildPipeline,
FlinkK8sSessionBuildPipeline, AbstractK8sApplicationBuildPipeline,
FlinkK8sApplicationBuildPipeline, and SparkK8sApplicationBuildPipeline.

Reproduced via POST /flink/pipe/build against a real Flink 2.2.1 standalone
cluster: the build pipeline for a Flink SQL application always failed at step
1/2 with this exact NullPointerException, confirmed via the stdout log
(streampark.out; this exception is thrown before the console's own
GlobalExceptionHandler ever sees a request, so it never reaches the ERROR
log file or the persisted ApplicationBuildPipeline.errorSummary).

Report URL: https://github.com/apache/streampark/actions/runs/31650071101

With regards,
GitHub Actions via GitBox