From 271360d2cf368ac527361f201a4f28e14ebdb700 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 4 May 2018 16:50:06 +0200 Subject: [PATCH 1/3] Try to match gitlab-ce's Gemfile.lock --- CHANGELOG.md | 2 ++ ruby/Gemfile | 17 +++++++--- ruby/Gemfile.lock | 75 +++++++++++++++++++++++++-------------------- ruby/compare-bundle | 29 ++++++++++++++++++ 4 files changed, 86 insertions(+), 37 deletions(-) create mode 100755 ruby/compare-bundle diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f573585682..5e1356c1fa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ UNRELEASED +- Try to match gitlab-ce's Gemfile.lock + https://gitlab.com/gitlab-org/gitaly/merge_requests/707 - GetBlobs: don't create blob reader if limit is zero https://gitlab.com/gitlab-org/gitaly/merge_requests/706 - Implement SearchFilesBy{Content,Name} diff --git a/ruby/Gemfile b/ruby/Gemfile index fd8e6b40225..9bdbbc1acda 100644 --- a/ruby/Gemfile +++ b/ruby/Gemfile @@ -4,13 +4,22 @@ gem 'rugged', '~> 0.27.0' gem 'github-linguist', '~> 5.3.3', require: 'linguist' gem 'gitlab-markup', '~> 1.6.2' gem 'gitaly-proto', '~> 0.99.0', require: 'gitaly' -gem 'activesupport', '~> 5.0.2' -gem 'rdoc', '~> 4.2' +gem 'activesupport', '~> 4.2.10' +gem 'rdoc', '~> 4.2.2' gem 'gitlab-gollum-lib', '~> 4.2', require: false gem 'gitlab-gollum-rugged_adapter', '~> 0.4.4', require: false -gem 'grpc', '~> 1.10.0' +gem 'grpc', '~> 1.11.0' gem 'sentry-raven', '~> 2.7.2', require: false +# random gem versions to match gitlab-ce +gem 'faraday', '~> 0.12.2' +gem 'json', '~> 1.8.6' +gem 'jwt', '~> 1.5.6' +gem 'rubocop', '~> 0.52.1' +gem 'rubocop-rspec', '~> 1.22.1' +gem 'rainbow', '~> 2.2.2' +gem 'minitest', '~> 5.7.0' + # Detects the open source license the repository includes # This version needs to be in sync with GitLab CE/EE gem 'licensee', '~> 8.9.0' @@ -19,6 +28,6 @@ gem 'licensee', '~> 8.9.0' gem 'google-protobuf', '= 3.5.1' group :development, :test do - gem 'gitlab-styles', '~> 2.0.0', require: false + gem 'gitlab-styles', '~> 2.3.2', require: false gem 'rspec', require: false end diff --git a/ruby/Gemfile.lock b/ruby/Gemfile.lock index fb63553221d..4e6f1bb20b5 100644 --- a/ruby/Gemfile.lock +++ b/ruby/Gemfile.lock @@ -1,19 +1,19 @@ GEM remote: https://rubygems.org/ specs: - activesupport (5.0.6) - concurrent-ruby (~> 1.0, >= 1.0.2) + activesupport (4.2.10) i18n (~> 0.7) minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) - ast (2.3.0) + ast (2.4.0) charlock_holmes (0.7.6) concurrent-ruby (1.0.5) diff-lcs (1.3) escape_utils (1.1.1) - faraday (0.14.0) + faraday (0.12.2) multipart-post (>= 1.2, < 3) gemojione (3.3.0) json @@ -26,12 +26,12 @@ GEM mime-types (>= 1.19) rugged (>= 0.25.1) github-markup (1.7.0) - gitlab-gollum-lib (4.2.7.1) + gitlab-gollum-lib (4.2.7.2) gemojione (~> 3.2) github-markup (~> 1.6) gollum-grit_adapter (~> 1.0) nokogiri (>= 1.6.1, < 2.0) - rouge (~> 2.1) + rouge (~> 3.1) sanitize (~> 2.1) stringex (~> 2.6) gitlab-gollum-rugged_adapter (0.4.4) @@ -43,10 +43,10 @@ GEM mime-types (>= 1.16) posix-spawn (~> 0.3) gitlab-markup (1.6.3) - gitlab-styles (2.0.0) - rubocop (~> 0.49) + gitlab-styles (2.3.2) + rubocop (~> 0.51) rubocop-gitlab-security (~> 0.1.0) - rubocop-rspec (~> 1.15) + rubocop-rspec (~> 1.19) gollum-grit_adapter (1.0.1) gitlab-grit (~> 2.7, >= 2.7.1) google-protobuf (3.5.1) @@ -60,13 +60,14 @@ GEM multi_json (~> 1.11) os (~> 0.9) signet (~> 0.7) - grpc (1.10.0) + grpc (1.11.0) google-protobuf (~> 3.1) googleapis-common-protos-types (~> 1.0.0) googleauth (>= 0.5.1, < 0.7) - i18n (0.8.1) - json (2.1.0) - jwt (2.1.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + json (1.8.6) + jwt (1.5.6) licensee (8.9.2) rugged (~> 0.24) little-plugger (1.1.4) @@ -78,23 +79,24 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_portile2 (2.3.0) - minitest (5.9.1) + minitest (5.7.0) multi_json (1.13.1) multipart-post (2.0.0) nokogiri (1.8.2) mini_portile2 (~> 2.3.0) os (0.9.6) - parallel (1.12.0) - parser (2.4.0.0) - ast (~> 2.2) + parallel (1.12.1) + parser (2.5.1.0) + ast (~> 2.4.0) posix-spawn (0.3.13) powerpack (0.1.1) public_suffix (3.0.2) rainbow (2.2.2) rake - rake (12.1.0) - rdoc (4.3.0) - rouge (2.2.1) + rake (12.3.1) + rdoc (4.2.2) + json (~> 1.4) + rouge (3.1.1) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -108,18 +110,18 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.6.0) rspec-support (3.6.0) - rubocop (0.50.0) + rubocop (0.52.1) parallel (~> 1.10) - parser (>= 2.3.3.1, < 3.0) + parser (>= 2.4.0.2, < 3.0) powerpack (~> 0.1) - rainbow (>= 2.2.2, < 3.0) + rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-gitlab-security (0.1.0) - rubocop (>= 0.47.1) - rubocop-rspec (1.17.0) - rubocop (>= 0.50.0) - ruby-progressbar (1.8.3) + rubocop-gitlab-security (0.1.1) + rubocop (>= 0.51) + rubocop-rspec (1.22.1) + rubocop (>= 0.52.1) + ruby-progressbar (1.9.0) rugged (0.27.0) sanitize (2.1.0) nokogiri (>= 1.4.4) @@ -132,7 +134,7 @@ GEM multi_json (~> 1.10) stringex (2.8.4) thread_safe (0.3.6) - tzinfo (1.2.2) + tzinfo (1.2.5) thread_safe (~> 0.1) unicode-display_width (1.3.0) @@ -140,18 +142,25 @@ PLATFORMS ruby DEPENDENCIES - activesupport (~> 5.0.2) + activesupport (~> 4.2.10) gitaly-proto (~> 0.99.0) + faraday (~> 0.12.2) github-linguist (~> 5.3.3) gitlab-gollum-lib (~> 4.2) gitlab-gollum-rugged_adapter (~> 0.4.4) gitlab-markup (~> 1.6.2) - gitlab-styles (~> 2.0.0) + gitlab-styles (~> 2.3.2) google-protobuf (= 3.5.1) - grpc (~> 1.10.0) + grpc (~> 1.11.0) + json (~> 1.8.6) + jwt (~> 1.5.6) licensee (~> 8.9.0) - rdoc (~> 4.2) + minitest (~> 5.7.0) + rainbow (~> 2.2.2) + rdoc (~> 4.2.2) rspec + rubocop (~> 0.52.1) + rubocop-rspec (~> 1.22.1) rugged (~> 0.27.0) sentry-raven (~> 2.7.2) diff --git a/ruby/compare-bundle b/ruby/compare-bundle new file mode 100755 index 00000000000..1a74a65eb36 --- /dev/null +++ b/ruby/compare-bundle @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby + +def main + gitaly_bundle = IO.popen(%w[bundle list], &:read).lines + abort 'bundle list failed' unless $?.success? + gitaly_bundle.shift + gitaly_hash = bundle_lines_to_hash(gitaly_bundle) + gitlab_bundle = File.read('/tmp/gitlab-bundle').lines + gitlab_bundle.shift + gitlab_hash = bundle_lines_to_hash(gitlab_bundle) + + puts(' ' * 25 + ' gitlab gitaly') + gitaly_hash.each do |k, v| + next if v == gitlab_hash[k] + + printf("%25s %10s %10s\n", k, gitlab_hash[k], v) + end +end + +def bundle_lines_to_hash(lines) + h = {} + lines.each do |l| + _, _, name, version = l.chomp.split(/\s+/, 4) + h[name] = version + end + h +end + +main \ No newline at end of file -- GitLab From ef1fda4cdb70ccf079676bf1d03a145f8c645a4f Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 4 May 2018 18:47:16 +0200 Subject: [PATCH 2/3] Move and quasi-document script --- {ruby => _support}/compare-bundle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename {ruby => _support}/compare-bundle (76%) diff --git a/ruby/compare-bundle b/_support/compare-bundle similarity index 76% rename from ruby/compare-bundle rename to _support/compare-bundle index 1a74a65eb36..85fc8fc4dc0 100755 --- a/ruby/compare-bundle +++ b/_support/compare-bundle @@ -1,7 +1,9 @@ #!/usr/bin/env ruby +# Usage: in gitlab-ce, run `bundle list > /tmp/gitlab-bundle`. Then run this script in the gitaly root. + def main - gitaly_bundle = IO.popen(%w[bundle list], &:read).lines + gitaly_bundle = Dir.chdir('ruby') { IO.popen(%w[bundle list], &:read).lines } abort 'bundle list failed' unless $?.success? gitaly_bundle.shift gitaly_hash = bundle_lines_to_hash(gitaly_bundle) -- GitLab From ada6253344496e57aecc01ac76060b5141a1b0a4 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 4 May 2018 18:47:45 +0200 Subject: [PATCH 3/3] whitespace --- _support/compare-bundle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_support/compare-bundle b/_support/compare-bundle index 85fc8fc4dc0..e71a795457f 100755 --- a/_support/compare-bundle +++ b/_support/compare-bundle @@ -28,4 +28,4 @@ def bundle_lines_to_hash(lines) h end -main \ No newline at end of file +main -- GitLab