Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
9293fe6
use solid queue instead of sidekiq
jdettmannnava Sep 23, 2025
4adab37
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Sep 24, 2025
400981b
remove sidekiq references
jdettmannnava Sep 24, 2025
146576a
Redis removed from portal
jdettmannnava Sep 24, 2025
da11546
Redis removed from dpc-web
jdettmannnava Sep 24, 2025
266e104
Rediss removed from dpc-admin
jdettmannnava Sep 24, 2025
647d8b0
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Sep 30, 2025
00da7d8
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Sep 30, 2025
4651e49
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Sep 30, 2025
753f3da
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Oct 1, 2025
308faf7
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 1, 2025
c8d2d51
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 1, 2025
fd3140c
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Oct 1, 2025
75c9cad
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 1, 2025
7c1da13
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 1, 2025
743701b
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Oct 9, 2025
e3b7a16
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 9, 2025
5b3e7a7
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 9, 2025
74852c4
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Oct 9, 2025
9264581
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 9, 2025
e4f5444
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 9, 2025
203a478
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Oct 10, 2025
ee14a64
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 10, 2025
d2dbe0f
Merge branch 'jd/dpc-4905-remove-sidekiq' into jd/dpc-4905-remove-redis
jdettmannnava Oct 10, 2025
a50c9c9
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Oct 14, 2025
7547c7f
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 14, 2025
36c43d0
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 14, 2025
c0d8d71
Merge branch 'main' into jd/dpc-4905-use-sq
jdettmannnava Oct 15, 2025
4261583
Merge branch 'jd/dpc-4905-use-sq' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 15, 2025
3cd0a64
Merge branch 'jd/dpc-4905-remove-sidekiq' into jd/dpc-4905-remove-redis
jdettmannnava Oct 15, 2025
5dca8b4
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 16, 2025
1d5c8ca
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 16, 2025
a6712e8
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 21, 2025
79244d7
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 21, 2025
8cf39cc
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 22, 2025
d9cb037
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 22, 2025
0e7511c
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 22, 2025
20fb852
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 22, 2025
b0909db
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 27, 2025
86fb186
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 27, 2025
382766a
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 28, 2025
45d9e75
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 28, 2025
144b47d
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Oct 29, 2025
74cd10e
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Oct 29, 2025
76725ab
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Nov 3, 2025
267b766
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Nov 3, 2025
47e77a8
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Nov 3, 2025
af63489
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Nov 3, 2025
7ca8caa
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Nov 7, 2025
58b7b1c
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Nov 7, 2025
266129f
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Nov 7, 2025
6550ac0
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Nov 7, 2025
1d4ebdd
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Nov 12, 2025
422cd1c
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Nov 12, 2025
9417aba
Merge branch 'main' into jd/dpc-4905-remove-sidekiq
jdettmannnava Nov 12, 2025
27d6354
Merge branch 'jd/dpc-4905-remove-sidekiq' into jd/dpc-4905-remove-redis
jdettmannnava Nov 12, 2025
6757780
Merge branch 'main' into jd/dpc-4905-remove-redis
jdettmannnava Nov 14, 2025
d531564
Merge branch 'main' into jd/dpc-4966-remove-redis
jdettmannnava Nov 14, 2025
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
8 changes: 2 additions & 6 deletions docker-compose.portals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ services:
- "./dpc-web/package-lock.json:/dpc-web/package-lock.json"
- "./dpc-web/app:/dpc-web/app"
- "./dpc-web/db:/dpc-web/db"
- "./dpc-web/lib:/dpc-web/lib"
- "./dpc-web/spec:/dpc-web/spec"

