Loading
Run the readiness score flow on Workhorse without a repository clone
What does this MR do and why?
The readiness score flow now runs on Workhorse without a repository clone, behind the readiness_score_on_workhorse flag. It only reads the work item and writes the score through GitLab API tools, so the CI job and the clone were pure overhead.
- Opt in.
readiness_score/v1declarescoding_environment: "none", soCreateAndStartWorkflowServicestarts it on Workhorse. - Feature flag. While
readiness_score_on_workhorse(gitlab_com_derisk, off by default) is off for the session's user, the flow resolves tofulland stays on CI. It's one more entry inCodingEnvironment::WORKHORSE_ROLLOUTS, with the session user as the actor like the other two flags. - No CI image. Workhorse needs no image, so custom Duo images without curl can't break the flow (#635674).
Why this is simpler than workplan
- Single run: the flow config (
readiness_score/1.0.0.yml) has no input gates, so there's no resume path to change. - Safe rollback: turning the flag off strands no sessions.
- Tools:
get_work_item,get_work_item_notesandupdate_work_itemonly.
Known limits, same as workplan on Workhorse
- Group IP restrictions:
/executechecks the Sidekiq egress IP, so IP-restricted groups can't run the flow on Workhorse until the IP passthrough fix lands. - Service account membership: !268477
- Model selection: on Workhorse, the flow uses the chat model (#638605).
- Runner precondition at creation: #629005
References
- Resolves #639679 (closed)
- Rollout: #639704
- Stacked on !267832 (merged), which adds
WORKHORSE_ROLLOUTSand the runtime inference inCreateAndStartWorkflowService.
Screenshots or screen recordings
Not applicable. No UI changes.
How to set up and validate locally
Verified in GDK on gitlab-duo/test:
| Check | Result |
|---|---|
| Flag off | readiness_score/v1 resolves to CI |
| Flag on, Generate readiness score | Ran on Workhorse with no workload (created → running → finished) and wrote the score to the Workplan widget |
To repeat it:
- Enable
workplan_scorefor your user andreadiness_score_on_workhorse. - Generate a readiness score on a work item.
- In the Rails console, confirm the session has no workload:
Ai::DuoWorkflows::Workflow.last.workloads.exists?isfalse.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Vanessa Otto