From b221a58d23caf99293a61ca7f2987eaa247f23a5 Mon Sep 17 00:00:00 2001
From: Stan Hu <stanhu@gmail.com>
Date: Sat, 16 Oct 2021 00:37:04 -0400
Subject: [PATCH] Ensure Azure-related gems are loaded

We attempted to load the gitlab-fog-azure-rm only if it was really
needed for object storage, but there are a number of cases where we
don't dynamically load these gems when we need them. To avoid the
complexity of this dynamic allocation, we now require the gem, just as
we do with other object storage providers. Unfortunately this adds 5 MB
to the RAM usage of the process according to derailed_benchmarks, but
this fairly typical for a gem for object storage.

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/334853

Changelog: fixed
---
 Gemfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Gemfile b/Gemfile
index 1e6648df48bfe..2bccadf083830 100644
--- a/Gemfile
+++ b/Gemfile
@@ -129,7 +129,7 @@ gem 'fog-local', '~> 0.6'
 gem 'fog-openstack', '~> 1.0'
 gem 'fog-rackspace', '~> 0.1.1'
 gem 'fog-aliyun', '~> 0.3'
-gem 'gitlab-fog-azure-rm', '~> 1.2.0', require: false
+gem 'gitlab-fog-azure-rm', '~> 1.2.0', require: 'fog/azurerm'
 
 # for Google storage
 gem 'google-api-client', '~> 0.33'
-- 
GitLab