environment:
- REDIS_URL=redis://redis
- DATABASE_URL=postgresql://db/dpc-website_development
- TEST_DATABASE_URL=postgresql://db/dpc-website_test
- API_METADATA_URL=http://api:3002/api/v1
Expand All @@ -47,8 +47,6 @@ services:
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: curl --fail http://localhost:3500/health_check || exit 1
interval: 10s
Expand All @@ -68,9 +66,9 @@ services:
- "./dpc-admin/Gemfile.lock:/dpc-admin/Gemfile.lock"
- "./dpc-admin/package-lock.json:/dpc-admin/package-lock.json"
- "./dpc-admin/app:/dpc-admin/app"
- "./dpc-admin/lib:/dpc-admin/lib"
- "./dpc-admin/spec:/dpc-admin/spec"
environment:
- REDIS_URL=redis://redis
- GOLDEN_MACAROON=${GOLDEN_MACAROON}
- API_METADATA_URL=http://api:3002/api/v1
- API_ADMIN_URL=http://api:9900
Expand All @@ -86,8 +84,6 @@ services:
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: curl --fail http://localhost:3000/admin/health_check || exit 1
interval: 10s
Expand Down
3 changes: 0 additions & 3 deletions dpc-admin/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ gem 'railties', '~> 8.0.2.1'
gem 'bundler', '>= 1.15.0'
gem 'dotenv-rails', groups: [:development, :test]
gem 'puma', '~> 6.4.3'
gem 'redis', '~> 4.0'
gem 'luhnacy', '~> 0.2.1'
gem 'omniauth-rails_csrf_protection', '~> 1.0'
gem 'solid_queue', '~> 1.2'
Expand All @@ -41,7 +40,6 @@ gem 'fhir_models'
gem 'sidekiq_alive', '~> 2.4'
gem 'rack', '>= 3.2.3'
gem 'rack-session', '>= 2.1.1'
gem 'redis-namespace'
gem 'kaminari'
gem 'active_model_serializers'
gem 'lograge'
Expand Down Expand Up @@ -95,7 +93,6 @@ group :test do
gem 'rails-controller-testing'
gem 'selenium-webdriver'
gem 'fakefs', require: 'fakefs/safe'
gem 'fakeredis'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
end
Expand Down
21 changes: 0 additions & 21 deletions dpc-admin/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ GEM
factory_bot (~> 6.4)
railties (>= 5.0.0)
fakefs (2.5.0)
fakeredis (0.9.2)
redis (~> 4.8)
faraday (2.13.4)
faraday-net_http (>= 2.0, < 3.5)
json
Expand All @@ -187,7 +185,6 @@ GEM
raabro (~> 1.4)
globalid (1.2.1)
activesupport (>= 6.1)
gserver (0.0.1)
hashdiff (1.1.0)
hashie (5.0.0)
health_check (3.1.0)
Expand Down Expand Up @@ -366,11 +363,6 @@ GEM
rdoc (6.14.2)
erb
psych (>= 4.0.0)
redis (4.8.1)
redis-client (0.22.1)
connection_pool
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.9.3)
reline (0.6.2)
io-console (~> 0.5)
Expand Down Expand Up @@ -430,14 +422,6 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sidekiq (7.2.4)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
redis-client (>= 0.19.0)
sidekiq_alive (2.4.0)
gserver (~> 0.0.1)
sidekiq (>= 5, < 8)
simplecov (0.17.0)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -538,7 +522,6 @@ DEPENDENCIES
dotenv-rails
factory_bot_rails
fakefs
fakeredis
fhir_models
health_check
kaminari
Expand All @@ -564,16 +547,12 @@ DEPENDENCIES
railties (~> 8.0.2.1)
rbnacl
rbnacl-libsodium
redis (~> 4.0)
redis-namespace
rexml (>= 3.4.2)
rspec-rails
rubocop
rubocop-performance
sassc-rails (>= 2.1.2)
selenium-webdriver
sidekiq (~> 7.2.4)
sidekiq_alive (~> 2.4)
simplecov (<= 0.17)
solid_queue (~> 1.2)
spring
Expand Down
6 changes: 3 additions & 3 deletions dpc-admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ Port mappings can be changed in:\
`docker-compose.portals.yml`

Helpful make commands:\
`make start-portals` : Starts Web,Admin,Impl,Redis,and db\
`make stop-portals` : Stops Web,Admin,Impl,Redis,and db\
`make down-portals` : Removes Web,Admin,Impl,Redis,db and docker network.
`make start-portals` : Starts Web,Admin,Portal and db\
`make stop-portals` : Stops Web,Admin,Portal and db\
`make down-portals` : Removes Web,Admin,Portal, db and docker network.
2 changes: 1 addition & 1 deletion dpc-admin/app/jobs/application_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class ApplicationJob < ActiveJob::Base
# Ensure jobs get sent to a specialized admin queue. Our web applications share
# a single Redis instance and process jobs based on their queue name.
# a single solid queue database and process jobs based on their queue name.
queue_as :admin

