Skip to content

Commit 15d6db2

Browse files
authored
Merge pull request #572 from Shopify/ian/bump-ruby-version
We noticed that Dependabot has stopped being able to issue updates due to the gemspec specifying Ruby 2.7+, but we have optional dependencies that require ruby 3.1+. While our .ruby-version file specifies 3.2, Dependabot only reads the gemspec and not the ruby-version file. This is a known bug (dependabot/dependabot-core#10108) that has not been addressed. Looking at Ruby's deprecation schedule, 2.7 was EOL in 2023 and 3.1 will be EOL in a month. This gives us good reason to support 3.2+ going forward, bringing the gemspec in line with our testing versions. This will necessitate a minor version bump to 0.23 to not surprise folks who have pinned to 0.22 In this, we also needed to bump dependencies so they would work with newer ruby versions. In this, we ran into gRPC tests not exiting despite passing, so a lot of defensiveness has been added to those tests to ensure that we're actually closing everything and cleaning up after ourselves. In addition, we noticed that when running tests locally with docker-compose, gRPC would return GRPC::Unavailable instead of GRPC::DeadlineExceeded Bump gemspec to use Ruby 3.2+ Drop 2.7 and 3.0 from testing, add 3.3 and 3.4 Bump toxiproxy test container from 2.5.0 -> 2.12.0 Bump gRPC to 1.71.0 Bump trilogy to 2.9 Update lockfiles Add timeouts in CI Update rubocop to use plugins Style fixes Fix gRPC test to exit cleanly.
2 parents 15ea01c + 38da14c commit 15d6db2

26 files changed

+450
-283
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG RUBY_VERSION=3.2.0
1+
ARG RUBY_VERSION=3.4.3
22
FROM ruby:${RUBY_VERSION} as base
33

44
# Avoid warnings by switching to noninteractive
@@ -15,7 +15,7 @@ RUN apt-get -o Acquire::Max-FutureTime=86400 update \
1515
linux-perf \
1616
lldb \
1717
lsb-release \
18-
netcat \
18+
netcat-openbsd \
1919
procps \
2020
xz-utils \
2121
&& gem install bundler rcodetools rubocop ruby-debug-ide fastri

.devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
- test
4646

4747
toxiproxy:
48-
image: ghcr.io/shopify/toxiproxy:2.5.0
48+
image: ghcr.io/shopify/toxiproxy:2.12.0
4949
container_name: toxiproxy
5050
depends_on:
5151
- redis

.github/workflows/test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ jobs:
3232
fail-fast: true
3333
matrix:
3434
ruby:
35+
- "3.4"
36+
- "3.3"
3537
- "3.2"
36-
- "3.1"
37-
- "3.0"
38-
- "2.7"
3938
services:
4039
mysql:
4140
image: mysql:5.7
@@ -54,7 +53,7 @@ jobs:
5453
--health-timeout=5s
5554
--health-retries=5
5655
toxiproxy:
57-
image: ghcr.io/shopify/toxiproxy:2.5.0
56+
image: ghcr.io/shopify/toxiproxy:2.12.0
5857
steps:
5958
-
6059
name: Checkout
@@ -77,6 +76,7 @@ jobs:
7776
run: bundle exec rake build
7877
-
7978
name: Tests
79+
timeout-minutes: 5
8080
run: |
8181
bundle exec rake test:semian ||
8282
(echo "===== Retry Attempt: 2 ====" && bundle exec rake test:semian) || \
@@ -109,10 +109,9 @@ jobs:
109109
fail-fast: false
110110
matrix:
111111
ruby:
112+
- "3.4"
113+
- "3.3"
112114
- "3.2"
113-
- "3.1"
114-
- "3.0"
115-
- "2.7"
116115
gemfile:
117116
- grpc
118117
- mysql2
@@ -160,7 +159,7 @@ jobs:
160159
--health-timeout=5s
161160
--health-retries=5
162161
toxiproxy:
163-
image: ghcr.io/shopify/toxiproxy:2.5.0
162+
image: ghcr.io/shopify/toxiproxy:2.12.0
164163
steps:
165164
-
166165
name: Checkout
@@ -185,6 +184,7 @@ jobs:
185184
bundle exec rake build
186185
-
187186
name: Tests
187+
timeout-minutes: 5
188188
env:
189189
TEST: test/adapters/${{ matrix.adapter }}_test.rb
190190
run: |

.rubocop.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
3-
require:
2+
plugins:
43
- rubocop-minitest
54
- rubocop-rake
65
- rubocop-thread_safety

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.2
1+
3.4.3

Gemfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ group :test do
1515
gem "toxiproxy"
1616
gem "webrick"
1717

18-
# The last stable version for MacOS ARM darwin
19-
gem "grpc", "1.60.0"
18+
gem "bigdecimal"
19+
gem "mutex_m"
20+
gem "grpc", "1.71.0"
2021
gem "mysql2", "~> 0.5"
21-
gem "trilogy", "~> 2.8"
22+
gem "trilogy", "~> 2.9"
2223
gem "activerecord", github: "rails/rails", branch: "main"
2324
gem "hiredis", "~> 0.6"
2425
# NOTE: v0.12.0 required for ruby 3.2.0. https://github.com/redis-rb/redis-client/issues/58

Gemfile.lock

Lines changed: 96 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dockerfiles/semian-ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG RUBY_VERSION=3.2.0
1+
ARG RUBY_VERSION=3.4.3
22
FROM ruby:${RUBY_VERSION} as base
33

44
# Avoid warnings by switching to noninteractive

0 commit comments

Comments
 (0)