Skip to content

Commit

Permalink
Merge branch 'main' into ER-1219-add-updated-and-published-date
Browse files Browse the repository at this point in the history
  • Loading branch information
martikat authored Sep 19, 2024
2 parents 3625eac + 7eba46b commit 189e280
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 191 deletions.
2 changes: 1 addition & 1 deletion .yardopts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ cms/*.md
data/*.md
uml/*.md
adr/*.md
RELEASE.md
RECOVERY.md
GOV_ONE.md
LICENSE
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ GEM
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.24.1)
minitest (5.25.1)
msgpack (1.7.2)
multi_json (1.15.0)
mutex_m (0.2.0)
Expand Down Expand Up @@ -400,7 +400,7 @@ GEM
hashie (>= 3, < 6)
que (>= 0.14, < 3.0.0)
raabro (1.4.0)
racc (1.8.0)
racc (1.8.1)
rack (3.1.7)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
Expand Down Expand Up @@ -476,13 +476,13 @@ GEM
rouge (4.2.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (6.1.3)
rspec-rails (6.1.4)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
Expand Down Expand Up @@ -577,7 +577,7 @@ GEM
faraday (~> 2.0)
faraday-follow_redirects
temple (0.10.3)
thor (1.3.1)
thor (1.3.2)
tilt (2.3.0)
timeout (0.4.1)
trailblazer-option (0.1.2)
Expand Down Expand Up @@ -619,7 +619,7 @@ GEM
backports (>= 3.18)
rainbow
yard
zeitwerk (2.6.16)
zeitwerk (2.6.18)

PLATFORMS
aarch64-linux-musl
Expand Down
46 changes: 46 additions & 0 deletions RECOVERY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Deployment and Content Maintenance and Recovery

Rolling back a failed code release and restoring a database has been tested and there
is a strategy in place to provide the same assurances with content.

However there are a number of improvements that could still be made:


### Recommendations

1.
Ensure content restoration is possible whenever a coordinated code/content release is actioned.

- Contentful does not provide the functionality, `Launch` to can only be used to publish.
- If multiple entries need to be reverted or unpublished then a pre-launch clone
of the environment must be made.
- This places a restriction on teams of content editors to pause work until the
success of the combined code and content release can be verified.
- There are a limited number of environments in the current plan so only one restore point of the master can
exist.

2.
Synchronise the swap of web app and background worker and avoid deploying a worker when jobs are running.

- The web server Azure AppService and background worker Azure Container share a
database however migrations are only run within the AppService after a blue/green swap.
- The worker will be recreated with new code before the web server can run any migrations it may require.
- The deployment may interrupt active mail or data export jobs.

3.
Mail jobs now have the capacity use MailEvents from Notify callbacks to remove
users from the recipient scope ensuring that no duplicate messages are sent if the job is interrupted.

- This is only implemented on the new module message but should be applied to all.
- Mail messages can also be rescheduled outside of working hours.

4.
Concurrent jobs are guarded against. `v0.15.4` increases the export schedule from daily to every two days
to ensure an active job has time to complete and prevent the the next day's export from auto-expiring.

3.
Increase the database server fast restore points in Azure to more than once in 24hrs

- Additional cost may be incurred


129 changes: 0 additions & 129 deletions RELEASE.md

This file was deleted.

2 changes: 1 addition & 1 deletion app/jobs/content_check_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def valid?
Training::Module.ordered.all? do |mod|
check = ContentIntegrity.new(module_name: mod.name)
check.call # print results
log Training::Module.cache.size # should be larger than 0
# log Training::Module.cache.size # should be larger than 0

unless check.valid?
log "#{mod.name} in '#{env}' via '#{api}' is not valid", :warn
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"sass": "^1.77.8"
},
"devDependencies": {
"stylelint": "^16.8.1",
"stylelint": "^16.9.0",
"stylelint-config-gds": "^2.0.0"
},
"stylelint": {
Expand Down
10 changes: 10 additions & 0 deletions spec/system/errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@
expect(page).to have_content 'Sorry, there is a problem with the service'
end
end

context 'when there is a service unavailable error' do
before do
visit '/503'
end

specify do
expect(page).to have_content 'Service Unavailable'
end
end
end
Loading

0 comments on commit 189e280

Please sign in to comment.