Commit f7092d82 authored by drew cimino's avatar drew cimino

Remnove simplified build group name feature flag

- Add Changelog entry
- Remove old docs
- Remove old implementation
- Remove feature flag defintion
parent 6ab0df04
......@@ -210,26 +210,7 @@ class CommitStatus < ApplicationRecord
end
def group_name
simplified_commit_status_group_name_feature_flag = Gitlab::SafeRequestStore.fetch("project:#{project_id}:simplified_commit_status_group_name") do
Feature.enabled?(:simplified_commit_status_group_name, project, default_enabled: false)
end
if simplified_commit_status_group_name_feature_flag
# Only remove one or more [...] "X/Y" "X Y" from the end of build names.
# More about the regular expression logic: https://docs.gitlab.com/ee/ci/jobs/#group-jobs-in-a-pipeline
name.to_s.sub(%r{([\b\s:]+((\[.*\])|(\d+[\s:\/\\]+\d+)))+\s*\z}, '').strip
else
# Prior implementation, remove [...] "X/Y" "X Y" from the beginning and middle of build names
# 'rspec:linux: 1/10' => 'rspec:linux'
common_name = name.to_s.gsub(%r{\b\d+[\s:\/\\]+\d+\s*}, '')
# 'rspec:linux: [aws, max memory]' => 'rspec:linux', 'rspec:linux: [aws]' => 'rspec:linux'
common_name.gsub!(%r{: \[.*\]\s*\z}, '')
common_name.strip!
common_name
end
name.to_s.sub(%r{([\b\s:]+((\[.*\])|(\d+[\s:\/\\]+\d+)))+\s*\z}, '').strip
end
def failed_but_allowed?
......
+---
+title: Simplify Build Group name correction
+merge_request:
+author:
+type: fixed
---
name: simplified_commit_status_group_name
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52644
rollout_issue_url:
milestone: '13.9'
type: development
group: group::testing
default_enabled: false
......@@ -137,24 +137,11 @@ The jobs are ordered by comparing the numbers from left to right. You
usually want the first number to be the index and the second number to be the total.
[This regular expression](https://gitlab.com/gitlab-org/gitlab/blob/2f3dc314f42dbd79813e6251792853bc231e69dd/app/models/commit_status.rb#L99)
evaluates the job names: `\d+[\s:\/\\]+\d+\s*`.
evaluates the job names: `([\b\s:]+((\[.*\])|(\d+[\s:\/\\]+\d+)))+\s*\z`.
### Improved job grouping
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52644) in GitLab 13.9.
> - It's [deployed behind a feature flag](../../user/feature_flags.md), disabled by default.
> - It's enabled on GitLab.com.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](../../administration/feature_flags.md). **(FREE SELF)**
Job grouping is evaluated with an improved regular expression to group jobs by name:
- `([\b\s:]+((\[.*\])|(\d+[\s:\/\\]+\d+)))+\s*\z`.
The new implementation removes one or more `: [...]`, `X Y`, `X/Y`, or `X\Y` sequences
from the **end** of job names only.
Matching substrings occurring at the beginning or in the middle of build names are
no longer removed.
It removes one or more `: [...]`, `X Y`, `X/Y`, or `X\Y` sequences
from the **end** of job names only. Matching substrings occurring
at the beginning or in the middle of build names are not removed.
## Specifying variables when running manual jobs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment