jenkinsci / jenkinsci/workflow-multibranch-plugin
[JENKINS-66044] `SCMFileSystem`, `SCMBinder` and `readTrusted` should notify SCMListener
- 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
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
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