# Automatically retry jobs that encountered a deadlock
Expand Down
2 changes: 1 addition & 1 deletion dpc-admin/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Application < Rails::Application
config.action_mailer.delivery_job = 'ActionMailer::MailDeliveryJob'

# Ensure mailer jobs get sent to a specialized admin queue. Our web applications share
# a single Redis instance and process jobs based on their queue name.
# a single solid queue database and process jobs based on their queue name.
config.action_mailer.deliver_later_queue_name = "admin"

config.to_prepare { Devise::Mailer.layout 'mailer' }
Expand Down
2 changes: 0 additions & 2 deletions dpc-admin/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# Show full error reports.
config.consider_all_requests_local = true

config.redis_host = 'localhost'

# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
Expand Down
2 changes: 0 additions & 2 deletions dpc-admin/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@
# Use a different cache store in production.
config.action_controller.perform_caching = true

config.cache_store = :redis_cache_store, { url: "#{ENV.fetch('REDIS_URL', 'redis://localhost')}:6379/1" }

# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "dpc-website_#{Rails.env}"
Expand Down
1 change: 0 additions & 1 deletion dpc-admin/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.cache_store = :null_store

# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
Expand Down
18 changes: 7 additions & 11 deletions dpc-admin/lib/redis_store/mail_throttle_store.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
# frozen_string_literal: true

require 'redis-namespace'

module RedisStore
class MailThrottleStore
# Redis interface for rate limiting user mail

NAMESPACE = 'mail_throttle'
# Interface for rate limiting user mail

def initialize
# Retrieve redis instance with a provided namespace
@limit = Rails.configuration.x.mail_throttle.limit
@expiration = Rails.configuration.x.mail_throttle.expiration
redis_url = "#{ENV.fetch('REDIS_URL', 'redis://localhost')}:6379/1"
@redis = Redis::Namespace.new(NAMESPACE, redis: Redis.new(url: redis_url))
end

def can_email?(key)
return false if get_value(key) >= @limit
namespaced_key = "#{NAMESPACE}/#{key}"
return false if get_value(namespaced_key) >= @limit

increment(key)
increment(namespaced_key)
true
end

private

def increment(key)
@redis.incr(key)
@redis.expire(key, @expiration)
Rails.cache.write(key, get_value(key) + 1, expires_in: @expiration.seconds)
end

def get_value(key)
@redis.get(key).to_i
Rails.cache.fetch(key) { 0 }
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
around(:each) do |spec|
default_limit = Rails.configuration.x.mail_throttle.limit
default_expiration = Rails.configuration.x.mail_throttle.expiration
Rails.cache.clear
Rails.configuration.x.mail_throttle.limit = limit
Rails.configuration.x.mail_throttle.expiration = expiration
spec.run
Expand Down
1 change: 0 additions & 1 deletion dpc-admin/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require 'fakeredis/rspec'
require 'simplecov'

SimpleCov.start 'rails' do
Expand Down
3 changes: 0 additions & 3 deletions dpc-portal/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ gem 'puma', '~> 6.4.3'
gem 'rack', '>= 3.2.3'
gem 'rack-session', '>= 2.1.1'
gem 'railties', '~> 8.0.2.1'
gem 'redis', '~> 4.0'
gem 'redis-namespace'
gem 'rexml', '>= 3.4.2'
gem 'sassc-rails', '>= 2.1.2'
gem 'sinatra', '>= 4.2.0'
Expand Down Expand Up @@ -94,7 +92,6 @@ group :test do
gem 'capybara'
gem 'climate_control'
gem 'fakefs', require: 'fakefs/safe'
gem 'fakeredis'
gem 'rails-controller-testing'
gem 'selenium-webdriver'
gem 'timecop'
Expand Down
8 changes: 0 additions & 8 deletions dpc-portal/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ GEM
factory_bot (~> 6.4)
railties (>= 5.0.0)
fakefs (2.5.0)
fakeredis (0.9.2)
redis (~> 4.8)
faraday (2.10.1)
faraday-net_http (>= 2.0, < 3.2)
logger
Expand Down Expand Up @@ -436,9 +434,6 @@ GEM
erb
psych (>= 4.0.0)
redcarpet (3.6.0)
redis (4.8.1)
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.9.3)
reline (0.6.2)
io-console (~> 0.5)
Expand Down Expand Up @@ -620,7 +615,6 @@ DEPENDENCIES
dotenv-rails
factory_bot_rails
fakefs
fakeredis
fhir_models
health_check
jbuilder (~> 2.7)
Expand All @@ -646,8 +640,6 @@ DEPENDENCIES
railties (~> 8.0.2.1)
rbnacl
rbnacl-libsodium
redis (~> 4.0)
redis-namespace
rexml (>= 3.4.2)
rspec-rails
rubocop
Expand Down
2 changes: 0 additions & 2 deletions dpc-portal/app/jobs/application_job.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

