jenkinsci / jenkinsci/branch-api-plugin
[JENKINS-61459] In progress builds report failure when orphaned
- Dominant language
- Java
- Stars
- 39
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
If a ref disappears, it's job will become disabled, however any running builds of this job will not be aborted. This can result in the build trying to checkout code from a deleted ref which, most likely, will result in a failure. This becomes an issue when the failure of a build gets reported back to a code review system eg Gerrit.
It seems logical that an orphaned job should also have any builds aborted as they cannot succeed and will result in an incorrect failure case.
---
Originally reported by nickb_carallon, imported from: In progress builds report failure when orphaned
Raw content of original issue
If a ref disappears, it's job will become disabled, however any running builds of this job will not be aborted. This can result in the build trying to checkout code from a deleted ref which, most likely, will result in a failure. This becomes an issue when the failure of a build gets reported back to a code review system eg Gerrit.
It seems logical that an orphaned job should also have any builds aborted as they cannot succeed and will result in an incorrect failure case.
Contributor guide
Research direction
No source file, test, or entry point is named. Start by locating the branch-api-plugin code that disables jobs when refs disappear and tracing how running builds are tracked. Confirm the existing orphaning behavior, then add the abort behavior and tests showing that builds of orphaned jobs do not continue to report checkout failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100