Add Ci::CallbackJob model
What does this MR do and why?
Adds a new Ci::Processable
model, Ci::CallbackJob
. Callback jobs will use the :waiting_for_callback
state added in !134605 (merged) to wait for external input before proceeding instead of being picked by a runner.
Note that there is currently no way for instances of these models to be created, as they will be configured using a new CI keyword that is to be added in a subsequent issue (#415737). There should therefore be no impact to CI job processing.
For more information, see the epic.
Screenshots or screen recordings
Pipeline view | Jobs list |
---|---|
How to set up and validate locally
Much the same as !134605 (merged), except the data comes from the new model:
- Create a project, ticking "create readme" in the creation form.
- In a Rails console, create a dummy pipeline and callback job:
project = Project.find <project-id> pipeline = project.ci_pipelines.create! status: :waiting_for_callback, sha: <sha-of-initial-commit>, ref: 'main', source: :push pipeline.callback_jobs.create! status: :waiting_for_callback, name: 'test', ref: 'main', scheduling_type: :stage, project: project, stage: 'test', stage_idx: 0
- View the pipeline and job pages to see the state text and icons.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #415736
Edited by Tiger Watson