Validation by metadata for Config::Entry::Rules
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
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
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