Skip to content

Commit b750f23

Browse files
authored
Merge pull request #2690 from cloudfoundry/azure-bump-rebase
Azure bump rebase
2 parents 846ff16 + d9d5949 commit b750f23

File tree

5 files changed

+113
-60
lines changed

5 files changed

+113
-60
lines changed

Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,17 @@ gem 'activemodel', '~> 6.1.4'
5353
gem 'railties', '~> 6.1.4'
5454

5555
# Blobstore and Bits Service Dependencies
56-
gem 'azure-storage', '0.14.0.preview' # https://github.com/Azure/azure-storage-ruby/issues/122
5756
gem 'bits_service_client', '~> 3.3', '>= 3.3.0'
57+
58+
gem 'azure-storage-blob', git: 'https://github.com/sethboyles/azure-storage-ruby.git', branch: 'x-ms-blob-content-type-fix-1.1'
59+
5860
gem 'fog-aliyun'
5961
gem 'fog-aws'
6062
gem 'fog-azure-rm', git: 'https://github.com/fog/fog-azure-rm.git', branch: 'fog-arm-cf'
61-
gem 'fog-google'
63+
gem 'fog-google', '~> 1.18.0'
6264
gem 'fog-local'
6365
gem 'fog-openstack'
66+
gem 'fog-core', '~> 2.1.2'
6467

6568
gem 'cf-uaa-lib', '~> 4.0.1'
6669
gem 'vcap-concurrency', git: 'https://github.com/cloudfoundry/vcap-concurrency.git', ref: '2a5b0179'

Gemfile.lock

Lines changed: 90 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ GIT
77

88
GIT
99
remote: https://github.com/fog/fog-azure-rm.git
10-
revision: 79a738331538c6bdba806774cb11af8977979f8e
10+
revision: 69ba1d7e9f82b7a71214b92fa6fa95169b539ed3
1111
branch: fog-arm-cf
1212
specs:
1313
fog-azure-rm (0.4.7)
14-
azure-storage (>= 0.11.5.preview, < 1.0)
14+
azure-storage-blob (~> 1.1)
15+
azure-storage-common (~> 1.1)
1516
azure_mgmt_compute (~> 0.9.0)
1617
azure_mgmt_dns (~> 0.9.0)
1718
azure_mgmt_key_vault (~> 0.9.0)
@@ -20,11 +21,24 @@ GIT
2021
azure_mgmt_sql (~> 0.9.0)
2122
azure_mgmt_storage (~> 0.9.0)
2223
azure_mgmt_traffic_manager (~> 0.9.0)
23-
fog-core (~> 1.43)
24-
fog-json (~> 1.0.2)
24+
fog-core (>= 1.43)
25+
fog-json (>= 1.0.2)
2526
mime-types (~> 3.0)
2627
vhd (= 0.0.4)
2728

