Skip to content

Refactor CI rules entry to use composed value

Furkan Ayhan requested to merge 293645-refactor-rules-changes into master

What does this MR do and why?

This MR refactors CI rules entry to use composed value.

When we return a value from an entry, we always need to return the composed version. In Rules, we return "config", which means the hash version of what the YAML file has. I changed it to "super" because it needs to have a composed value of each sub-entry.

With this, we also needed to change the validate_against_warnings method of lib/gitlab/ci/config/entry/processable.rb. Since we haven't composed the nested entries yet, we cannot use *_value attributes there.

Step Status
1. Move CI rules-changes to an entry class !89463 (merged)
2. Refactor CI rules entry to use composed value 👈 You are here
3. Add rules:changes:paths alias to rules:changes !90171 (merged)
4. Implement rules:changes:compare !90968 (merged)

Related to #293645 (closed)

These changes are behind the feature flag ci_value_change_for_processable_and_rules_entry #365876 (closed).

MR acceptance checklist

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

Edited by Furkan Ayhan

Merge request reports

Loading