Skip to content

Commit b0dd455

Browse files
authored
Merge pull request #4563 from nhsuk/remove-good-job
Remove Good Job
2 parents 41d18ba + 796e58e commit b0dd455

22 files changed

+17
-239
lines changed

.github/workflows/deploy-application.yml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ on:
2323
options:
2424
- all
2525
- web
26-
- good-job
2726
- sidekiq
2827
default: all
2928
workflow_call:
@@ -82,8 +81,6 @@ jobs:
8281
"application=" + .codedeploy_application_name.value,
8382
"application_group=" + .codedeploy_deployment_group_name.value,
8483
"cluster_name=" + .ecs_variables.value.cluster_name,
85-
"good_job_service=" + .ecs_variables.value.good_job.service_name,
86-
"good_job_task_definition=" + .ecs_variables.value.good_job.task_definition.arn,
8784
"sidekiq_service=" + .ecs_variables.value.sidekiq.service_name,
8885
"sidekiq_task_definition=" + .ecs_variables.value.sidekiq.task_definition.arn
8986
' > ${{ runner.temp }}/DEPLOYMENT_ENVS
@@ -126,50 +123,6 @@ jobs:
126123
aws deploy wait deployment-successful --deployment-id "$deployment_id"
127124
echo "Deployment successful"
128125
129-
create-good-job-deployment:
130-
name: Create good-job deployment
131-
runs-on: ubuntu-latest
132-
needs: prepare-deployment
133-
if: inputs.server_types == 'good-job' || inputs.server_types == 'all'
134-
permissions:
135-
id-token: write
136-
steps:
137-
- name: Download Artifact
138-
uses: actions/download-artifact@v5
139-
with:
140-
name: DEPLOYMENT_ENVS-${{ inputs.environment }}
141-
path: ${{ runner.temp }}
142-
- name: Configure AWS Credentials
143-
uses: aws-actions/configure-aws-credentials@v5
144-
with:
145-
role-to-assume: ${{ env.aws-role }}
146-
aws-region: eu-west-2
147-
- name: Trigger ECS Deployment
148-
run: |
149-
set -e
150-
source ${{ runner.temp }}/DEPLOYMENT_ENVS
151-
DEPLOYMENT_ID=$(aws ecs update-service --cluster $cluster_name --service $good_job_service \
152-
--task-definition $good_job_task_definition --force-new-deployment \
153-
--query 'service.deployments[?rolloutState==`IN_PROGRESS`].[id][0]' --output text)
154-
echo "Deployment started: $DEPLOYMENT_ID"
155-
echo "deployment_id=$DEPLOYMENT_ID" >> $GITHUB_ENV
156-
- name: Wait for deployment to complete
157-
run: |
158-
set -e
159-
source ${{ runner.temp }}/DEPLOYMENT_ENVS
160-
DEPLOYMENT_STATE=IN_PROGRESS
161-
while [ "$DEPLOYMENT_STATE" == "IN_PROGRESS" ]; do
162-
echo "Waiting for deployment to complete..."
163-
sleep 30
164-
DEPLOYMENT_STATE="$(aws ecs describe-services --cluster $cluster_name --services $good_job_service \
165-
--query "services[0].deployments[?id == \`$deployment_id\`].[rolloutState][0]" --output text)"
166-
done
167-
if [ "$DEPLOYMENT_STATE" != "COMPLETED" ]; then
168-
echo "Deployment failed with state: $DEPLOYMENT_STATE"
169-
exit 1
170-
fi
171-
echo "Deployment successful"
172-
173126
create-sidekiq-deployment:
174127
name: Create sidekiq deployment
175128
runs-on: ubuntu-latest

