Skip to content

Introduce `validating` CI job state in service of future Admissions Controllers

What does this MR do and why?

In service of #378322 , as a component of the proposed piecewise implementation of the Runner Admission Controller and its various supporting fixtures, this MR adds a validating status to the Ci:Build model, related transitions and supporting framework. Additionally this MR adds placeholder stubs in the form of both methods and model to be expanded by elaboration of the Runner Admission Controller feature.

The Runner Admissions Controller specifies a validating status between created and pending to allow for the Admission Controller and mutating webhook to perform operations on the selected job, and return an accepted or rejected status.

This MR introduces the validating status between created and pending by intercepting transitions to pending from any state that allows the transition and instead transitions to validating. However, due to a lack of implemented Admission Controller, all jobs are immediately given accepted status, and are transitioned directly to pending. This means that this MR is, for the moment, functionally a no-op, and is instead designed to provide a code frame on which to build the Admissions Controller.

How to set up and validate locally

This MR should be a no-op from an end user perspective and is designed to be an intermediate step toward a larger piece of functionality that is not yet present in Gitlab.

Validation can be confirmed via the specs, or log entries regarding job status changes.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #378322

Merge request reports