Skip to content

Commit

Permalink
Revert "Merge pull request cloudfoundry#2478 from cloudfoundry/depend…
Browse files Browse the repository at this point in the history
…abot/bundler/fog-aws-3.12.0"

This reverts commit 5ee5e06, reversing
changes made to 719f170.

azure tests are currently failing, reverting this commit to unblock
releasing
  • Loading branch information
MerricdeLauney authored and sweinstein22 committed Feb 2, 2022
1 parent 536ab5b commit 197a975
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 62 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ gem 'bits_service_client', '~> 3.3', '>= 3.3.0'
gem 'fog-aliyun'
gem 'fog-aws'
gem 'fog-azure-rm', git: 'https://github.com/fog/fog-azure-rm.git', branch: 'fog-arm-cf'
gem 'fog-google', '~> 1.7.1'
gem 'fog-google'
gem 'fog-local'
gem 'fog-openstack'
gem 'fog-core', '~> 2.1.2'

gem 'cf-uaa-lib', '~> 4.0.1'
gem 'vcap-concurrency', git: 'https://github.com/cloudfoundry/vcap-concurrency.git', ref: '2a5b0179'
Expand Down
74 changes: 32 additions & 42 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ GIT

GIT
remote: https://github.com/fog/fog-azure-rm.git
revision: f21a4685d56db415b45728eeb2a688195909852b
revision: 79a738331538c6bdba806774cb11af8977979f8e
branch: fog-arm-cf
specs:
fog-azure-rm (0.4.7)
azure-storage-blob (~> 1.1)
azure-storage-common (~> 1.1)
azure-storage (>= 0.11.5.preview, < 1.0)
azure_mgmt_compute (~> 0.9.0)
azure_mgmt_dns (~> 0.9.0)
azure_mgmt_key_vault (~> 0.9.0)
Expand All @@ -21,8 +20,8 @@ GIT
azure_mgmt_sql (~> 0.9.0)
azure_mgmt_storage (~> 0.9.0)
azure_mgmt_traffic_manager (~> 0.9.0)
fog-core (>= 1.43)
fog-json (>= 1.0.2)
fog-core (~> 1.43)
fog-json (~> 1.0.2)
mime-types (~> 3.0)
vhd (= 0.0.4)

Expand Down Expand Up @@ -67,7 +66,7 @@ GEM
i18n
ast (2.4.2)
awesome_print (1.9.2)
azure-core (0.1.15)
azure-core (0.1.14)
faraday (~> 0.9)
faraday_middleware (~> 0.10)
nokogiri (~> 1.6)
Expand All @@ -76,13 +75,6 @@ GEM
faraday (~> 0.9)
faraday_middleware (~> 0.10)
nokogiri (~> 1.6, >= 1.6.8)
azure-storage-blob (1.1.0)
azure-core (~> 0.1.13)
azure-storage-common (~> 1.0)
nokogiri (~> 1.6, >= 1.6.8)
azure-storage-common (1.1.0)
azure-core (~> 0.1.13)
nokogiri (~> 1.6, >= 1.6.8)
azure_mgmt_compute (0.9.0)
ms_rest_azure (~> 0.7.0)
azure_mgmt_dns (0.9.0)
Expand All @@ -102,7 +94,7 @@ GEM
backport (1.2.0)
beefcake (1.0.0)
benchmark (0.2.0)
bit-struct (0.17)
bit-struct (0.16)
bits_service_client (3.4.0)
activesupport
statsd-ruby (~> 1.4.0)
Expand Down Expand Up @@ -131,7 +123,8 @@ GEM
debase (0.2.5.beta2)
debase-ruby_core_source (>= 0.10.12)
debase-ruby_core_source (0.10.12)
declarative (0.0.20)
declarative (0.0.10)
declarative-option (0.1.0)
delayed_job (4.1.9)
activesupport (>= 3.0, < 6.2)
diff-lcs (1.5.0)
Expand All @@ -150,12 +143,12 @@ GEM
erubi (1.10.0)
eventmachine (1.2.7)
excon (0.90.0)
faraday (0.17.4)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.14.0)
faraday_middleware (0.12.2)
faraday (>= 0.7.4, < 1.0)
ffi (1.15.5)
ffi-compiler (1.0.1)
Expand All @@ -169,31 +162,30 @@ GEM
fog-json
ipaddress (~> 0.8)
xml-simple (~> 1.1)
fog-aws (3.12.0)
fog-core (~> 2.1)
fog-json (~> 1.1)
fog-aws (2.0.1)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (2.1.2)
fog-core (1.45.0)
builder
excon (~> 0.58)
formatador (~> 0.2)
mime-types
fog-google (1.7.1)
fog-core
fog-json
fog-xml
google-api-client (~> 0.23.0)
fog-json (1.2.0)
fog-core
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.8.0)
fog-core (>= 1.27, < 3.0)
fog-openstack (1.0.11)
fog-core (~> 2.1)
fog-openstack (0.3.10)
fog-core (>= 1.45, <= 2.1.0)
fog-json (>= 1.0)
ipaddress (>= 0.8)
fog-xml (0.1.4)
fog-xml (0.1.3)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
formatador (0.3.0)
Expand Down Expand Up @@ -257,7 +249,7 @@ GEM
json_pure (2.6.1)
jsonpath (1.1.0)
multi_json
jwt (2.3.0)
jwt (2.2.1)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
Expand All @@ -281,12 +273,12 @@ GEM
nokogiri (>= 1.5.9)
machinist (1.0.6)
membrane (1.1.0)
memoist (0.16.2)
memoist (0.16.0)
method_source (1.0.0)
middleware (0.1.0)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mime-types-data (3.2021.1115)
mini_portile2 (2.7.1)
minitest (5.15.0)
ms_rest (0.6.4)
Expand Down Expand Up @@ -318,7 +310,7 @@ GEM
nokogiri (1.13.1-x86_64-linux)
racc (~> 1.4)
oj (3.13.11)
os (1.1.4)
os (1.0.1)
palm_civet (1.1.0)
parallel (1.21.0)
parallel_tests (3.7.3)
Expand Down Expand Up @@ -363,9 +355,9 @@ GEM
ffi (~> 1.0)
recursive-open-struct (1.1.3)
regexp_parser (2.2.0)
representable (3.1.1)
representable (3.0.4)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
Expand Down Expand Up @@ -437,9 +429,9 @@ GEM
pg (>= 0.18.0, != 1.2.0)
sequel (>= 4.38.0)
sexp_processor (4.7.0)
signet (0.16.0)
addressable (~> 2.8)
faraday (>= 0.17.3, < 2.0)
signet (0.11.0)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simplecov (0.13.0)
Expand Down Expand Up @@ -492,8 +484,7 @@ GEM
thread_safe (0.3.6)
tilt (2.0.10)
timecop (0.9.4)
timeliness (0.4.4)
trailblazer-option (0.1.2)
timeliness (0.3.10)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uber (0.1.0)
Expand Down Expand Up @@ -544,8 +535,7 @@ DEPENDENCIES
fog-aliyun
fog-aws
fog-azure-rm!
fog-core (~> 2.1.2)
fog-google (~> 1.7.1)
fog-google
fog-local
fog-openstack
googleapis-common-protos (>= 1.3.12)
Expand Down
4 changes: 2 additions & 2 deletions lib/cloud_controller/blobstore/fog/fog_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def blob(key)
end

