Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Ruby 3 upgrade #2623

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.2
3.0.3
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ gem 'rfc822'
gem 'rubyzip', '>= 1.3.0'
gem 'sequel', '~> 5.52'
gem 'sequel_pg', require: 'sequel'
gem 'sinatra', '~> 2.0'
gem 'sinatra', '~> 2.1'
gem 'sinatra-contrib'
gem 'statsd-ruby', '~> 1.4.0'
gem 'steno'
Expand All @@ -58,7 +58,7 @@ 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'
gem 'fog-google', '~> 1.17'
gem 'fog-local'
gem 'fog-openstack'

Expand Down
138 changes: 85 additions & 53 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ GIT

GIT
remote: https://github.com/fog/fog-azure-rm.git
revision: 79a738331538c6bdba806774cb11af8977979f8e
revision: f21a4685d56db415b45728eeb2a688195909852b
branch: fog-arm-cf
specs:
fog-azure-rm (0.4.7)
azure-storage (>= 0.11.5.preview, < 1.0)
azure-storage-blob (~> 1.1)
azure-storage-common (~> 1.1)
azure_mgmt_compute (~> 0.9.0)
azure_mgmt_dns (~> 0.9.0)
azure_mgmt_key_vault (~> 0.9.0)
Expand All @@ -20,8 +21,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 @@ -66,7 +67,7 @@ GEM
i18n
ast (2.4.2)
awesome_print (1.9.2)
azure-core (0.1.14)
azure-core (0.1.15)
faraday (~> 0.9)
faraday_middleware (~> 0.10)
nokogiri (~> 1.6)
Expand All @@ -75,6 +76,13 @@ 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 @@ -92,10 +100,9 @@ GEM
azure_mgmt_traffic_manager (0.9.0)
ms_rest_azure (~> 0.7.0)
backport (1.2.0)
backports (3.18.1)
beefcake (1.0.0)
benchmark (0.2.0)
bit-struct (0.16)
bit-struct (0.17)
bits_service_client (3.4.0)
activesupport
statsd-ruby (~> 1.4.0)
Expand Down Expand Up @@ -124,8 +131,7 @@ GEM
debase (0.2.5.beta2)
debase-ruby_core_source (>= 0.10.12)
debase-ruby_core_source (0.10.12)
declarative (0.0.10)
declarative-option (0.1.0)
declarative (0.0.20)
delayed_job (4.1.9)
activesupport (>= 3.0, < 6.2)
diff-lcs (1.4.4)
Expand All @@ -144,12 +150,12 @@ GEM
erubi (1.10.0)
eventmachine (1.2.7)
excon (0.90.0)
faraday (0.15.4)
faraday (0.17.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday_middleware (0.12.2)
faraday_middleware (0.14.0)
faraday (>= 0.7.4, < 1.0)
ffi (1.15.5)
ffi-compiler (1.0.1)
Expand All @@ -172,15 +178,22 @@ GEM
builder
excon (~> 0.58)
formatador (~> 0.2)
fog-google (1.7.1)
fog-google (1.17.0)
fog-core (<= 2.1.0)
fog-json (~> 1.2)
fog-xml (~> 0.1.0)
google-apis-compute_v1 (~> 0.14)
google-apis-dns_v1 (~> 0.12)
google-apis-iamcredentials_v1 (~> 0.6)
google-apis-monitoring_v3 (~> 0.12)
google-apis-pubsub_v1 (~> 0.7)
google-apis-sqladmin_v1beta4 (~> 0.13)
google-apis-storage_v1 (~> 0.6)
google-cloud-env (~> 1.2)
fog-json (1.2.0)
fog-core
fog-json
fog-xml
google-api-client (~> 0.23.0)
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.6.0)
fog-local (0.8.0)
fog-core (>= 1.27, < 3.0)
fog-openstack (0.3.10)
fog-core (>= 1.45, <= 2.1.0)
Expand All @@ -189,15 +202,32 @@ GEM
fog-xml (0.1.3)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
formatador (0.2.5)
google-api-client (0.23.9)
formatador (0.3.0)
google-apis-compute_v1 (0.23.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
httpclient (>= 2.8.1, < 3.0)
mime-types (~> 3.0)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-dns_v1 (0.17.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-iamcredentials_v1 (0.10.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-monitoring_v3 (0.19.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-pubsub_v1 (0.12.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-sqladmin_v1beta4 (0.22.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-storage_v1 (0.11.0)
google-apis-core (>= 0.4, < 2.a)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-protobuf (3.19.2)
google-protobuf (3.19.2-x86_64-darwin)
google-protobuf (3.19.2-x86_64-linux)
Expand All @@ -207,13 +237,13 @@ GEM
grpc (~> 1.27)
googleapis-common-protos-types (1.3.0)
google-protobuf (~> 3.14)
googleauth (0.6.7)
faraday (~> 0.12)
googleauth (1.1.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.7)
signet (>= 0.16, < 2.a)
grpc (1.42.0)
google-protobuf (~> 3.18)
googleapis-common-protos-types (~> 1.0)
Expand Down Expand Up @@ -250,7 +280,7 @@ GEM
json_pure (2.6.1)
jsonpath (1.1.0)
multi_json
jwt (2.2.1)
jwt (2.3.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
Expand All @@ -274,12 +304,13 @@ GEM
nokogiri (>= 1.5.9)
machinist (1.0.6)
membrane (1.1.0)
memoist (0.16.0)
memoist (0.16.2)
method_source (1.0.0)
middleware (0.1.0)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.1115)
mime-types-data (3.2022.0105)
mini_mime (1.1.2)
mini_portile2 (2.7.1)
minitest (5.15.0)
ms_rest (0.6.4)
Expand All @@ -292,7 +323,7 @@ GEM
faraday-cookie_jar (~> 0.0.6)
ms_rest (~> 0.6.3)
msgpack (1.4.2)
multi_json (1.12.2)
multi_json (1.15.0)
multipart-parser (0.1.1)
multipart-post (2.1.1)
mustache (1.1.1)
Expand All @@ -311,7 +342,7 @@ GEM
nokogiri (1.13.1-x86_64-linux)
racc (~> 1.4)
oj (3.13.11)
os (1.0.1)
os (1.1.4)
palm_civet (1.1.0)
parallel (1.21.0)
parallel_tests (3.7.3)
Expand All @@ -334,7 +365,7 @@ GEM
public_suffix (4.0.6)
racc (1.6.0)
rack (2.2.3)
rack-protection (2.0.8.1)
rack-protection (2.1.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
Expand All @@ -356,9 +387,9 @@ GEM
ffi (~> 1.0)
recursive-open-struct (1.1.3)
regexp_parser (2.2.0)
representable (3.0.4)
representable (3.1.1)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
Expand Down Expand Up @@ -421,7 +452,7 @@ GEM
ruby-debug-ide (0.7.3)
rake (>= 0.8.1)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.2)
ruby2_keywords (0.0.5)
ruby_parser (3.8.3)
sexp_processor (~> 4.1)
rubyzip (2.3.2)
Expand All @@ -430,27 +461,26 @@ GEM
pg (>= 0.18.0, != 1.2.0)
sequel (>= 4.38.0)
sexp_processor (4.7.0)
signet (0.11.0)
addressable (~> 2.3)
faraday (~> 0.9)
signet (0.16.0)
addressable (~> 2.8)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simplecov (0.13.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sinatra (2.0.8.1)
sinatra (2.1.0)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.8.1)
rack (~> 2.2)
rack-protection (= 2.1.0)
tilt (~> 2.0)
sinatra-contrib (2.0.8.1)
backports (>= 2.8.2)
sinatra-contrib (2.1.0)
multi_json
mustermann (~> 1.0)
rack-protection (= 2.0.8.1)
sinatra (= 2.0.8.1)
rack-protection (= 2.1.0)
sinatra (= 2.1.0)
tilt (~> 2.0)
solargraph (0.44.2)
backport (~> 1.2)
Expand Down Expand Up @@ -486,7 +516,8 @@ GEM
thread_safe (0.3.6)
tilt (2.0.10)
timecop (0.9.4)
timeliness (0.3.10)
timeliness (0.4.4)
trailblazer-option (0.1.2)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uber (0.1.0)
Expand All @@ -501,6 +532,7 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.7.0)
xml-simple (1.1.5)
yajl-ruby (1.4.1)
yard (0.9.26)
Expand Down Expand Up @@ -535,7 +567,7 @@ DEPENDENCIES
fog-aliyun
fog-aws
fog-azure-rm!
fog-google
fog-google (~> 1.17)
fog-local
fog-openstack
googleapis-common-protos (>= 1.3.12)
Expand Down Expand Up @@ -584,7 +616,7 @@ DEPENDENCIES
rubyzip (>= 1.3.0)
sequel (~> 5.52)
sequel_pg
sinatra (~> 2.0)
sinatra (~> 2.1)
sinatra-contrib
solargraph
spork!
Expand All @@ -602,4 +634,4 @@ DEPENDENCIES
yajl-ruby

BUNDLED WITH
2.1.4
2.2.32
2 changes: 1 addition & 1 deletion app/controllers/v3/service_plan_visibility_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def update_visibility(opts={})
message = ServicePlanVisibilityUpdateMessage.new(hashed_params[:body])
bad_request!(message.errors.full_messages) unless message.valid?

updated_service_plan = V3::ServicePlanVisibilityUpdate.new.update(service_plan, message, opts)
updated_service_plan = V3::ServicePlanVisibilityUpdate.new.update(service_plan, message, **opts)
event_repository.record_service_plan_update_visibility_event(service_plan, message.audit_hash)
updated_service_plan
rescue V3::ServicePlanVisibilityUpdate::UnprocessableRequest => e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def cp_r_to_blobstore(*args)
error_handling { wrapped_client.cp_r_to_blobstore(*args) }
end

def download_from_blobstore(*args)
def download_from_blobstore(*args, **kwargs)
error_handling { wrapped_client.download_from_blobstore(*args) }
end

Expand Down
6 changes: 3 additions & 3 deletions lib/cloud_controller/clock/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def start_inline_jobs
interval: @config.get(:diego_sync, :frequency_in_seconds),
timeout: @timeout_calculator.calculate(:diego_sync),
}
@clock.schedule_frequent_inline_job(clock_opts) do
@clock.schedule_frequent_inline_job(**clock_opts) do
Jobs::Diego::Sync.new
end
end
Expand All @@ -68,7 +68,7 @@ def start_frequent_jobs
name: job_config[:name],
interval: @config.get(job_config[:name].to_sym, :frequency_in_seconds),
}
@clock.schedule_frequent_worker_job(clock_opts) do
@clock.schedule_frequent_worker_job(**clock_opts) do
klass = job_config[:class]
klass.new(@config.get(job_config[:name].to_sym, :expiration_in_seconds))
end
Expand All @@ -83,7 +83,7 @@ def start_daily_jobs
priority: cleanup_config[:priority] || Clock::HIGH_PRIORITY
}

@clock.schedule_daily_job(clock_opts) do
@clock.schedule_daily_job(**clock_opts) do
klass = cleanup_config[:class]

if cleanup_config[:arg_from_config]
Expand Down