-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: naginator-plugin
-
None
-
Environment:Jenkins: 2.568.2
Naginator Plugin: 1.556.v14d723a_109a_c
Matrix Project Plugin: 917.v22eda_817646e
Job type: Multi-configuration (matrix) project
Problem
The Naginator plugin supports both:
- manual "Retry" of a completed build
- "Rerun build only for failed parts on the matrix"
However, for a matrix project these two features do not work together in the way a user would reasonably expect.
When the automatic Naginator retry runs, failed matrix combinations can be retried selectively.
When the user manually clicks "Retry" on the parent matrix build, however, the new build runs all matrix combinations, including combinations that previously succeeded.
There is currently no way from the manual Retry action to choose which matrix combinations should be rerun.
Example
Consider a matrix job with four combinations:
skymap2 FAILURE skymap3 SUCCESS skymap4 FAILURE skymap5 SUCCESS
The project has "Rerun build only for failed parts on the matrix" enabled.
For automatic retry, the expected behavior is to rerun only:
skymap2 skymap4
But clicking the manual "Retry" action on the parent build creates a new matrix build containing all four combinations:
skymap2 skymap3 skymap4 skymap5
This is especially surprising because the job configuration already says to rerun only failed parts of the matrix.
Proposed behavior
For a MatrixBuild, clicking "Retry" should open a confirmation/selection page rather than immediately scheduling the build.
The page should list the combinations from the original matrix build, for example:
[x] skymap2 FAILURE
[ ] skymap3 SUCCESS
[x] skymap4 FAILURE
[ ] skymap5 SUCCESS
[Retry selected]
Suggested behavior:
- Show all combinations that existed in the original matrix build.
- Preselect failed combinations.
- Leave successful combinations unselected by default.
- Allow the user to manually select or deselect combinations.
- "Retry selected" should schedule the parent MatrixBuild containing only those selected combinations.
- Preserve the existing immediate Retry behavior for non-matrix jobs.
This would also allow useful manual cases such as retrying one failed combination while deliberately leaving another failed host offline for maintenance, or optionally rerunning an additional successful combination.
Matrix child Retry
There is a related issue with the Retry action being shown on individual MatrixRun children.
Trying to retry an individual matrix child can be rejected by Jenkins because a matrix configuration cannot be independently triggered without its parent.
This is already tracked by JENKINS-61491.
It may therefore make sense to hide the manual Retry action on MatrixRun children and expose the combination-selection UI only on the parent MatrixBuild.
Related issues
JENKINS-23032- added support for rerunning only failed parts of a matrix job- JENKINS-61491 - Retry on a child of a multi-configuration job does not work
The selective automatic matrix retry functionality already exists, so this proposal is primarily about exposing equivalent matrix-awareness in the interactive/manual Retry workflow.
Expected result
Manual Retry on a matrix parent gives the user explicit control over which matrix combinations are scheduled, with failed combinations selected by default.
Actual result
Manual Retry on a matrix parent schedules all combinations, even when only some combinations failed.