Skip to content

Add logic for fetching pipeline creation status

Laura Montemayor requested to merge 479811-add-query-for-pipeline-creation into master

What does this MR do and why?

Add some logic for fetching pipeline creation status.

  • Add a Ci::PipelineCreation type with status and pipeline_id
  • Add a PipelineCreationMetadata model to store logic for storing and fetching pipeline creation data

Co-Authored By: Avielle Wolfe awolfe@gitlab.com

#479815 (closed)

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

  1. 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})

  2. 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

Merge request reports

Loading