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

(RE-15161) Update to jruby-9.4.1.0 and move socket timeout to new method. #22

Merged
merged 2 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ jobs:
prerelease: false

# This step should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
- name: Install Ruby jruby-9.3.6.0
- name: Install Ruby jruby-9.4.1.0
uses: ruby/setup-ruby@v1
with:
ruby-version: 'jruby-9.3.6.0'
ruby-version: 'jruby-9.4.1.0'

- name: Build gem
run: gem build *.gemspec
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
strategy:
matrix:
ruby-version:
- 'jruby-9.3.6.0'
- 'jruby-9.4.0.0'
- 'jruby-9.4.1.0'
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
Expand All @@ -35,8 +34,7 @@ jobs:
strategy:
matrix:
ruby-version:
- 'jruby-9.3.6.0'
- 'jruby-9.4.0.0'
- 'jruby-9.4.1.0'
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
Expand Down
36 changes: 18 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ GEM
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
bindata (2.4.14)
bindata (2.4.15)
builder (3.2.4)
climate_control (1.2.0)
coderay (1.1.3)
concurrent-ruby (1.2.0)
concurrent-ruby (1.2.2)
connection_pool (2.3.0)
declarative (0.0.20)
deep_merge (1.2.2)
Expand All @@ -28,9 +28,9 @@ GEM
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
ffi (1.15.5-java)
google-apis-compute_v1 (0.60.0)
google-apis-core (>= 0.9.1, < 2.a)
google-apis-core (0.10.0)
google-apis-compute_v1 (0.62.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
Expand All @@ -39,8 +39,8 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-dns_v1 (0.29.0)
google-apis-core (>= 0.9.1, < 2.a)
google-apis-dns_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
Expand All @@ -51,7 +51,7 @@ GEM
zonefile (~> 1.04)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.0)
google-cloud-errors (1.3.1)
googleauth (1.2.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
Expand All @@ -60,7 +60,7 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
httpclient (2.8.3)
jwt (2.6.0)
jwt (2.7.0)
memoist (0.16.2)
method_source (1.0.0)
mini_mime (1.1.2)
Expand Down Expand Up @@ -110,7 +110,7 @@ GEM
opentelemetry-api (~> 1.0)
os (1.1.4)
parallel (1.22.1)
parser (3.2.0.0)
parser (3.2.1.0)
ast (~> 2.4.1)
pickup (0.0.11)
prometheus-client (2.1.0)
Expand All @@ -128,8 +128,8 @@ GEM
rack (>= 1.3)
rainbow (3.1.1)
rake (13.0.6)
redis (4.8.0)
regexp_parser (2.6.2)
redis (4.8.1)
regexp_parser (2.7.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand All @@ -140,7 +140,7 @@ GEM
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-core (3.12.1)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
Expand All @@ -158,9 +158,9 @@ GEM
rubocop-ast (>= 1.0.1)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
rubocop-ast (1.27.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.12.0)
ruby2_keywords (0.0.5)
signet (0.17.0)
addressable (~> 2.8)
Expand All @@ -184,8 +184,8 @@ GEM
ffi
statsd-ruby (1.5.0)
thor (1.2.1)
thrift (0.17.0)
tilt (2.0.11)
thrift (0.18.1)
tilt (2.1.0)
trailblazer-option (0.1.2)
uber (0.1.0)
unicode-display_width (1.8.0)
Expand Down
16 changes: 7 additions & 9 deletions lib/vmpooler/providers/gce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -683,15 +683,13 @@ def connect_to_gce

# This should supercede the open_socket method in the Pool Manager
def open_socket(host, domain = nil, timeout = 5, port = 22, &_block)
Timeout.timeout(timeout) do
target_host = host
target_host = "#{host}.#{domain}" if domain
sock = TCPSocket.new target_host, port
begin
yield sock if block_given?
ensure
sock.close
end
target_host = host
target_host = "#{host}.#{domain}" if domain
sock = TCPSocket.new(target_host, port, connect_timeout: timeout)
begin
yield sock if block_given?
ensure
sock.close
end
end

Expand Down
4 changes: 2 additions & 2 deletions update-gemfile-lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# The container tag should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
docker run -it --rm \
-v $(pwd):/app \
jruby:9.3.6-jdk \
/bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends make git && cd /app && gem install bundler && bundle install --jobs 3 && bundle update; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
jruby:9.4.1.0-jdk11 \
/bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends git make netbase && cd /app && gem install bundler && bundle install --jobs 3 && bundle update; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'