jenkinsci / jenkinsci/workflow-multibranch-plugin

[JENKINS-66044] `SCMFileSystem`, `SCMBinder` and `readTrusted` should notify SCMListener

Open
#527 1 comment 0 reactions 0 assignees View on GitHub
component:workflow-multibranch-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
87
Forks
131
PR merge metrics
No merged PRs in 30d

Description

It seems like many plugins (GitHub Multibranch and Bitbucket Multibranch at the very minimum) are using `onCheckout` event to send build notifications.

Sometimes it's just doesn't work due to unrelated bugs related to all the complexity with multi-scm pipelines, for instance - https://issue-redirect.jenkins.io/issue/66040.

Sometimes when it does - it might be too late. Imagine your groovy lib or custom project factory does a whole bunch of stuff to generate an actual pipeline - by the time it does a first real `scm checkout` it might be 20-30 or more seconds after the build have started.

I am not sure if calling `onCheckout` on all SCM access would be a good idea, but maybe a new event to the SCMListener would do. Consumer plugins could then use this event to send out notifications earlier in the game.

---
Originally reported by llibicpep, imported from: `SCMFileSystem`, `SCMBinder` and `readTrusted` should notify SCMListener


  • status: Open
  • priority: Major
  • component(s): workflow-multibranch-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251212-090250

Raw content of original issue

It seems like many plugins (GitHub Multibranch and Bitbucket Multibranch at the very minimum) are using `onCheckout` event to send build notifications.

Sometimes it's just doesn't work due to unrelated bugs related to all the complexity with multi-scm pipelines, for instance - https://issues.jenkins.io/browse/JENKINS-66040.

Sometimes when it does - it might be too late. Imagine your groovy lib or custom project factory does a whole bunch of stuff to generate an actual pipeline - by the time it does a first real `scm checkout` it might be 20-30 or more seconds after the build have started.

I am not sure if calling `onCheckout` on all SCM access would be a good idea, but maybe a new event to the SCMListener would do. Consumer plugins could then use this event to send out notifications earlier in the game.

Contributor guide

Open the contributing guide

Research direction

Start by tracing SCMFileSystem, SCMBinder, and readTrusted, then compare their SCM access with the existing SCMListener onCheckout entry point. Clarify which access should produce an event and how consumer plugins would use it for earlier notifications; the issue is done when that behavior and its expected listener contract are defined and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.