.github/workflows/deploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ on:
4040
options:
4141
- all
4242
- web
43-
- good-job
4443
- sidekiq
4544
- none
4645
default: all

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,5 @@ VOLUME ["/rails/db/data", "/rails/tmp", "/rails/log", "/tmp", "/var/log", "/var/
8585
# Start web server by default, this can be overwritten by environment variable
8686
EXPOSE 4000
8787
ENV HTTP_PORT=4000
88-
ENV GOOD_JOB_PROBE_PORT=4000
8988
ENV SERVER_TYPE=web
9089
CMD ["./bin/docker-start"]

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ gem "fhir_models"
3939
gem "flipper"
4040
gem "flipper-active_record"
4141
gem "flipper-ui"
42-
gem "good_job"
4342
gem "govuk-components"
4443
gem "govuk_design_system_formbuilder"
4544
gem "govuk_markdown"

Gemfile.lock

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ GEM
220220
activemodel
221221
erb (5.0.2)
222222
erubi (1.13.1)
223-
et-orbi (1.2.11)
223+
et-orbi (1.3.0)
224224
tzinfo
225225
factory_bot (6.5.5)
226226
activesupport (>= 6.1.0)
@@ -265,18 +265,11 @@ GEM
265265
rack-protection (>= 1.5.3, < 5.0.0)
266266
rack-session (>= 1.0.2, < 3.0.0)
267267
sanitize (< 8)
268-
fugit (1.11.1)
268+
fugit (1.11.2)
269269
et-orbi (~> 1, >= 1.2.11)
270270
raabro (~> 1.4)
271271
globalid (1.2.1)
272272
activesupport (>= 6.1)
273-
good_job (4.11.2)
274-
activejob (>= 6.1.0)
275-
activerecord (>= 6.1.0)
276-
concurrent-ruby (>= 1.3.1)
277-
fugit (>= 1.11.0)
278-
railties (>= 6.1.0)
279-
thor (>= 1.0.0)
280273
govuk-components (5.11.3)
281274
html-attributes-utils (~> 1.0.0, >= 1.0.0)
282275
pagy (>= 6, < 10)
@@ -800,7 +793,6 @@ DEPENDENCIES
800793
flipper
801794
flipper-active_record
802795
flipper-ui
803-
good_job
804796
govuk-components
805797
govuk_design_system_formbuilder
806798
govuk_markdown

bin/docker-start

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ BIN_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
55
if [ "$SERVER_TYPE" == "web" ]; then
66
echo "Starting web server..."
77
exec "$BIN_DIR"/thrust "$BIN_DIR"/rails server
8-
elif [ "$SERVER_TYPE" == "good-job" ]; then
9-
echo "Starting good-job server..."
10-
exec "$BIN_DIR"/good_job start
118
elif [ "$SERVER_TYPE" == "sidekiq" ]; then
129
echo "Starting sidekiq server..."
1310
exec "$BIN_DIR"/sidekiq
1411
elif [ "$SERVER_TYPE" == "none" ]; then
1512
echo "No server started"
1613
exec tail -f /dev/null # Keep container running
1714
else
18-
echo "SERVER_TYPE variable: '$SERVER_TYPE' unknown. Allowed values ['web','good-job', 'none']"
15+
echo "SERVER_TYPE variable: '$SERVER_TYPE' unknown. Allowed values: web, sidekiq, none"
1916
exit 1
2017
fi

bin/good_job

Lines changed: 0 additions & 5 deletions
This file was deleted.

config/application.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ class Application < Rails::Application
7676
config.active_model.i18n_customize_full_message = true
7777

7878
config.active_job.queue_adapter = :sidekiq
79-
config.good_job.execution_mode = :external
8079

8180
config.view_component.default_preview_layout = "component_preview"
8281
config.view_component.previews.controller = "ComponentPreviewsController"

config/database.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
default: &default
22
adapter: postgresql
33
encoding: unicode
4-
pool: <%= ENV.fetch("RAILS_MAX_THREADS", 5).to_i + ENV.fetch("GOOD_JOB_MAX_THREADS", 4).to_i + ENV.fetch("SIDEKIQ_CONCURRENCY", 4).to_i %>
4+
pool: <%= ENV.fetch("RAILS_MAX_THREADS", 5).to_i + ENV.fetch("SIDEKIQ_CONCURRENCY", 4).to_i %>
55

66
development:
77
<<: *default

config/environments/development.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@
8181
# Prevent health checks from clogging up the logs.
8282
config.silence_healthcheck_path = "/up"
8383

84-
# Set up GoodJob for async execution in development mode
85-
config.good_job.execution_mode = :async
86-
8784
# Enable strict loading to catch N+1 problems.
8885
config.active_record.strict_loading_by_default = true
8986
config.active_record.strict_loading_mode = :n_plus_one_only

0 commit comments

Comments
 (0)