class ApplicationJob < ActiveJob::Base
# Ensure jobs get sent to a specialized admin queue. Our web applications share
# a single Redis instance and process jobs based on their queue name.
queue_as :portal

# Automatically retry jobs that encountered a deadlock
Expand Down
3 changes: 1 addition & 2 deletions dpc-portal/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ class Application < Rails::Application
config.active_support.to_time_preserves_timezone = :zone
config.active_job.queue_adapter = :solid_queue

# Ensure mailer jobs get sent to a specialized admin queue. Our web applications share
# a single Redis instance and process jobs based on their queue name.
# Ensure mailer jobs get sent to a specialized queue.
config.action_mailer.deliver_later_queue_name = "portal"

# Look up previews directly in the path and set default layout
Expand Down
5 changes: 1 addition & 4 deletions dpc-portal/config/initializers/health_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,4 @@
# http status code used when the ip is not allowed for the request
# config.http_status_for_ip_whitelist_error = 403

# When redis url is non-standard
# config.redis_url = 'redis_url'

end
end
3 changes: 0 additions & 3 deletions dpc-web/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ gem 'csv'
gem 'bundler', '>= 1.15.0'
gem 'sprockets-rails', '>= 3.4.2'
gem 'puma', '~> 6.4.3'
gem 'redis', '~> 4.0'
gem 'coffee-rails', '~> 5.0', '>= 5.0.0'
gem 'kramdown', '~> 2.3', '>= 2.3.1'
gem 'luhnacy', '~> 0.2.1'
Expand All @@ -46,7 +45,6 @@ gem 'macaroons'
gem 'lograge', '>= 0.12.0'
gem 'rack', '>= 3.2.3'
gem 'rack-session', '>= 2.1.1'
gem 'redis-namespace'
gem 'bootstrap-table-rails'
gem 'nokogiri', '>= 1.18.9'
gem 'net-imap', '>= 0.5.8'
Expand Down Expand Up @@ -81,7 +79,6 @@ group :test do
gem 'climate_control'
gem 'rails-controller-testing', '>= 1.0.5'
gem 'fakefs', require: 'fakefs/safe'
gem 'fakeredis'
end

group :development do
Expand Down
8 changes: 0 additions & 8 deletions dpc-web/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ GEM
fakefs (2.5.0)
faker (3.3.1)
i18n (>= 1.8.11, < 2)
fakeredis (0.9.2)
redis (~> 4.8)
faraday (2.13.4)
faraday-net_http (>= 2.0, < 3.5)
json
Expand Down Expand Up @@ -382,9 +380,6 @@ GEM
rdoc (6.14.2)
erb
psych (>= 4.0.0)
redis (4.8.1)
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.9.3)
reline (0.6.2)
io-console (~> 0.5)
Expand Down Expand Up @@ -542,7 +537,6 @@ DEPENDENCIES
factory_bot_rails (>= 6.2.0)
fakefs
faker
fakeredis
fhir_models
health_check (>= 3.1.0)
kaminari (>= 1.2.2)
Expand All @@ -565,8 +559,6 @@ DEPENDENCIES
rack-session (>= 2.1.1)
rails-controller-testing (>= 1.0.5)
railties (~> 8.0.2.1)
redis (~> 4.0)
redis-namespace
rexml (>= 3.4.2)
rspec-rails (>= 5.1.2)
rubocop
Expand Down
4 changes: 2 additions & 2 deletions dpc-web/app/jobs/application_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ApplicationJob < ActiveJob::Base
# Ensure jobs get sent to a specialized web queue. Our web applications share
# a single Redis instance and process jobs based on their queue name.
# Ensure jobs get sent to a specialized web queue. Our sandbox web applications share
# a single solid queue database and process jobs based on their queue name.
queue_as :web
end
Loading
Loading