def files_for(prefix, _ignored_directory_prefixes=[])
if connection.is_a? Fog::Local::Storage::Real
if connection.is_a? Fog::Storage::Local::Real
directory = connection.directories.get(File.join(dir.key, prefix || ''))
directory ? directory.files : []
else
Expand All @@ -126,7 +126,7 @@ def ensure_bucket_exists
return if local?

options = { max_keys: 1 }
options['limit'] = 1 if connection.service == Fog::OpenStack::Storage
options['limit'] = 1 if connection.service == Fog::Storage::OpenStack
connection.directories.get(@directory_key, options) || connection.directories.create(key: @directory_key, public: false)
end

Expand Down
13 changes: 0 additions & 13 deletions lib/cloud_controller/blobstore/fog/providers.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
require 'fog/core'

# This can be removed once fog-google fixes
# https://github.com/fog/fog-google/issues/421, which will allow us to upgrade
# fog-core to 2.2.4.
original = Fog::Logger[:deprecation]
Fog::Logger[:deprecation] = nil

require 'fog/aliyun'
# Hack until https://github.com/fog/fog-aliyun/pull/155 is merged and released
Fog::Aliyun::Compute = Fog::Compute::Aliyun

require 'fog/aws'
require 'fog/local'
require 'fog/google'
require 'fog/azurerm'
require 'fog/openstack'

Fog::Logger[:deprecation] = original
Original file line number Diff line number Diff line change
Expand Up @@ -729,21 +729,21 @@ def upload_tmpfile(client, key='abcdef')
end

it 'gets the bucket' do
expect_any_instance_of(Fog::AWS::Storage::Directories).to receive(:get).with(directory_key, max_keys: 1)
expect_any_instance_of(Fog::Storage::AWS::Directories).to receive(:get).with(directory_key, max_keys: 1)
subject.ensure_bucket_exists
end

context 'the bucket exists' do
it 'does not create the bucket' do
subject.ensure_bucket_exists
expect_any_instance_of(Fog::AWS::Storage::Directories).not_to receive(:create).with(key: directory_key, public: false)
expect_any_instance_of(Fog::Storage::AWS::Directories).not_to receive(:create).with(key: directory_key, public: false)
subject.ensure_bucket_exists
end
end

context 'the bucket does not exist' do
it 'creates the bucket' do
expect_any_instance_of(Fog::AWS::Storage::Directories).to receive(:create).with(key: directory_key, public: false)
expect_any_instance_of(Fog::Storage::AWS::Directories).to receive(:create).with(key: directory_key, public: false)
subject.ensure_bucket_exists
end
end
Expand Down

0 comments on commit 197a975

Please sign in to comment.