Skip to content

Validation by metadata for Config::Entry::Rules

drew stachon requested to merge rules-validation-metadata into master

What does this MR do?

This MR introduces the ability to pass metadata into Config::Entry::Configurable#entry and have the metadata applies to the Entry::Node produced by Entry::Factory#create!

It also re-implements validation of job:rules[when:] values using this new capability. We want to be able to do this as a part of implementing workflow:rules !18757 (comment 234673979), because the allowable when: values in that context will not be the same, and therefore should not be defined as a simple class constant.

The metadata-validation-on-compose implementation is taken from !17539 (merged), h/t @matteeyah

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 Kamil Trzciński

Merge request reports