diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-11-23 15:01:08 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-11-23 15:23:07 +0100 |
commit | aa35d33a5940e81e5b813dada1339cb81b0dcaa0 (patch) | |
tree | 07f473d19acf61c08edb36cd3fab84ef00a4cdae | |
parent | 1d8ab59ebfa0d57e4015665c470c8339cd258a2c (diff) | |
download | gitlab-ce-zj-remove-git-version.tar.gz |
Remove git version from admin dashboardzj-remove-git-version
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
-rw-r--r-- | app/views/admin/dashboard/index.html.haml | 4 | ||||
-rw-r--r-- | changelogs/unreleased/zj-remove-git-version.yml | 5 | ||||
-rw-r--r-- | lib/gitlab/git.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/usage_data.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/usage_data_spec.rb | 3 |
5 files changed, 5 insertions, 13 deletions
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 @@ -120,10 +120,6 @@ %span.pull-right = Gitlab::Pages::VERSION %p - Git - %span.pull-right - = Gitlab::Git.version - %p Ruby %span.pull-right #{RUBY_VERSION}p#{RUBY_PATCHLEVEL} 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 |