Corrective action: www-gitlab-com pipelines failing with "Undefined error"
Summary
A corrective action to update the feature flag check in lib/gitlab/ci/config/external/mapper/verifier.rb was identified in production#8405 (comment 1280469809)
Related Incident(s)
Originating issue(s): production#8405 (closed)
Context
Upon rolling out the FF ci_includes_count_duplicates introduced by Update CI includes counting structure to includ... (gitlab-org/gitlab!111726 - merged), an incident occurred, which was due to mismatching Feature Flag project actors. This is explained in more detail here.
The specific error that arose was due to .add being called on an Array.
Desired Outcome/Acceptance Criteria
Replace the Feature Flag condition with a variable type check. Ref: gitlab-org/gitlab!111726 (diffs)
if ::Feature.enabled?(:ci_includes_count_duplicates, context.project)
context.expandset << file
else
context.expandset.add(file)
end
Desired outcome: In a situation where a project (with FF enabled) has a .gitlab-ci.yml config that includes a file from another project (with FF disabled), there will be no error when running the pipeline.
Associated Services
Corrective Action Issue Checklist
-
Link the incident(s) this corrective action arose out of -
Give context for what problem this corrective action is trying to prevent from re-occurring -
Assign a severity label (this is the highest sev of related incidents, defaults to 'severity::4') -
Assign a priority (this will default to 'Reliability::P4')