Skip to content

Fix inclusion validation for CI entries

What does this MR do and why?

As we realized in !101350 (merged):

We have the "inclusion" validation for the when keyword but no validation for its type. So, the attribute also accepts an array as the value. The "inclusion" validation of ActiveModel::Validations also accepts array values and compares each element.

We fixed that problem in that MR for the Entry::Job and Entry::Bridge entries. In this issue, we fix the following entries by specifying the type along with the inclusion validation:

  • Entry::Artifacts
  • Entry::Cache

Screenshots or screen recordings

  • Example: Entry::Artifacts

Before fix (validation passes):

Screenshot_2022-11-25_at_4.01.58_PM

After fix:

Screenshot_2022-11-25_at_4.01.23_PM

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 #378368 (closed)

Edited by Leaminn Ma

Merge request reports

Loading