From 980d9bc801704c0b701133aadbb157d9ab0c894a Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:20:17 +0000 Subject: [PATCH 01/12] Update oj to version 3.16.15 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c0811f5..b271f87 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -229,7 +229,7 @@ GEM racc (~> 1.4) nokogiri (1.18.10-x86_64-linux-gnu) racc (~> 1.4) - oj (3.16.13) + oj (3.16.15) bigdecimal (>= 3.0) ostruct (>= 0.2) ostruct (0.6.3) From adb765760d263896a713fa5cd6f95472c6cfd108 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 22:35:18 +0000 Subject: [PATCH 02/12] Update bootsnap to version 1.22.0 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c0811f5..1a039c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,7 +96,7 @@ GEM base64 (0.3.0) benchmark (0.5.0) bigdecimal (4.0.1) - bootsnap (1.21.1) + bootsnap (1.22.0) msgpack (~> 1.2) bootstrap-datepicker-rails (1.10.0.1) railties (>= 3.0) From 5edfaa9faaaa77105606bd9048c3087978ed8109 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:06:07 +0000 Subject: [PATCH 03/12] Update faraday to version 1.10.5 --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1a039c7..54eff8a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -130,7 +130,7 @@ GEM actionmailer (>= 5.2, < 9) activesupport (>= 5.2, < 9) execjs (2.10.0) - faraday (1.10.3) + faraday (1.10.5) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -143,12 +143,12 @@ GEM faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) + faraday-em_synchrony (1.0.1) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) + faraday-multipart (1.2.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) @@ -211,7 +211,7 @@ GEM ruby2_keywords (>= 0.0.5) msgpack (1.8.0) multi_json (1.15.0) - multipart-post (2.3.0) + multipart-post (2.4.1) mutex_m (0.3.0) net-imap (0.5.12) date From 9b01787892a30a7611b73c7845483db134a64f8c Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:10:26 +0000 Subject: [PATCH 04/12] Update faraday to version 2.14.1 --- Gemfile.lock | 49 ++++++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 54eff8a..138393a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -130,31 +130,15 @@ GEM actionmailer (>= 5.2, < 9) activesupport (>= 5.2, < 9) execjs (2.10.0) - faraday (1.10.5) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.1) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-multipart (1.2.0) - multipart-post (~> 2.0) - faraday-net_http (1.0.2) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) - faraday_middleware (1.2.0) - faraday (~> 1.0) + faraday (2.14.1) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-gzip (2.0.1) + faraday (>= 1.0) + zlib (~> 3.0) + faraday-net_http (3.4.2) + net-http (~> 0.5) ffi (1.17.3-arm64-darwin) ffi (1.17.3-x86_64-darwin) ffi (1.17.3-x86_64-linux-gnu) @@ -169,12 +153,12 @@ GEM railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (2.18.1) - json_api_client (1.21.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) + json_api_client (1.23.0) + activemodel (>= 6.0.0) + activesupport (>= 6.0.0) addressable (~> 2.2) - faraday (>= 0.15.2, < 2.0) - faraday_middleware (>= 0.9.0, < 2.0) + faraday (>= 1.10, < 3.0) + faraday-gzip (>= 1.0, < 3.0) rack (>= 0.2) language_server-protocol (3.17.0.5) launchy (3.1.1) @@ -211,8 +195,9 @@ GEM ruby2_keywords (>= 0.0.5) msgpack (1.8.0) multi_json (1.15.0) - multipart-post (2.4.1) mutex_m (0.3.0) + net-http (0.9.1) + uri (>= 0.11.1) net-imap (0.5.12) date net-protocol @@ -363,6 +348,7 @@ GEM unicode-display_width (3.2.0) unicode-emoji (~> 4.1) unicode-emoji (4.2.0) + uri (1.1.1) websocket (1.2.11) websocket-driver (0.8.0) base64 @@ -372,6 +358,7 @@ GEM nokogiri (~> 1.8) yard (0.9.38) zeitwerk (2.7.3) + zlib (3.2.2) PLATFORMS arm64-darwin-22 From 4b07e2de918b915a7697c4116a7680286a2c53fa Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 18:30:22 +0000 Subject: [PATCH 05/12] Update rack to version 2.2.22 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 54eff8a..6fa902f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -247,7 +247,7 @@ GEM puma (7.2.0) nio4r (~> 2.0) racc (1.8.1) - rack (2.2.21) + rack (2.2.22) rack-test (2.2.0) rack (>= 1.3) rails (7.0.10) From df65e691434ba021d2151246508b8b9583607da9 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 01:10:17 +0000 Subject: [PATCH 06/12] Update nokogiri to version 1.19.1 --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6fa902f..4a0e016 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -223,11 +223,11 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.5) - nokogiri (1.18.10-arm64-darwin) + nokogiri (1.19.1-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.10-x86_64-darwin) + nokogiri (1.19.1-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.19.1-x86_64-linux-gnu) racc (~> 1.4) oj (3.16.13) bigdecimal (>= 3.0) From 04dcaf4b615b7b3a81f4dcdd415441904dfbc2f3 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Thu, 19 Feb 2026 10:29:05 +0000 Subject: [PATCH 07/12] Add lightweight health endpoint --- app/controllers/health_controller.rb | 8 ++++++++ config/routes.rb | 2 ++ test/controllers/health_controller_test.rb | 11 +++++++++++ 3 files changed, 21 insertions(+) create mode 100644 app/controllers/health_controller.rb create mode 100644 test/controllers/health_controller_test.rb diff --git a/app/controllers/health_controller.rb b/app/controllers/health_controller.rb new file mode 100644 index 0000000..0dd408c --- /dev/null +++ b/app/controllers/health_controller.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +class HealthController < ActionController::Base # rubocop:disable Rails/ApplicationController + # Inherits from ActionController::Base to avoid any dependencies on Sequencescape + def show + render plain: 'OK' + end +end diff --git a/config/routes.rb b/config/routes.rb index 8d11834..da9c87a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,6 +7,8 @@ # You can have the root of your site routed with "root" root 'pages#index' + get 'health' => 'health#show', as: :health + resources :lots, only: %i[create show new], constraints: { id: /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/ } do collection do get :search diff --git a/test/controllers/health_controller_test.rb b/test/controllers/health_controller_test.rb new file mode 100644 index 0000000..960951c --- /dev/null +++ b/test/controllers/health_controller_test.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'test_helper' + +class HealthControllerTest < ActionDispatch::IntegrationTest + test 'should get health' do + get health_url + assert_response :success + assert_equal 'OK', @response.body.strip + end +end From c0dc91e9ef139665946c6f96f47758140184875a Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 19:25:15 +0000 Subject: [PATCH 08/12] Update mocha to version 3.0.2 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4a0e016..a513bc9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -207,7 +207,7 @@ GEM minitest-rails-capybara (0.0.2) capybara minitest-rails - mocha (3.0.1) + mocha (3.0.2) ruby2_keywords (>= 0.0.5) msgpack (1.8.0) multi_json (1.15.0) From c0dc875d307bef4524284384e5eeac5329c85b03 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Thu, 26 Feb 2026 22:07:34 +0000 Subject: [PATCH 09/12] Add Sequencescape healthcheck to endpoint --- Gemfile | 1 + Gemfile.lock | 1 + app/controllers/health_controller.rb | 25 +++++++++++-- test/controllers/health_controller_test.rb | 41 +++++++++++++++++++--- 4 files changed, 62 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index c4661e7..6166626 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ gem 'concurrent-ruby', '<= 1.3.4' # see https://github.com/rails/rails/issues/54 gem 'csv' gem 'drb' gem 'exception_notification' +gem 'faraday' # used for Sequencescape health check gem 'hashie' gem 'jquery-rails' gem 'json_api_client' diff --git a/Gemfile.lock b/Gemfile.lock index 1a039c7..1406716 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -391,6 +391,7 @@ DEPENDENCIES csv drb exception_notification + faraday hashie jquery-rails json_api_client diff --git a/app/controllers/health_controller.rb b/app/controllers/health_controller.rb index 0dd408c..77a2f55 100644 --- a/app/controllers/health_controller.rb +++ b/app/controllers/health_controller.rb @@ -1,8 +1,29 @@ # frozen_string_literal: true class HealthController < ActionController::Base # rubocop:disable Rails/ApplicationController - # Inherits from ActionController::Base to avoid any dependencies on Sequencescape + # Inherits from ActionController::Base to avoid implied dependencies on Sequencescape + + # Health endpoint + # + # Check connection to Sequencescape by making a health request, returns 200 if successful, or 502/504 if not. def show - render plain: 'OK' + sequencescape_conn.get('/health') + render plain: 'OK', status: :ok + rescue Faraday::TimeoutError + render plain: 'Connection to Sequencescape timed out', status: :gateway_timeout + rescue Faraday::Error + render plain: 'Sequencescape is unavailable', status: :bad_gateway + end + + def sequencescape_conn + @sequencescape_conn ||= Faraday.new(url: sequencescape_url) do |faraday| + faraday.response :raise_error # raise Faraday::Error on status code 4xx or 5xx + end + end + + private + + def sequencescape_url + Gatekeeper::Application.config.api_connection_options[:url] end end diff --git a/test/controllers/health_controller_test.rb b/test/controllers/health_controller_test.rb index 960951c..a669f85 100644 --- a/test/controllers/health_controller_test.rb +++ b/test/controllers/health_controller_test.rb @@ -2,10 +2,43 @@ require 'test_helper' -class HealthControllerTest < ActionDispatch::IntegrationTest - test 'should get health' do - get health_url +class HealthControllerTest < ActionController::TestCase + test 'returns OK when Sequencescape is available' do + test_conn = Faraday.new do |builder| + builder.adapter :test, Faraday::Adapter::Test::Stubs.new do |stub| + stub.get('/health') { |_env| [200, {}, 'OK'] } + end + end + @controller.stubs(:sequencescape_conn).returns(test_conn) + + get :show assert_response :success - assert_equal 'OK', @response.body.strip + assert_equal 'OK', @response.body + end + + test 'returns Gateway Timeout when Sequencescape connection times out' do + test_conn = Faraday.new do |builder| + builder.adapter :test, Faraday::Adapter::Test::Stubs.new do |stub| + stub.get('/health') { |_env| raise Faraday::TimeoutError } + end + end + @controller.stubs(:sequencescape_conn).returns(test_conn) + + get :show + assert_response :gateway_timeout + assert_equal 'Connection to Sequencescape timed out', @response.body + end + + test 'returns Bad Gateway when Sequencescape is unavailable' do + test_conn = Faraday.new do |builder| + builder.adapter :test, Faraday::Adapter::Test::Stubs.new do |stub| + stub.get('/health') { |_env| raise Faraday::ServerError, 'Internal server error' } + end + end + @controller.stubs(:sequencescape_conn).returns(test_conn) + + get :show + assert_response :bad_gateway + assert_equal 'Sequencescape is unavailable', @response.body end end From 8dd9bdfc0a7269823ab32d96e637bdd5ff44da4d Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 03:45:16 +0000 Subject: [PATCH 10/12] Update selenium-webdriver to version 4.41.0 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a513bc9..4d06b13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -324,7 +324,7 @@ GEM sprockets-rails tilt securerandom (0.4.1) - selenium-webdriver (4.40.0) + selenium-webdriver (4.41.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) From 575798b4184b2545720adffc0d75a86a1b47463d Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 20:05:18 +0000 Subject: [PATCH 11/12] Update bootsnap to version 1.23.0 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a876489..ff2d828 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,7 +96,7 @@ GEM base64 (0.3.0) benchmark (0.5.0) bigdecimal (4.0.1) - bootsnap (1.22.0) + bootsnap (1.23.0) msgpack (~> 1.2) bootstrap-datepicker-rails (1.10.0.1) railties (>= 3.0) From 53ef016b0a561bf37bebe5866e229e3889fffce3 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Mon, 9 Mar 2026 11:12:40 +0000 Subject: [PATCH 12/12] release: bump minor version --- .release-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.release-version b/.release-version index ec6d649..815d5ca 100644 --- a/.release-version +++ b/.release-version @@ -1 +1 @@ -1.18.1 +1.19.0