From cbec1d9d3aa0ff591b69f834453533945aa96fdf Mon Sep 17 00:00:00 2001 From: isaac-hammes Date: Thu, 2 Mar 2023 12:02:42 -0800 Subject: [PATCH 1/2] (maint) Update to jruby-9.4.1.0 and move socket timeout to new method. --- .github/workflows/release.yml | 4 ++-- .github/workflows/testing.yml | 6 ++---- Gemfile.lock | 36 +++++++++++++++++------------------ lib/vmpooler/providers/gce.rb | 16 +++++++--------- update-gemfile-lock | 4 ++-- 5 files changed, 31 insertions(+), 35 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f55be8..0e30eae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 86955f6..eac55b3 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -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 @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index fb4920f..25eb646 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/lib/vmpooler/providers/gce.rb b/lib/vmpooler/providers/gce.rb index d656156..7c95859 100644 --- a/lib/vmpooler/providers/gce.rb +++ b/lib/vmpooler/providers/gce.rb @@ -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 diff --git a/update-gemfile-lock b/update-gemfile-lock index 74e9c78..c1f2491 100755 --- a/update-gemfile-lock +++ b/update-gemfile-lock @@ -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-jdk8 \ + /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=$?"' From b8e630ed17c4576f5691e23031dd6c089f91de59 Mon Sep 17 00:00:00 2001 From: Jake Spain Date: Fri, 3 Mar 2023 22:01:50 -0500 Subject: [PATCH 2/2] Bump to java 11 --- update-gemfile-lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-gemfile-lock b/update-gemfile-lock index c1f2491..46c4873 100755 --- a/update-gemfile-lock +++ b/update-gemfile-lock @@ -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.4.1.0-jdk8 \ + 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=$?"'