Add logic for fetching pipeline creation status
What does this MR do and why?
Add some logic for fetching pipeline creation status.
- Add a
Ci::PipelineCreation
type withstatus
andpipeline_id
- Add a
PipelineCreationMetadata
model to store logic for storing and fetching pipeline creation data
Co-Authored By: Avielle Wolfe awolfe@gitlab.com
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
{
project(fullPath:"gitlab-org/test-project") {
id
ciPipelineCreation(id: "123") {
status
pipelineId
}
}
}
{
"data": {
"project": {
"id": "gid://gitlab/Project/21",
"ciPipelineCreation": {
"status": "CREATING",
"pipelineId": null
}
}
}
}
How to set up and validate locally
-
In the console:
Rails.cache.write(format(Ci::PipelineCreationMetadata::REDIS_CACHE_KEY, project_full_path: project.full_path, pipeline_creation_id: '123'), { status: :creating, id: nil})
-
Run query as above, see the status returned.
NOTE: This will not return a pipelineId
yet. That logic is yet to be implemented.
Related to #479811
Edited by Laura Montemayor