From 27324f2e0c38aeadad43e3ea26e56242f7485a10 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 21 Aug 2024 11:04:32 +0200 Subject: [PATCH] Update dependencies and dev environment --- .github/workflows/ci.yml | 13 ++++++----- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 40 ++++++++++++++++++++------------- dev.yml | 12 ++-------- gemfiles/Gemfile.latest-release | 1 + gemfiles/Gemfile.min-supported | 2 +- gemfiles/Gemfile.rails-edge | 1 + isogun.yml | 11 --------- 9 files changed, 38 insertions(+), 46 deletions(-) delete mode 100644 isogun.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e3f3435..3517ff5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,11 +19,11 @@ jobs: ruby: '3.0' gemfile: "Gemfile.min-supported" - name: 'Latest released & run rubocop' - ruby: '3.2' + ruby: '3.3' gemfile: "Gemfile.latest-release" rubocop: true - name: 'Rails edge' - ruby: '3.2' + ruby: '3.3' gemfile: "Gemfile.rails-edge" edge: true @@ -69,25 +69,26 @@ jobs: run: | sudo apt-get update sudo apt-get -y install libmemcached-dev libmysqlclient-dev libpq-dev libsasl2-dev + - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.entry.ruby }} - - name: Install bundler and gems - run: | - gem install bundler - bundle install --jobs 4 --retry 3 + bundler-cache: true + - name: Test with mysql env: DB: mysql2 run: bundle exec rake test + - name: Test with postgres and memcached_store env: DB: postgresql POSTGRES_PASSWORD: postgres ADAPTER: memcached run: bundle exec rake test + - name: Run rubocop if: matrix.entry.rubocop run: bundle exec rubocop diff --git a/.ruby-version b/.ruby-version index be94e6f5..a0891f56 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.2 +3.3.4 diff --git a/Gemfile b/Gemfile index 4d3e63ef..1bde7495 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem "rubocop-shopify", "~> 2.9.0", require: false gem "mysql2", "~> 0.5.3", platform: :mri gem "pg", ">= 0.18", "< 2.0", platform: :mri -gem "memcached", "~> 1.8.0", platform: :mri +gem "memcached", github: "Shopify/memcached", branch: "1-0-stable-shopify", platform: :mri gem "memcached_store", "~> 2.3.2", platform: :mri gem "dalli", "~> 3.2.3" gem "cityhash", "~> 0.6.0", platform: :mri diff --git a/Gemfile.lock b/Gemfile.lock index 0c1f285b..1a8cc1a1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,10 @@ +GIT + remote: https://github.com/Shopify/memcached.git + revision: 54a89bae698896a00fd2ceeb142dada6285f73ed + branch: 1-0-stable-shopify + specs: + memcached (1.9.0) + PATH remote: . specs: @@ -8,45 +15,45 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (7.1.3.2) - activesupport (= 7.1.3.2) - activerecord (7.1.3.2) - activemodel (= 7.1.3.2) - activesupport (= 7.1.3.2) + activemodel (7.2.0) + activesupport (= 7.2.0) + activerecord (7.2.0) + activemodel (= 7.2.0) + activesupport (= 7.2.0) timeout (>= 0.4.0) - activesupport (7.1.3.2) + activesupport (7.2.0) base64 bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) ar_transaction_changes (1.1.9) activerecord (>= 5.2.0) ast (2.4.2) base64 (0.2.0) - bigdecimal (3.1.6) + bigdecimal (3.1.8) byebug (11.1.3) cityhash (0.6.0) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.4) connection_pool (2.4.1) dalli (3.2.3) drb (2.2.1) - i18n (1.14.4) + i18n (1.14.5) concurrent-ruby (~> 1.0) json (2.7.1) language_server-protocol (3.17.0.3) - memcached (1.8.0) + logger (1.6.0) memcached_store (2.3.4) activesupport (>= 6) memcached (~> 1.8) - minitest (5.22.2) + minitest (5.25.1) mocha (2.1.0) ruby2_keywords (>= 0.0.5) - mutex_m (0.2.0) mysql2 (0.5.6) parallel (1.24.0) parser (3.3.0.5) @@ -76,6 +83,7 @@ GEM rubocop (~> 1.33) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) + securerandom (0.3.1) spy (1.0.5) stackprof (0.2.26) strscan (3.1.0) @@ -94,7 +102,7 @@ DEPENDENCIES cityhash (~> 0.6.0) dalli (~> 3.2.3) identity_cache! - memcached (~> 1.8.0) + memcached! memcached_store (~> 2.3.2) minitest (~> 5.14) mocha (~> 2.0) diff --git a/dev.yml b/dev.yml index 89614b07..58f0a341 100644 --- a/dev.yml +++ b/dev.yml @@ -1,18 +1,10 @@ name: identity-cache up: - - homebrew: - - mysql-client@5.7: - or: [mysql@5.7] - conflicts: [mysql-connector-c, mysql, mysql-client] - ruby - - isogun - bundler - -env: - RAILGUN_HOST: identity-cache.railgun - MYSQL_HOST: identity-cache.railgun - MEMCACHED_HOST: identity-cache.railgun + - memcached + - mysql commands: test: diff --git a/gemfiles/Gemfile.latest-release b/gemfiles/Gemfile.latest-release index f429406f..fac54373 100644 --- a/gemfiles/Gemfile.latest-release +++ b/gemfiles/Gemfile.latest-release @@ -8,6 +8,7 @@ gem "activerecord" gem "activesupport" gem "mysql2", "~> 0.5" gem "pg", "~> 1.1" +gem "memcached", github: "Shopify/memcached", branch: "1-0-stable-shopify" gem "memcached_store" gem "dalli" gem "cityhash" diff --git a/gemfiles/Gemfile.min-supported b/gemfiles/Gemfile.min-supported index 16ffb3fa..22b703b6 100644 --- a/gemfiles/Gemfile.min-supported +++ b/gemfiles/Gemfile.min-supported @@ -6,7 +6,7 @@ gem "ar_transaction_changes", "~> 1.1.0" gem "activerecord", "~> 7.0.0" gem "mysql2", "~> 0.5" gem "pg", "~> 1.1" -gem "memcached", "~> 1.8.0" +gem "memcached", github: "Shopify/memcached", branch: "1-0-stable-shopify" gem "memcached_store", "~> 2.3.2" gem "dalli", "~> 2.7.11" gem "cityhash", "~> 0.6.0" diff --git a/gemfiles/Gemfile.rails-edge b/gemfiles/Gemfile.rails-edge index 4869e5ba..131acc2d 100644 --- a/gemfiles/Gemfile.rails-edge +++ b/gemfiles/Gemfile.rails-edge @@ -5,6 +5,7 @@ gem "activerecord", github: "rails/rails", branch: "main" gem "activesupport", github: "rails/rails", branch: "main" gem "mysql2", "~> 0.5" gem "pg", "~> 1.1" +gem "memcached", github: "Shopify/memcached", branch: "1-0-stable-shopify" gem "memcached_store" gem "dalli" gem "cityhash" diff --git a/isogun.yml b/isogun.yml deleted file mode 100644 index 15264a2c..00000000 --- a/isogun.yml +++ /dev/null @@ -1,11 +0,0 @@ -# https://dev-accel.shopify.io/dev/railgun/Railgun-Config -name: identity-cache - -vm: - ip_address: 192.168.64.98 - memory: 1G - cores: 2 - -services: - - mysql - - memcached