Skip to content

fix: don't attach UserInterruption with null user id on [skip ci] abort#39

Merged
NoUseFreak merged 2 commits into
mainfrom
fix/skipcommit-null-userinterruption
Jun 11, 2026
Merged

fix: don't attach UserInterruption with null user id on [skip ci] abort#39
NoUseFreak merged 2 commits into
mainfrom
fix/skipcommit-null-userinterruption

Conversation

@NoUseFreak

Copy link
Copy Markdown
Member

Summary

  • [skip ci] builds are SCM-triggered, so env.BUILD_USER_ID is null. UserInterruption stores that null user id and its hashCode() NPEs inside FlowInterruptedException.handle() during WorkflowRun.finish(), aborting completion before RunListener.fireCompleted() runs. As a result the GitHub Branch Source plugin never posts the final commit status and [skip ci] commits stay stuck on "pending".
  • Throw the FlowInterruptedException without a cause and with actualInterruption: false, and guard against a missing previous build.
  • Repair the maven test setup (https repo URL, provided scope for jenkins-core/servlet-api) so make test compiles and runs again.

Testing

  • make test: 12 tests run, 11 pass. The one failure (basePipelineSpec) is pre-existing and unrelated — it fails identically with the unmodified plugin code.

[skip ci] builds are SCM-triggered, so env.BUILD_USER_ID is null.
UserInterruption stores the null user id and its hashCode() throws NPE
inside FlowInterruptedException.handle() during WorkflowRun.finish(),
aborting completion before RunListener.fireCompleted() runs. That
skipped the GitHub Branch Source final commit status, leaving [skip ci]
commits stuck on a pending status.

Throw without a cause and with actualInterruption false instead, and
guard against a missing previous build.
- repo.jenkins-ci.org no longer serves plain http (308 redirect)
- jenkins-core and servlet-api must be on the compile classpath since
  main sources import hudson.model.Result and friends
@NoUseFreak NoUseFreak merged commit 09fd98a into main Jun 11, 2026
3 checks passed
@NoUseFreak NoUseFreak deleted the fix/skipcommit-null-userinterruption branch June 11, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant