Skip to content

Adds scheduling_type to Job and UsesNeeds to Pipeline

Laura Montemayor requested to merge lm-add-scheduling-type-to-job into master

What does this MR do?

Adds the scheduling_type field to CiJob that determines whether a Job has the needs: keyword or not. If it does, it will return dag, if it doesn't it will return stage.

Also adds the usesNeeds boolean to PipelineType, which returns true if any job on that pipeline has scheduling_type == 'dag'

Screenshots (strongly suggested)

Query:

{
  project(fullPath: "root/wake-in-fright") {
    pipeline(iid: 4) {
      usesNeeds
      jobs {
        nodes {
          name
          schedulingType
        }
      }
    }
  }
}

Response:

{
  "data": {
    "project": {
      "pipeline": {
        "usesNeeds": true,
        "jobs": {
          "nodes": [
            {
              "name": "test_2",
              "schedulingType": "dag"
            },
            {
              "name": "test_1",
              "schedulingType": "dag"
            },
            {
              "name": "pre-test_3",
              "schedulingType": "stage"
            },
            {
              "name": "pre-test_2",
              "schedulingType": "stage"
            },
            {
              "name": "pre-test_1",
              "schedulingType": "stage"
            },
            {
              "name": "build_2",
              "schedulingType": "stage"
            },
.... and so forth

Does this MR meet the acceptance criteria?

Conformity

#325822 (closed)

Edited by Laura Montemayor

Merge request reports

Loading