Skip to content

Add actions.Jobs validators

Related tasks

Context

An Action cannot have an empty set of jobs, and all its job names must be unique. This is required by the Actions framework to persist and restore information between shutdowns.

Change

This MR adds two new validators to actions.Jobs. actions.Jobs is a slice of Jobs, and is used to define the jobs for an Action. Jobs has a validate method composed of a number of validators used to validate an action when creating it.

The following validators have been added:

  • There must be at least one job in a Jobs object.
  • Job names must be unique.

Other information

Additional documentation

Merge request reports