29+
GIT
30+
remote: https://github.com/sethboyles/azure-storage-ruby.git
31+
revision: d4737cdfcef3f3c4c2463a54690b6b73c0f6f707
32+
branch: x-ms-blob-content-type-fix-1.1
33+
specs:
34+
azure-storage-blob (1.1.0)
35+
azure-core (~> 0.1.13)
36+
azure-storage-common (~> 1.0)
37+
nokogiri (~> 1.6, >= 1.6.8)
38+
azure-storage-common (1.1.0)
39+
azure-core (~> 0.1.13)
40+
nokogiri (~> 1.6, >= 1.6.8)
41+
2842
GIT
2943
remote: https://github.com/sporkrb/spork
3044
revision: 224df492657e617a0c93c0319e78f0eefee5b636
@@ -66,15 +80,10 @@ GEM
6680
i18n
6781
ast (2.4.2)
6882
awesome_print (1.9.2)
69-
azure-core (0.1.14)
83+
azure-core (0.1.15)
7084
faraday (~> 0.9)
7185
faraday_middleware (~> 0.10)
7286
nokogiri (~> 1.6)
73-
azure-storage (0.14.0.preview)
74-
azure-core (~> 0.1)
75-
faraday (~> 0.9)
76-
faraday_middleware (~> 0.10)
77-
nokogiri (~> 1.6, >= 1.6.8)
7887
azure_mgmt_compute (0.9.0)
7988
ms_rest_azure (~> 0.7.0)
8089
azure_mgmt_dns (0.9.0)
@@ -94,7 +103,7 @@ GEM
94103
backport (1.2.0)
95104
beefcake (1.0.0)
96105
benchmark (0.2.0)
97-
bit-struct (0.16)
106+
bit-struct (0.17)
98107
bits_service_client (3.4.0)
99108
activesupport
100109
statsd-ruby (~> 1.4.0)
@@ -123,8 +132,7 @@ GEM
123132
debase (0.2.5.beta2)
124133
debase-ruby_core_source (>= 0.10.12)
125134
debase-ruby_core_source (0.10.12)
126-
declarative (0.0.10)
127-
declarative-option (0.1.0)
135+
declarative (0.0.20)
128136
delayed_job (4.1.9)
129137
activesupport (>= 3.0, < 6.2)
130138
diff-lcs (1.5.0)
@@ -142,13 +150,13 @@ GEM
142150
eventmachine (>= 1.0.0.beta.4)
143151
erubi (1.10.0)
144152
eventmachine (1.2.7)
145-
excon (0.90.0)
146-
faraday (0.15.4)
153+
excon (0.91.0)
154+
faraday (0.17.4)
147155
multipart-post (>= 1.2, < 3)
148-
faraday-cookie_jar (0.0.6)
149-
faraday (>= 0.7.4)
156+
faraday-cookie_jar (0.0.7)
157+
faraday (>= 0.8.0)
150158
http-cookie (~> 1.0.0)
151-
faraday_middleware (0.12.2)
159+
faraday_middleware (0.14.0)
152160
faraday (>= 0.7.4, < 1.0)
153161
ffi (1.15.5)
154162
ffi-compiler (1.0.1)
@@ -162,41 +170,66 @@ GEM
162170
fog-json
163171
ipaddress (~> 0.8)
164172
xml-simple (~> 1.1)
165-
fog-aws (2.0.1)
166-
fog-core (~> 1.38)
167-
fog-json (~> 1.0)
173+
fog-aws (3.12.0)
174+
fog-core (~> 2.1)
175+
fog-json (~> 1.1)
168176
fog-xml (~> 0.1)
169177
ipaddress (~> 0.8)
170-
fog-core (1.45.0)
178+
fog-core (2.1.2)
171179
builder
172180
excon (~> 0.58)
173181
formatador (~> 0.2)
174-
fog-google (1.7.1)
182+
mime-types
183+
fog-google (1.18.0)
184+
fog-core (< 2.3)
185+
fog-json (~> 1.2)
186+
fog-xml (~> 0.1.0)
187+
google-apis-compute_v1 (~> 0.14)
188+
google-apis-dns_v1 (~> 0.12)
189+
google-apis-iamcredentials_v1 (~> 0.6)
190+
google-apis-monitoring_v3 (~> 0.12)
191+
google-apis-pubsub_v1 (~> 0.7)
192+
google-apis-sqladmin_v1beta4 (~> 0.13)
193+
google-apis-storage_v1 (~> 0.6)
194+
google-cloud-env (~> 1.2)
195+
fog-json (1.2.0)
175196
fog-core
176-
fog-json
177-
fog-xml
178-
google-api-client (~> 0.23.0)
179-
fog-json (1.0.2)
180-
fog-core (~> 1.0)
181197
multi_json (~> 1.10)
182198
fog-local (0.8.0)
183199
fog-core (>= 1.27, < 3.0)
184-
fog-openstack (0.3.10)
185-
fog-core (>= 1.45, <= 2.1.0)
200+
fog-openstack (1.0.11)
201+
fog-core (~> 2.1)
186202
fog-json (>= 1.0)
187203
ipaddress (>= 0.8)
188-
fog-xml (0.1.3)
204+
fog-xml (0.1.4)
189205
fog-core
190206
nokogiri (>= 1.5.11, < 2.0.0)
191207
formatador (0.3.0)
192-
google-api-client (0.23.9)
208+
google-apis-compute_v1 (0.25.0)
209+
google-apis-core (>= 0.4, < 2.a)
210+
google-apis-core (0.4.2)
193211
addressable (~> 2.5, >= 2.5.1)
194-
googleauth (>= 0.5, < 0.7.0)
195-
httpclient (>= 2.8.1, < 3.0)
196-
mime-types (~> 3.0)
212+
googleauth (>= 0.16.2, < 2.a)
213+
httpclient (>= 2.8.1, < 3.a)
214+
mini_mime (~> 1.0)
197215
representable (~> 3.0)
198-
retriable (>= 2.0, < 4.0)
199-
signet (~> 0.9)
216+
retriable (>= 2.0, < 4.a)
217+
rexml
218+
webrick
219+
google-apis-dns_v1 (0.19.0)
220+
google-apis-core (>= 0.4, < 2.a)
221+
google-apis-iamcredentials_v1 (0.10.0)
222+
google-apis-core (>= 0.4, < 2.a)
223+
google-apis-monitoring_v3 (0.21.0)
224+
google-apis-core (>= 0.4, < 2.a)
225+
google-apis-pubsub_v1 (0.12.0)
226+
google-apis-core (>= 0.4, < 2.a)
227+
google-apis-sqladmin_v1beta4 (0.24.0)
228+
google-apis-core (>= 0.4, < 2.a)
229+
google-apis-storage_v1 (0.11.0)
230+
google-apis-core (>= 0.4, < 2.a)
231+
google-cloud-env (1.5.0)
232+
faraday (>= 0.17.3, < 2.0)
200233
google-protobuf (3.19.2)
201234
google-protobuf (3.19.2-x86_64-darwin)
202235
google-protobuf (3.19.2-x86_64-linux)
@@ -206,13 +239,13 @@ GEM
206239
grpc (~> 1.27)
207240
googleapis-common-protos-types (1.3.0)
208241
google-protobuf (~> 3.14)
209-
googleauth (0.6.7)
210-
faraday (~> 0.12)
242+
googleauth (1.1.1)
243+
faraday (>= 0.17.3, < 2.0)
211244
jwt (>= 1.4, < 3.0)
212245
memoist (~> 0.16)
213246
multi_json (~> 1.11)
214247
os (>= 0.9, < 2.0)
215-
signet (~> 0.7)
248+
signet (>= 0.16, < 2.a)
216249
grpc (1.42.0)
217250
google-protobuf (~> 3.18)
218251
googleapis-common-protos-types (~> 1.0)
@@ -249,7 +282,7 @@ GEM
249282
json_pure (2.6.1)
250283
jsonpath (1.1.0)
251284
multi_json
252-
jwt (2.2.1)
285+
jwt (2.3.0)
253286
kramdown (2.3.1)
254287
rexml
255288
kramdown-parser-gfm (1.1.0)
@@ -273,12 +306,13 @@ GEM
273306
nokogiri (>= 1.5.9)
274307
machinist (1.0.6)
275308
membrane (1.1.0)
276-
memoist (0.16.0)
309+
memoist (0.16.2)
277310
method_source (1.0.0)
278311
middleware (0.1.0)
279312
mime-types (3.4.1)
280313
mime-types-data (~> 3.2015)
281-
mime-types-data (3.2021.1115)
314+
mime-types-data (3.2022.0105)
315+
mini_mime (1.1.2)
282316
mini_portile2 (2.8.0)
283317
minitest (5.15.0)
284318
ms_rest (0.6.4)
@@ -310,7 +344,7 @@ GEM
310344
nokogiri (1.13.3-x86_64-linux)
311345
racc (~> 1.4)
312346
oj (3.13.11)
313-
os (1.0.1)
347+
os (1.1.4)
314348
palm_civet (1.1.0)
315349
parallel (1.21.0)
316350
parallel_tests (3.7.3)
@@ -355,9 +389,9 @@ GEM
355389
ffi (~> 1.0)
356390
recursive-open-struct (1.1.3)
357391
regexp_parser (2.2.0)
358-
representable (3.0.4)
392+
representable (3.1.1)
359393
declarative (< 0.1.0)
360-
declarative-option (< 0.2.0)
394+
trailblazer-option (>= 0.1.1, < 0.2.0)
361395
uber (< 0.2.0)
362396
rest-client (2.1.0)
363397
http-accept (>= 1.7.0, < 2.0)
@@ -429,9 +463,9 @@ GEM
429463
pg (>= 0.18.0, != 1.2.0)
430464
sequel (>= 4.38.0)
431465
sexp_processor (4.7.0)
432-
signet (0.11.0)
433-
addressable (~> 2.3)
434-
faraday (~> 0.9)
466+
signet (0.16.0)
467+
addressable (~> 2.8)
468+
faraday (>= 0.17.3, < 2.0)
435469
jwt (>= 1.5, < 3.0)
436470
multi_json (~> 1.10)
437471
simplecov (0.13.0)
@@ -484,7 +518,8 @@ GEM
484518
thread_safe (0.3.6)
485519
tilt (2.0.10)
486520
timecop (0.9.4)
487-
timeliness (0.3.10)
521+
timeliness (0.4.4)
522+
trailblazer-option (0.1.2)
488523
tzinfo (2.0.4)
489524
concurrent-ruby (~> 1.0)
490525
uber (0.1.0)
@@ -500,7 +535,8 @@ GEM
500535
crack (>= 0.3.2)
501536
hashdiff (>= 0.4.0, < 2.0.0)
502537
webrick (1.7.0)
503-
xml-simple (1.1.5)
538+
xml-simple (1.1.9)
539+
rexml
504540
yajl-ruby (1.4.1)
505541
yard (0.9.27)
506542
webrick (~> 1.7.0)
@@ -520,7 +556,7 @@ DEPENDENCIES
520556
addressable
521557
allowy (>= 2.1.0)
522558
awesome_print
523-
azure-storage (= 0.14.0.preview)
559+
azure-storage-blob!
524560
bits_service_client (~> 3.3, >= 3.3.0)
525561
byebug
526562
cf-copilot (= 0.0.14)
@@ -535,7 +571,8 @@ DEPENDENCIES
535571
fog-aliyun
536572
fog-aws
537573
fog-azure-rm!
538-
fog-google
574+
fog-core (~> 2.1.2)
575+
fog-google (~> 1.18.0)
539576
fog-local
540577
fog-openstack
541578
googleapis-common-protos (>= 1.3.12)

