Skip to content

CI Resource Groups Status Transition

Shinya Maeda requested to merge poc-ci-resource-group into master

Important: This feature will be announced in gitlab-com/www-gitlab-com!36621 (merged). This MR has to be merged by Dec, 13th Friday.

What does this MR do?

There is an upstream MR !20950 (merged).

This MR adds status transition flow for Resource Group, which is used for Limit pipeline job concurrency using named semaphores. We introduce waiting_for_resource status to Ci::Build and manipulate the build status transition with Resource Groups.

Status transition overview

  • When a build requires a resource, the status transits to waiting_for_resource.
  • When a build successfully retains a resource, the status transits to pending (or preparing).
  • When a build failed to retain a resource, the status stays as waiting_for_resource.
  • When a build finished, it releases a resource, and find the next waiting build.

The other notes:

  • Ci::Bridge is not supported in this iteration.

Feature Flag

This feature is implemented behind ci_resource_group feature flag and disabled by default. Once we've confirmed the feature is deemed stable, we remove the feature flag in order to publish the feature as GA.

TODO:

  • Split MR for YAML parser
  • Introduce a status waiting_for_resource and manipulate the status transition
  • Write tests

Realted:

Screenshots

Click to expand screen shots Screenshot_from_2019-12-11_15-09-30

Screenshot_from_2019-12-11_15-09-26

Screenshot_from_2019-12-11_15-09-12

Screenshot_from_2019-12-11_15-08-53

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Shinya Maeda

Merge request reports