diff options
-rw-r--r-- | GITALY_SERVER_VERSION | 2 | ||||
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 1 | ||||
-rw-r--r-- | app/models/project_group_link.rb | 1 | ||||
-rw-r--r-- | app/models/project_statistics.rb | 8 | ||||
-rw-r--r-- | app/views/notify/changed_reviewer_of_merge_request_email.html.haml | 2 | ||||
-rw-r--r-- | app/views/notify/changed_reviewer_of_merge_request_email.text.erb | 1 | ||||
-rw-r--r-- | app/views/profiles/preferences/show.html.haml | 3 | ||||
-rw-r--r-- | config/feature_flags/development/recent_objects_for_project_statistics.yml | 8 | ||||
-rw-r--r-- | locale/gitlab.pot | 3 | ||||
-rw-r--r-- | spec/factories/project_group_links.rb | 6 | ||||
-rw-r--r-- | spec/factories/projects.rb | 4 | ||||
-rw-r--r-- | spec/models/project_statistics_spec.rb | 26 |
12 files changed, 19 insertions, 46 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 8f6706289f0..a7c98ef1e75 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -b2a3b6ba03e6f2c2ad60582733fd27f050d8aa3f +5bdafbc7693c7dfacc1c0932cfa8d62004c7097b diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index 67a445c14ab..cd7869123f3 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -55,6 +55,7 @@ module Emails @previous_reviewers = [] @previous_reviewers = User.where(id: previous_reviewer_ids) if previous_reviewer_ids.any? + @updated_by_user = User.find(updated_by_user_id) mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, reason)) end diff --git a/app/models/project_group_link.rb b/app/models/project_group_link.rb index aee0afa875f..69d8c0db55b 100644 --- a/app/models/project_group_link.rb +++ b/app/models/project_group_link.rb @@ -3,6 +3,7 @@ class ProjectGroupLink < ApplicationRecord include Expirable include EachBatch + include AfterCommitQueue belongs_to :project belongs_to :group diff --git a/app/models/project_statistics.rb b/app/models/project_statistics.rb index 856b77b9da7..942f20f6e5e 100644 --- a/app/models/project_statistics.rb +++ b/app/models/project_statistics.rb @@ -67,13 +67,7 @@ class ProjectStatistics < ApplicationRecord end def update_repository_size - size = if Feature.enabled?(:recent_objects_for_project_statistics, project) - project.repository.recent_objects_size - else - project.repository.size - end - - self.repository_size = size.megabytes + self.repository_size = project.repository.recent_objects_size.megabytes end def update_wiki_size diff --git a/app/views/notify/changed_reviewer_of_merge_request_email.html.haml b/app/views/notify/changed_reviewer_of_merge_request_email.html.haml index ed7a3285f45..f080a5798f1 100644 --- a/app/views/notify/changed_reviewer_of_merge_request_email.html.haml +++ b/app/views/notify/changed_reviewer_of_merge_request_email.html.haml @@ -1,2 +1,4 @@ += render_if_exists 'notify/address_new_reviewer_with_diff_summary' + %p = change_reviewer_notification_text(@merge_request.reviewers, @previous_reviewers, :strong) diff --git a/app/views/notify/changed_reviewer_of_merge_request_email.text.erb b/app/views/notify/changed_reviewer_of_merge_request_email.text.erb index b6824966bb9..8db626548d7 100644 --- a/app/views/notify/changed_reviewer_of_merge_request_email.text.erb +++ b/app/views/notify/changed_reviewer_of_merge_request_email.text.erb @@ -1 +1,2 @@ +<%= render_if_exists 'notify/address_new_reviewer_with_diff_summary' -%> <%= change_reviewer_notification_text(@merge_request.reviewers, @previous_reviewers) %> diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 397ba7ae700..681d4e087f3 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -21,9 +21,6 @@ = s_('Preferences|Color theme') %p.gl-text-secondary = s_('Preferences|Customize the color of GitLab.') - - if show_super_sidebar? - %p - = s_('Preferences|Note: You have the new navigation enabled, so only Dark Mode theme significantly changes GitLab\'s appearance.') .application-theme.row - Gitlab::Themes.each do |theme| %label.col-6.col-sm-4.col-md-3.col-xl-2.gl-mb-5 diff --git a/config/feature_flags/development/recent_objects_for_project_statistics.yml b/config/feature_flags/development/recent_objects_for_project_statistics.yml deleted file mode 100644 index 1c66cc492b5..00000000000 --- a/config/feature_flags/development/recent_objects_for_project_statistics.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: recent_objects_for_project_statistics -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127867 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/420125 -milestone: '16.3' -type: development -group: group::utilization -default_enabled: false diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 16840d0f553..8a55b4dd231 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -35473,9 +35473,6 @@ msgstr "" msgid "Preferences|Must be a number between %{min} and %{max}" msgstr "" -msgid "Preferences|Note: You have the new navigation enabled, so only Dark Mode theme significantly changes GitLab's appearance." -msgstr "" - msgid "Preferences|Preview" msgstr "" diff --git a/spec/factories/project_group_links.rb b/spec/factories/project_group_links.rb index 84c590e3ea1..5edd57d5fe1 100644 --- a/spec/factories/project_group_links.rb +++ b/spec/factories/project_group_links.rb @@ -12,8 +12,10 @@ FactoryBot.define do trait(:developer) { group_access { Gitlab::Access::DEVELOPER } } trait(:maintainer) { group_access { Gitlab::Access::MAINTAINER } } - after(:create) do |project_group_link, evaluator| - AuthorizedProjectUpdate::ProjectRecalculateService.new(project_group_link.project).execute + after(:create) do |project_group_link| + project_group_link.run_after_commit_or_now do + AuthorizedProjectUpdate::ProjectRecalculateService.new(project_group_link.project).execute + end end end end diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index fdf60ca71f8..0111083298c 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -114,7 +114,9 @@ FactoryBot.define do end if project.group - AuthorizedProjectUpdate::ProjectRecalculateService.new(project).execute + project.run_after_commit_or_now do + AuthorizedProjectUpdate::ProjectRecalculateService.new(project).execute + end end # assign the delegated `#ci_cd_settings` attributes after create diff --git a/spec/models/project_statistics_spec.rb b/spec/models/project_statistics_spec.rb index 6ba2db25afe..dd7989244d4 100644 --- a/spec/models/project_statistics_spec.rb +++ b/spec/models/project_statistics_spec.rb @@ -308,30 +308,14 @@ RSpec.describe ProjectStatistics do end describe '#update_repository_size' do - context 'with recent_objects_for_project_statistics enabled' do - before do - stub_feature_flags(recent_objects_for_project_statistics: true) - allow(project.repository).to receive(:recent_objects_size).and_return(5) - - statistics.update_repository_size - end + before do + allow(project.repository).to receive(:recent_objects_size).and_return(5) - it 'stores the size of the repository' do - expect(statistics.repository_size).to eq 5.megabytes - end + statistics.update_repository_size end - context 'with use_recent_objects_for_project_statistics disabled' do - before do - stub_feature_flags(recent_objects_for_project_statistics: false) - allow(project.repository).to receive(:size).and_return(10) - - statistics.update_repository_size - end - - it 'stores the size of the repository' do - expect(statistics.repository_size).to eq 10.megabytes - end + it 'stores the size of the repository' do + expect(statistics.repository_size).to eq 5.megabytes end end |