Loading
Show a View retry link on retried sessions in the Sessions widget
What does this MR do and why?
Follows the design feedback on what happens after a retry: a retried session should point to its retry.
- Replace Retry with a View retry link to the newest retry on a retried session
- Request
restartedAsin the shared session fragment, used by the work item and merge request session queries and the work item sessions subscription
The View retry link is behind the dap_session_restarts feature flag. The queries request restartedAs either way, and the field is batch loaded.
Plan
| # | MR | What it adds |
|---|---|---|
| 1 | Add Retry to failed and cancelled sessions in t... (!263742 - merged) • Allison Villa • 19.6 | Retry button on failed and cancelled sessions, at the end of the row and borderless |
| 2 | Expose restartedAs on the DuoWorkflow GraphQL type (!268886 - merged) • Allison Villa • 19.6 | restartedAs field, so the widget can tell a session was retried |
| 3 | Show a View retry link on retried sessions in t... (!268887 - merged) • Allison Villa • 19.6 | Retried failed and cancelled sessions get a View retry link |
We split it this way so the Retry button (1) can merge without waiting on the backend field (2). Only the design feedback on what happens after a retry needs the new field, so that part (3) depended on 2, which has merged.
See design and UX discussion - !263742 (comment 4059242321)
References
- Related to FE: Add retry button to sessions widgets compon... (#598747 - closed) • Allison Villa • 19.6 • At risk
- Backend MR (merged): Expose restartedAs on the DuoWorkflow GraphQL type (!268886 - merged) • Allison Villa • 19.6
- Retry button MR: Add Retry to failed and cancelled sessions in t... (!263742 - merged) • Allison Villa • 19.6
- Epic: Session Resilience & Recovery (gitlab-org#22549) • Unassigned • 19.7 • On track
Screenshots or screen recordings
| Session row that's been retried | Recording of behaviour |
|---|---|
![]() |
How to set up and validate locally
- Prerequisite: Have GitLab Duo set up in your GDK or Caproni
- Have a Duo-enabled group and project created by the Duo setup above
- Prerequisite: Have GitLab Runner working in your GDK or Caproni
- Enable the
dap_session_restartsfeature flag. - Start a session from an issue in the Duo-enabled project. For example, select Implement on the issue.
- Open the session at
/<project full path>/-/automate/agent-sessions/<session ID>. - Select Cancel session.
- In the confirmation dialog, select Cancel session.
- Go back to the issue and expand the Sessions widget. The cancelled session shows under Cancelled, with a Retry session icon button.
- Select Retry session on the cancelled session. A new session starts.
- The new session shows under Created, and the cancelled session shows under Cancelled with a View retry link instead of Retry session.
- Select View retry. The new session opens.
- Disable the
dap_session_restartsfeature flag and reload the issue. The cancelled session has no Retry session button or View retry link.
Edited by Allison Villa
