jenkinsci / jenkinsci/scm-api-plugin
[JENKINS-49610] The SCMSource.setOwner(owner) contract needs updating to include ensuring that an ID has been assigned
- Dominant language
- Java
- Stars
- 33
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
Discussion
We need to ensure that issues like " in logs" class="issue-link" data-issue-key="JENKINS-48571">JENKINS-48571 are more easily self-diagnosable by users.
At first glance there are two ways this could be solved:
- We could enforce the id assignment by throwing an IllegalStateException or similar if the id is null at the time of setOwner(non-null)
- We could ensure an id assignment by assigning one if the id is null at the time of setOwner(non-null)
There may also be other potential solutions.
Acceptance Criteria
- Assessment criteria for selection of a proposed solution have been defined and reviewed by stephenconnolly and michaelneale
- The list candidate solutions to be assessed has been defined
- The results of the assessment process have been reviewed with stephenconnolly and michaelneale and the winner agreed.
- The winning solution has been implemented.
- The documentation has been updated to include the impact.
- Minimization of the risk of "Build storms" has been included in the assessment criteria
Critical assumpitions
(if any of these prove to be broken in the process of resolving this ticket then a replan is required)
- There is no good reason to call setId after the owner has been assigned.
---
Originally reported by
stephenconnolly, imported from: The SCMSource.setOwner(owner) contract needs updating to include ensuring that an ID has been assigned
Raw content of original issue
Discussion
We need to ensure that issues like
JENKINS-48571are more easily self-diagnosable by users.At first glance there are two ways this could be solved:
- We could enforce the id assignment by throwing an IllegalStateException or similar if the id is null at the time of setOwner(non-null)
- We could ensure an id assignment by assigning one if the id is null at the time of setOwner(non-null)
There may also be other potential solutions.
Acceptance Criteria
- Assessment criteria for selection of a proposed solution have been defined and reviewed by stephenconnolly and michaelneale
- The list candidate solutions to be assessed has been defined
- The results of the assessment process have been reviewed with stephenconnolly and michaelneale and the winner agreed.
- The winning solution has been implemented.
- The documentation has been updated to include the impact.
- Minimization of the risk of "Build storms" has been included in the assessment criteria
Critical assumpitions
(if any of these prove to be broken in the process of resolving this ticket then a replan is required)
- There is no good reason to call setId after the owner has been assigned.
Contributor guide
Assessment
This issue has not been assessed yet.