Unable to create pipeline with frontend and feature flag labels in gitlab-org/gitlab project
Summary
CI displays a yaml invalid
error when attempting to create a pipeline for an MR that has both the frontend and feature flag labels applied.
See this pipeline for an example:
Steps to reproduce
-
Create a new MR in the https://gitlab.com/gitlab-org/gitlab project after making a change to any file, for example, add a comment to qa/qa/specs/features/ee/browser_ui/13_secure/merge_request_license_widget_spec.rb:
+++ b/qa/qa/specs/features/ee/browser_ui/13_secure/merge_request_license_widget_spec.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +# testing module QA RSpec.describe 'Secure', :runner, product_group: :composition_analysis, feature_flag: { name: 'license_scanning_sbom_scanner'
-
Add both a feature flag and frontend label to the MR, for exmaple:
/label ~"Category:License Compliance" ~"Deliverable" ~"GitLab Ultimate" ~"QA" ~"backend" ~"devops::secure" ~"feature flag" ~"feature::enhancement" ~"group::composition analysis" ~"section::sec" ~"type::feature" ~frontend
-
View pipeline for MR and see
Unable to create pipeline
error.
Example Project
What is the current bug behavior?
Can't create a pipeline for an MR.
What is the expected correct behavior?
Pipeline for a MR should be created successfully.
Possible fixes
There's a problem with the rules in https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/rules.gitlab-ci.yml#L101. According to @rymai in a slack conversation:
we probably need to add - <<: *if-merge-request-labels-frontend-and-feature-flag to .test-metadata:rules:retrieve-tests-metadata.