From 7df2992527e7c3993ff3b337f62a5de14bc7d780 Mon Sep 17 00:00:00 2001 From: sreepuramsudheer Date: Mon, 26 Feb 2024 17:53:14 +0530 Subject: [PATCH] Fixing errors. Added step to install bundler 2.2.4. Remove v8 and rubyracer There doesn't seem to be any use of that library in OC-ID or its tests, so let's see how it behaves without it. Changes in oc-chef-pedent rake file to fix verify pipeline issue. Signed-off-by: Marc A. Paradise Signed-off-by: sreepuramsudheer Signed-off-by: jan shahid shaik --- .expeditor/license_scout.sh | 2 +- .expeditor/verify.pipeline.yml | 3 ++- oc-chef-pedant/Rakefile | 6 ++++++ scripts/bk_tests/bk_install.sh | 2 +- scripts/bk_tests/chef_zero-Gemfile | 1 + src/oc-id/Gemfile | 1 - src/oc-id/Gemfile.lock | 7 ------- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.expeditor/license_scout.sh b/.expeditor/license_scout.sh index 809b5bd06b5..08b2b1df09e 100755 --- a/.expeditor/license_scout.sh +++ b/.expeditor/license_scout.sh @@ -25,7 +25,7 @@ if [[ "${BUILDKITE:-false}" == "true" ]]; then apt-get clean apt-get autoremove apt-get update - apt-get install -y libpq-dev libsqlite3-dev + apt-get install -y libpq-dev libsqlite3-dev libyaml-dev fi bundle_install_dirs=( diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 4ba0b004d54..c3a38bddd4d 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -156,7 +156,8 @@ steps: - label: With ChefFS=1 command: - /workdir/scripts/bk_tests/bk_install.sh - - gem uninstall bundler -v '>= 2.0.1' -a + - gem install bundler -v 2.2.4 + - gem uninstall bundler -v '> 2.2.4' -a - cp scripts/bk_tests/chef_zero-Gemfile oc-chef-pedant/Gemfile - bundle install --jobs=3 --retry=3 --path=/workdir/vendor/bundle - cd /workdir/oc-chef-pedant diff --git a/oc-chef-pedant/Rakefile b/oc-chef-pedant/Rakefile index 8f0efe5ad0b..cb98c03c256 100644 --- a/oc-chef-pedant/Rakefile +++ b/oc-chef-pedant/Rakefile @@ -24,6 +24,12 @@ def bundle_exec_with_chef(test_gem, commands) next elsif line =~ /^\s*dev_gem\s*['"](.+)['"]\s*$/ line = "gem '#{$1}', github: 'poise/#{$1}'" + # TODO: one of workaround to fix verify pipeline failure + # Could not found another way to update chef version without releasing new chef-zero gem + elsif line =~ /^\s*gem\s*['"]chef['"]\s*,?.*$/ # foodcritic end + line = "gem \"chef\", \"17.10.0\"" + elsif line =~ /^\s*gem\s*['"]ohai['"]\s*,?.*$/ # foodcritic end + line = "gem \"ohai\", \"~> 17.0\"" elsif line =~ /\s*gem\s*['"]#{test_gem}['"]/ # foodcritic end next end diff --git a/scripts/bk_tests/bk_install.sh b/scripts/bk_tests/bk_install.sh index aef898bc1c2..1910b9734fc 100755 --- a/scripts/bk_tests/bk_install.sh +++ b/scripts/bk_tests/bk_install.sh @@ -10,7 +10,7 @@ set -e # 1. Add `deb https://apt-archive.postgresql.org/pub/repos/apt bionic-pgdg main` to sources.list # 2. Remove /etc/apt/sources.list.d/pgdg.list sudo echo "deb https://apt.postgresql.org/pub/repos/apt/ focal-pgdg main 13">>/etc/apt/sources.list -rm /etc/apt/sources.list.d/pgdg.list +rm -f /etc/apt/sources.list.d/pgdg.list echo "Removing postgresql-9.3" apt-get --purge remove -y postgresql-9.3 diff --git a/scripts/bk_tests/chef_zero-Gemfile b/scripts/bk_tests/chef_zero-Gemfile index 0417da821c1..3ca055afec4 100644 --- a/scripts/bk_tests/chef_zero-Gemfile +++ b/scripts/bk_tests/chef_zero-Gemfile @@ -7,6 +7,7 @@ gem 'pry-byebug' gem 'pry-stack_explorer' gem 'rake' +gem 'chef', "17.10.0" # For "rake chef_zero_spec" gem 'chef-zero', github: 'chef/chef-zero', tag: 'v15.0.11' diff --git a/src/oc-id/Gemfile b/src/oc-id/Gemfile index a939ea6507e..f3e169444be 100644 --- a/src/oc-id/Gemfile +++ b/src/oc-id/Gemfile @@ -19,7 +19,6 @@ gem 'mixlib-authentication', '>= 2.1', '< 4' gem 'responders', '~> 3.0', '>= 3.0.1' gem 'doorkeeper', '~> 5.0' gem "sprockets-rails", ">= 3.4.2" -gem 'therubyracer', '~> 0.12.3' gem 'bigdecimal', '3.1.3' gem 'veil', '~> 0.3.11' diff --git a/src/oc-id/Gemfile.lock b/src/oc-id/Gemfile.lock index 4f44fe15365..2137264babd 100644 --- a/src/oc-id/Gemfile.lock +++ b/src/oc-id/Gemfile.lock @@ -282,7 +282,6 @@ GEM json (2.6.3) jwt (2.7.0) kgio (2.11.4) - libv8 (3.16.14.19) libyajl2 (2.1.0) license-acceptance (2.1.13) pastel (~> 0.7) @@ -315,7 +314,6 @@ GEM matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.5) - mini_portile2 (2.8.4) minitest (5.18.0) mixlib-archive (1.1.7) mixlib-log @@ -427,7 +425,6 @@ GEM rb-readline (0.5.5) rdoc (6.5.0) psych (>= 4.0.0) - ref (2.0.0) regexp_parser (2.8.1) responders (3.1.0) actionpack (>= 5.2) @@ -507,9 +504,6 @@ GEM strings-ansi (0.2.0) syslog-logger (1.6.8) temple (0.10.0) - therubyracer (0.12.3) - libv8 (~> 3.16.14.15) - ref thin (1.8.2) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) @@ -633,7 +627,6 @@ DEPENDENCIES spring spring-commands-rspec sprockets-rails (>= 3.4.2) - therubyracer (~> 0.12.3) thor (~> 1.2) timecop turbolinks (~> 5)