Remove the policy_mergability_check FF
This feature flag was introduced in 17.3, which is more than 4 milestones ago.
As part of our process we want to ensure feature flags don't stay too long in the codebase.
Rollout issue: #473704 (closed)
Remaining mentions of the feature flag (click to expand)
ee/app/models/ee/merge_request.rb
453: feature_enabled = ::Feature.enabled?(:policy_mergability_check, project)
ee/spec/graphql/ee/types/merge_request_type_spec.rb
367: stub_feature_flags(policy_mergability_check: true)
ee/spec/lib/ee/gitlab/data_builder/pipeline_spec.rb
200: stub_feature_flags(policy_mergability_check: true)
ee/spec/models/merge_request_spec.rb
2063: context 'with feature flag policy_mergability_check false' do
2065: stub_feature_flags(policy_mergability_check: false)
ee/spec/services/merge_requests/mergeability/check_security_policy_violations_service_spec.rb
39: stub_feature_flags(policy_mergability_check: false)
ee/spec/services/merge_requests/sync_report_approver_approval_rules_spec.rb
30: stub_feature_flags(policy_mergability_check: false)
ee/spec/services/security/security_orchestration_policies/update_violations_service_spec.rb
104: stub_feature_flags(policy_mergability_check: false)
180: stub_feature_flags(policy_mergability_check: false)
ee/spec/workers/security/scan_result_policies/unblock_pending_merge_request_violations_worker_spec.rb
138: context 'when feature flag "policy_mergability_check" is disabled' do
140: stub_feature_flags(policy_mergability_check: false)
ee/spec/workers/security/unenforceable_policy_rules_pipeline_notification_worker_spec.rb
72: context 'when feature flag "policy_mergability_check" is disabled' do
74: stub_feature_flags(policy_mergability_check: false)
CHANGELOG.md
2799:- [Enable policy_mergability_check by default](https://gitlab.com/gitlab-org/gitlab/-/commit/d0432951497cdd00c92f1a6cbc75fbf4166836a2) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/187117)) **GitLab Enterprise Edition**
doc-locale/ja-jp/api/merge_requests.md
915: - `security_policy_violations`:すべてのセキュリティポリシーを満たす必要があります。`policy_mergability_check`機能フラグを有効にする必要があります。
doc/api/merge_requests.md
926: Requires the `policy_mergability_check` feature flag to be enabled.
ee/app/models/ee/merge_request.rb
453: feature_enabled = ::Feature.enabled?(:policy_mergability_check, project)
ee/app/services/merge_requests/mergeability/check_security_policy_violations_service.rb
10: if ::Feature.disabled?(:policy_mergability_check,
ee/app/services/security/security_orchestration_policies/update_violations_service.rb
116: return unless ::Feature.enabled?(:policy_mergability_check, merge_request.project)
ee/app/workers/security/scan_result_policies/unblock_pending_merge_request_violations_worker.rb
17: return if ::Feature.disabled?(:policy_mergability_check, project)
ee/app/workers/security/unenforceable_policy_rules_pipeline_notification_worker.rb
32: if ::Feature.enabled?(:policy_mergability_check, project)
ee/config/feature_flags/beta/policy_mergability_check.yml
2:name: policy_mergability_check
ee/spec/graphql/ee/types/merge_request_type_spec.rb
367: stub_feature_flags(policy_mergability_check: true)
ee/spec/lib/ee/gitlab/data_builder/pipeline_spec.rb
200: stub_feature_flags(policy_mergability_check: true)
ee/spec/models/merge_request_spec.rb
2063: context 'with feature flag policy_mergability_check false' do
2065: stub_feature_flags(policy_mergability_check: false)
ee/spec/services/merge_requests/mergeability/check_security_policy_violations_service_spec.rb
37: context 'when policy_mergability_check is false' do
39: stub_feature_flags(policy_mergability_check: false)
ee/spec/services/merge_requests/sync_report_approver_approval_rules_spec.rb
28: context 'when the policy_mergability_check feature flag is false' do
30: stub_feature_flags(policy_mergability_check: false)
ee/spec/services/security/security_orchestration_policies/update_violations_service_spec.rb
102: context 'when policy_mergability_check is off' do
104: stub_feature_flags(policy_mergability_check: false)
178: context 'when policy_mergability_check is off' do
180: stub_feature_flags(policy_mergability_check: false)
ee/spec/workers/security/scan_result_policies/unblock_pending_merge_request_violations_worker_spec.rb
138: context 'when feature flag "policy_mergability_check" is disabled' do
140: stub_feature_flags(policy_mergability_check: false)
ee/spec/workers/security/unenforceable_policy_rules_pipeline_notification_worker_spec.rb
72: context 'when feature flag "policy_mergability_check" is disabled' do
74: stub_feature_flags(policy_mergability_check: false)
Currently the feature flag is enabled on production
It is possible that this MR will still need some changes to remove references to the feature flag in the code.
At the moment the gitlab-housekeeper is not always capable of removing all references so you must check the diff and pipeline failures to confirm if there are any issues.
It is the responsibility of groupcode review to push those changes to this branch.
Note: If you do not want to remove this feature flag at this time, you can add an intended_to_rollout_by_date attribute in the feature flag YAML file to prevent automated removal.
TODO for the reviewers before merging this MR
-
See the status of the rollout by checking #473704 (closed), https://gitlab.com/gitlab-com/gl-infra/feature-flag-log/-/issues/?search=policy_mergability_check&sort=created_date&state=all&label_name%5B%5D=host%3A%3Agitlab.com -
Verify the feature flag status via chatops by running /chatops run feature get policy_mergability_check. -
Search for references to PolicyMergabilityCheckin frontend part of code -
Search for references to policy_mergability_checkin code -
Check if we need to remove any Gem or other related code by looking at the changes in !159077 (merged)
This change was generated by
gitlab-housekeeper
locally using the Keeps::DeleteOldFeatureFlags keep.
To provide feedback on your experience with gitlab-housekeeper please create an issue with the
label GitLab Housekeeper and consider pinging the author of this keep.