[arvados] created: 2.7.0-6201-g7a2175baf2
git repository hosting
git at public.arvados.org
Fri Mar 15 16:35:34 UTC 2024
at 7a2175baf2eda32cf53e03fbdf3e0f1f2abb8fc8 (commit)
commit 7a2175baf2eda32cf53e03fbdf3e0f1f2abb8fc8
Author: Brett Smith <brett.smith at curii.com>
Date: Thu Mar 14 11:17:24 2024 -0400
21583: Override base64 dependency so it doesn't appear in Gemfile.lock
See comments and linked bug for rationale.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>
diff --git a/services/api/Gemfile b/services/api/Gemfile
index 9cc5f1b7bc..1bd3d337bd 100644
--- a/services/api/Gemfile
+++ b/services/api/Gemfile
@@ -58,6 +58,26 @@ gem 'webrick'
gem 'mini_portile2', '~> 2.8', '>= 2.8.1'
+plugin 'bundler-override'
+if bundler_override_paths = Bundler::Plugin.index.load_paths("bundler-override")
+ require File.join(bundler_override_paths[0], "bundler-override")
+ # Ruby 3.4 drops base64 as a default gem. Because of this, various other gems
+ # are starting to declare base64 as a dependency. However, locking one
+ # specific version of base64 makes it more difficult to support older Rubies
+ # that still have it as a default. See <https://dev.arvados.org/issues/21583>.
+ # Because we are focused on supporting distros with those older Rubies, we
+ # drop base64 dependencies here. These overrides can go away once we shift to
+ # supporting Ruby 3.4+.
+ override 'faraday', drop: ['base64']
+else
+ # This is the first invocation of Bundler, so the plugin hasn't been installed
+ # yet. That's fine as long as this command is not updating Gemfile.lock
+ # (i.e., it's `bundle install` not `bundle update`), which is the normal
+ # workflow. Failing here would break all our existing test and build workflow;
+ # just warning about it seems sufficient.
+ Warning.warn("bundler-override plugin not available - any changes to Gemfile.lock may be inaccurate\n")
+end
+
# Install any plugin gems
Dir.glob(File.join(File.dirname(__FILE__), 'lib', '**', "Gemfile")) do |f|
eval(IO.read(f), binding)
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index 003b886cee..4adb27dff5 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -104,7 +104,6 @@ GEM
addressable (>= 2.3.1)
extlib (>= 0.9.15)
multi_json (>= 1.0.0)
- base64 (0.2.0)
builder (3.2.4)
byebug (11.1.3)
concurrent-ruby (1.2.3)
@@ -119,7 +118,6 @@ GEM
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
faraday (2.8.1)
- base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-gzip (2.0.1)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list