lib/cloud_controller/blobstore/fog/fog_client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def blob(key)
114114
end
115115

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

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
require 'fog/core'
2+
3+
# This can be removed once fog-google fixes
4+
# https://github.com/fog/fog-google/issues/421, which will allow us to upgrade
5+
# fog-core to 2.2.4.
6+
original = Fog::Logger[:deprecation]
7+
Fog::Logger[:deprecation] = nil
8+
19
require 'fog/aliyun'
10+
# Hack until https://github.com/fog/fog-aliyun/pull/155 is merged and released
11+
Fog::Aliyun::Compute = Fog::Compute::Aliyun
12+
213
require 'fog/aws'
314
require 'fog/local'
415
require 'fog/google'
516
require 'fog/azurerm'
617
require 'fog/openstack'
18+
19+
Fog::Logger[:deprecation] = original

spec/unit/lib/cloud_controller/blobstore/fog/fog_client_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,21 +729,21 @@ def upload_tmpfile(client, key='abcdef')
729729
end
730730

731731
it 'gets the bucket' do
732-
expect_any_instance_of(Fog::Storage::AWS::Directories).to receive(:get).with(directory_key, max_keys: 1)
732+
expect_any_instance_of(Fog::AWS::Storage::Directories).to receive(:get).with(directory_key, max_keys: 1)
733733
subject.ensure_bucket_exists
734734
end
735735

736736
context 'the bucket exists' do
737737
it 'does not create the bucket' do
738738
subject.ensure_bucket_exists
739-
expect_any_instance_of(Fog::Storage::AWS::Directories).not_to receive(:create).with(key: directory_key, public: false)
739+
expect_any_instance_of(Fog::AWS::Storage::Directories).not_to receive(:create).with(key: directory_key, public: false)
740740
subject.ensure_bucket_exists
741741
end
742742
end
743743

744744
context 'the bucket does not exist' do
745745
it 'creates the bucket' do
746-
expect_any_instance_of(Fog::Storage::AWS::Directories).to receive(:create).with(key: directory_key, public: false)
746+
expect_any_instance_of(Fog::AWS::Storage::Directories).to receive(:create).with(key: directory_key, public: false)
747747
subject.ensure_bucket_exists
748748
end
749749
end

0 commit comments

Comments
 (0)