From aa35d33a5940e81e5b813dada1339cb81b0dcaa0 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Thu, 23 Nov 2017 15:01:08 +0100 Subject: Remove git version from admin dashboard The version of the bundled git binary is not needed for Gitaly endpoints. Given more and more endpoints are OPT_OUT at this point the relevance of the data point decreases. Removal makes sure the Gitaly team doesn't have to migrate the endpoint too. Fixes #40489 --- app/views/admin/dashboard/index.html.haml | 4 ---- changelogs/unreleased/zj-remove-git-version.yml | 5 +++++ lib/gitlab/git.rb | 4 ---- lib/gitlab/usage_data.rb | 2 -- spec/lib/gitlab/usage_data_spec.rb | 3 --- 5 files changed, 5 insertions(+), 13 deletions(-) create mode 100644 changelogs/unreleased/zj-remove-git-version.yml diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 2f0143c7eff..d103868fab0 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -119,10 +119,6 @@ GitLab Pages %span.pull-right = Gitlab::Pages::VERSION - %p - Git - %span.pull-right - = Gitlab::Git.version %p Ruby %span.pull-right diff --git a/changelogs/unreleased/zj-remove-git-version.yml b/changelogs/unreleased/zj-remove-git-version.yml new file mode 100644 index 00000000000..bc818189570 --- /dev/null +++ b/changelogs/unreleased/zj-remove-git-version.yml @@ -0,0 +1,5 @@ +--- +title: Remove git version from admin dashboard +merge_request: +author: +type: removed diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb index 1f31cdbc96d..46544b5b4a2 100644 --- a/lib/gitlab/git.rb +++ b/lib/gitlab/git.rb @@ -54,10 +54,6 @@ module Gitlab ref == BLANK_SHA end - def version - Gitlab::VersionInfo.parse(Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --version)).first) - end - def check_namespace!(*objects) expected_namespace = self.name + '::' objects.each do |object| diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index 112d4939582..9ff5310ba19 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -21,7 +21,6 @@ module Gitlab usage_data = { uuid: current_application_settings.uuid, hostname: Gitlab.config.gitlab.host, - version: Gitlab::VERSION, active_user_count: User.active.count, recorded_at: Time.now, mattermost_enabled: Gitlab.config.mattermost.enabled, @@ -92,7 +91,6 @@ module Gitlab def components_usage_data { gitlab_pages: { enabled: Gitlab.config.pages.enabled, version: Gitlab::Pages::VERSION }, - git: { version: Gitlab::Git.version }, database: { adapter: Gitlab::Database.adapter_name, version: Gitlab::Database.version } } end diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index a4c1113ae37..42bbe17e6c9 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -34,7 +34,6 @@ describe Gitlab::UsageData do container_registry gitlab_pages gitlab_shared_runners - git database )) end @@ -119,7 +118,6 @@ describe Gitlab::UsageData do it 'gathers components usage data' do expect(subject[:gitlab_pages][:enabled]).to eq(Gitlab.config.pages.enabled) expect(subject[:gitlab_pages][:version]).to eq(Gitlab::Pages::VERSION) - expect(subject[:git][:version]).to eq(Gitlab::Git.version) expect(subject[:database][:adapter]).to eq(Gitlab::Database.adapter_name) expect(subject[:database][:version]).to eq(Gitlab::Database.version) end @@ -130,7 +128,6 @@ describe Gitlab::UsageData do it "gathers license data" do expect(subject[:uuid]).to eq(current_application_settings.uuid) - expect(subject[:version]).to eq(Gitlab::VERSION) expect(subject[:active_user_count]).to eq(User.active.count) expect(subject[:recorded_at]).to be_a(Time) end -- cgit v1.2.1