Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.5.3 to Production #142

Merged
merged 93 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
c6d68ea
Update deployment.yaml
jonrandahl Apr 30, 2024
b1c118a
adds underline text to standard reports landing page
DanielCouzens Aug 12, 2024
9218397
adds underline to help link
DanielCouzens Aug 12, 2024
b70586c
adds ,more descriptive text to actions buttons on the report page
DanielCouzens Aug 12, 2024
e6d3542
updates changelog
DanielCouzens Aug 12, 2024
a6fdce5
updates version cadence
DanielCouzens Aug 12, 2024
2cd1231
imporved grammar
DanielCouzens Aug 12, 2024
020a583
updates dockerfile gem update
DanielCouzens Aug 12, 2024
9709952
updates dockerfile
DanielCouzens Aug 12, 2024
5a163af
updates dockerfile
DanielCouzens Aug 12, 2024
f8c417f
styles the help button to match PPD
DanielCouzens Aug 13, 2024
228331c
updates changelog and version cadence
DanielCouzens Aug 13, 2024
7525f34
Merge pull request #122 from epimorphics/issue/115-improve-link-text
DanielCouzens Aug 13, 2024
bad1e00
Merge branch 'dev' into issue/117-consistent-help
DanielCouzens Aug 13, 2024
ca36948
Merge pull request #123 from epimorphics/issue/117-consistent-help
DanielCouzens Aug 13, 2024
6962402
Merge branch 'dev' into issue/114-add-underlines-to-link-text
DanielCouzens Aug 13, 2024
f9a8c68
removes extra line
DanielCouzens Aug 13, 2024
ccfa1db
adds new line
DanielCouzens Aug 13, 2024
4b87b15
adds another new line
DanielCouzens Aug 13, 2024
a00694f
removes new line
DanielCouzens Aug 13, 2024
0f9daff
updates lr common styles version in gemfile
DanielCouzens Aug 14, 2024
5f906b6
Merge pull request #121 from epimorphics/issue/114-add-underlines-to-…
DanielCouzens Aug 14, 2024
fb026f2
updates step 3/7 to return user input
DanielCouzens Aug 14, 2024
03db7ed
Merge branch 'dev' into issue/118-input-error-identification
DanielCouzens Aug 14, 2024
ac1dd27
updates changelog
DanielCouzens Aug 14, 2024
3847d68
Merge pull request #124 from epimorphics/issue/118-input-error-identi…
DanielCouzens Aug 14, 2024
4b615fa
Updates error message to be more helpful
DanielCouzens Aug 14, 2024
52b8f47
updates changelog
DanielCouzens Aug 14, 2024
f03c75a
updates error message
DanielCouzens Aug 15, 2024
22aea65
updates changelog
DanielCouzens Aug 15, 2024
1b8dbdc
updates text when example report is open
DanielCouzens Aug 15, 2024
2aa2e83
updates js syntax
DanielCouzens Aug 15, 2024
5262152
adds aria labelled by
DanielCouzens Aug 15, 2024
5400aa3
Merge pull request #125 from epimorphics/issue/120-improve-error-sugg…
DanielCouzens Aug 15, 2024
84cf697
Merge pull request #126 from epimorphics/issue/119-improve-labels-ins…
DanielCouzens Aug 15, 2024
88bddea
updates changelog
DanielCouzens Aug 15, 2024
86f2c9b
Merge pull request #127 from epimorphics/spike/update-changelog-missi…
DanielCouzens Aug 15, 2024
690fcc5
updates page titles
DanielCouzens Aug 16, 2024
f9b8527
removes html_safe and drys code
DanielCouzens Aug 16, 2024
55f065e
removes html_safe from report file
DanielCouzens Aug 16, 2024
6829ce0
Merge pull request #128 from epimorphics/issue/116-page-titles
DanielCouzens Aug 16, 2024
5f341b6
updates gemfile
DanielCouzens Aug 19, 2024
64f3f8a
updates changelog
DanielCouzens Aug 19, 2024
6affed9
Merge pull request #129 from epimorphics/spike/updates-gemfile
DanielCouzens Aug 19, 2024
6ecf714
adds underline link to report file page
DanielCouzens Aug 19, 2024
eb420ee
Title should now change between report and download report
DanielCouzens Aug 19, 2024
3ff5aaa
updates changelog
DanielCouzens Aug 19, 2024
d4d9da4
Merge pull request #130 from epimorphics/spike/underline-links-correc…
DanielCouzens Aug 19, 2024
2af49ed
Merge branch 'dev' into spike/prometheus-metrics-update
jonrandahl Aug 20, 2024
3ae5e7b
updates alt text and changelog
DanielCouzens Aug 20, 2024
0d0db54
Merge pull request #131 from epimorphics/issue/115-improve-alt-text
DanielCouzens Aug 20, 2024
b807010
pc area type error message
DanielCouzens Aug 20, 2024
2abb14a
updates postcode error messages
DanielCouzens Aug 21, 2024
3f396c5
updates changelog
DanielCouzens Aug 21, 2024
667e1e9
updates changelog
DanielCouzens Aug 21, 2024
c63de7f
reverts change
DanielCouzens Aug 21, 2024
e757a2e
Merge pull request #132 from epimorphics/issue/120-improve-error-sugg…
DanielCouzens Aug 21, 2024
c0411bd
Merge remote-tracking branch 'origin/dev' into spike/prometheus-metri…
jonrandahl Aug 27, 2024
c9c9315
build: updated & reorganised .gitignore
jonrandahl Aug 27, 2024
29ede01
build: rubocop linting rule updates
jonrandahl Aug 28, 2024
7b8ebeb
build: updated `lr-common-styles` gem
jonrandahl Sep 3, 2024
3ed1319
feat: added `process_threads` metrics
jonrandahl Sep 3, 2024
ff62b02
build: unified makefile targets
jonrandahl Sep 3, 2024
6c7c7af
feat: addition of `instrument_internal_error` metric
jonrandahl Sep 3, 2024
d8c5055
build: add puma-metrics gem
jonrandahl Sep 3, 2024
a776956
refactor: improved error control
jonrandahl Sep 3, 2024
3f983e8
build: Excluded prometheus metrics from the testing environment
jonrandahl Sep 3, 2024
baff4d3
build: updated version patch cadence
jonrandahl Sep 3, 2024
633acaf
docs: Updated CHANGELOG
jonrandahl Sep 3, 2024
9cca41d
fixes bug
DanielCouzens Sep 3, 2024
1687542
updates changelog
DanielCouzens Sep 3, 2024
b0d5b99
Merge pull request #135 from epimorphics/bug/133-xss-vulnerability-ho…
DanielCouzens Sep 3, 2024
db7e61e
Merge branch 'dev' into spike/prometheus-metrics-update
jonrandahl Sep 3, 2024
4c17e20
Merge pull request #134 from epimorphics/spike/prometheus-metrics-update
jonrandahl Sep 4, 2024
0670a32
build: Updated `LR_Common_Styles.gem` to v.1.9.7
jonrandahl Sep 4, 2024
5184584
Merge pull request #136 from epimorphics/spike/update-common-styles-g…
jonrandahl Sep 4, 2024
c82fadd
build: application configuration unification
jonrandahl Sep 5, 2024
ab47517
docs: Updated CHANGELOG
jonrandahl Sep 5, 2024
032be74
build: update to `lr_common_styles` gem v1.9.8
jonrandahl Sep 5, 2024
e577a32
Merge pull request #137 from epimorphics/spike/application-configurat…
jonrandahl Sep 5, 2024
54bae34
Merge remote-tracking branch 'origin/dev' into task/release-candidate
jonrandahl Sep 6, 2024
13b2dd4
build: adjusted version cadence
jonrandahl Sep 6, 2024
30b4174
docs: Updated CHANGELOG
jonrandahl Sep 6, 2024
04d380a
Merge pull request #138 from epimorphics/task/release-candidate-1.5.3
jonrandahl Sep 6, 2024
f19eaa1
Moved all README information into the wiki
bogdanadrianmarc Sep 6, 2024
8758195
refactor: Updates `config/puma.rb` to include metrics plugin and port…
jonrandahl Sep 17, 2024
a4dcf89
refactor: Updates `config/initializers/prometheus.rb`
jonrandahl Sep 17, 2024
84e1c44
refactor: Updates the application exceptions controller
jonrandahl Sep 17, 2024
a1ef4d3
docs: Updated CHANGELOG
jonrandahl Sep 17, 2024
4e415b8
build: Updated to LR_Common_Styles gem v1.9.9
jonrandahl Sep 17, 2024
e910771
Merge pull request #140 from epimorphics/issue/139-task-prometheus-me…
jonrandahl Sep 18, 2024
9867fcc
Added version to unreleased changes in changelog
bogdanadrianmarc Sep 24, 2024
ef0babb
Merge pull request #141 from epimorphics/dev
bogdanadrianmarc Sep 24, 2024
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
50 changes: 40 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,52 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

!/log/.keep
.byebug_history
.github-token
.npmrc
.tags
# Ignore vscode config
.vscode

## Ignore bundler configuration:
/.bundle
/vendor/bundle
/lib/bundler/man/

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
C:\\nppdf32Log\\debuglog.txt

# Ignore Byebug command history file.
.byebug_history

# Ignore node_modules
node_modules/

# Ignore precompiled javascript packs
/public/packs
/public/packs-test
/tmp
C:\\nppdf32Log\\debuglog.txt
coverage
/public/assets

# Ignore uploaded files in development
/storage/*
!/storage/.keep
/public/uploads

### Rails specific ###
.byebug_history
/public/system
/coverage/
tmp

# Ignore files specific to the development environment
fc.json
fc_simple.json
index-names.txt
index.json
public/assets
tags
test/query_test.rb

# Ignore dot files used by environment or IDE tools
.tags
.tool-versions
.github-token
.npmrc
16 changes: 9 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,30 @@ Layout/LineLength:
- config/**/*
- test/**/*

Metrics/ClassLength:
Exclude:
- test/**/*
Lint/DuplicateBranch:
Enabled: false

Metrics/BlockLength:
Max: 30
Exclude:
- test/**/*
- lib/tasks/**/*

Metrics/ClassLength:
CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
Exclude:
- test/**/*

Metrics/MethodLength:
CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
Exclude:
- lib/tasks/location.rake

Style/FormatStringToken:
Enabled: false

Naming/MethodParameterName:
Exclude:
- test/**/*

Lint/DuplicateBranch:
Style/FormatStringToken:
Enabled: false

Style/OptionalBooleanParameter:
Expand Down
77 changes: 74 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,75 @@
# Standard Reports UI: change log

## 1.5.3 - 2024-09

- (Jon) Updated the application exceptions controller to instrument the
`ActiveSupport::Notifications` for internal errors
[GH-139](https://github.com/epimorphics/standard-reports-ui/issues/139)
- (Jon) Updated `config/initializers/prometheus.rb` to include the `Middleware
instrumentation` fix for the 0 memory bug by notifying Action Dispatch
subscribers on Prometheus initialise
[GH-139](https://github.com/epimorphics/standard-reports-ui/issues/139)
- (Jon) Updated `config/puma.rb` to include metrics plugin and port information
for the metrics endpoint as environment variable, with default, to enable
running multiple sibling HMLR apps locally if needed without port conflicts
[GH-139](https://github.com/epimorphics/standard-reports-ui/issues/139)
- (Jon) Updated the `lr_common_styles` gem to the latest 1.9.9 patch release.
- (Jon) Moved all mirrored configuration settings from individual environments
into the application configuration to reduce the need to manage multiple
sources of truth
- (Jon) Implemented improved boilerplate metrics integration to offer analysis
of current application usage stats
- (Jon) Added `process_threads` gauge to prometheus metrics alongside isolating
thread counts to specific status' as per the Rails thread documentation
[GH-148](https://github.com/epimorphics/hmlr-linked-data/issues/148)
- (Jon) Updated the approach to resolve
[GH-142](https://github.com/epimorphics/hmlr-linked-data/issues/142)
- (Jon) Excluded prometheus metrics from the testing environment to reduce noise
in the logs
- (Jon) Added `puma-metrics` gem to provide base metrics for the Puma web server
- (Jon) Added the `internal_error_event` metric to the improved error controls
- (Jon) Tweaked the application controller to improve error control and display
provided message in themed pages to match the rest of the application
- (Jon) Added `puma.stats` to footer template in development environment only,
again as per the approach in the [`LR_Common_Styles`
gem](https://github.com/epimorphics/lr_common_styles/releases/tag/1.9.6)
- (Jon) Reorganised makefile targets alphabetically as well as mirrored other
improvements from the other applications in the suite
- (Jon) Updated .rubocop.yml primarily reorganising the rules alphabetically as
well as adding `CountAsOne` to both `Metrics/ClassLength` and
`Metrics/MethodLength`; includes files with removed earlier disabling of said
rules!
- (Jon) Updated `.gitignore` to include ignoring `byebug` history as well as
sets the tmp directory ignore to be anywhere, not just at the project root
- (Dan) Fixes bug XXS vulnerability
[133](https://github.com/epimorphics/standard-reports-ui/issues/133)
- (Dan) Update the error messages for the postcode selectors step 3/7 so each
error message is unique to the postcode selector
[120](https://github.com/epimorphics/standard-reports-ui/issues/120)
- (Dan) Updates alt text for screenshots of example reports
[115](https://github.com/epimorphics/standard-reports-ui/issues/115)
- (Dan) Updates report page styles so links are underlined and gives download
report page a seperate page title
- (Dan) Updates gemfile to use v1.9.5 lr_common_styles
- (Dan) Updates the page titles throughout the app
[116](https://github.com/epimorphics/standard-reports-ui/issues/116)
- (Dan) Updates the button text on reports page to be dynamic and adds aria
labels to help screen readers
[119](https://github.com/epimorphics/standard-reports-ui/issues/119)
- (Dan) Update the error message for the postcode selectors step 3/7
[120](https://github.com/epimorphics/standard-reports-ui/issues/120)
- (Dan) Update the error message for the postcode selectors step 3/7
[120](https://github.com/epimorphics/standard-reports-ui/issues/120)
- (Dan) Updates step 3/7 to return user input rather than false when user inputs
invalid value
[118](https://github.com/epimorphics/standard-reports-ui/issues/118)
- (Dan) Adds underline text to laning page of standard reports and to help
link[114](https://github.com/epimorphics/standard-reports-ui/issues/114)
- (Dan) Styled the help button to match PPD
[117](https://github.com/epimorphics/standard-reports-ui/issues/117)
- (Dan) Adds more descriptive text to action buttons on the report page
[115](https://github.com/epimorphics/standard-reports-ui/issues/115)

## 1.5.2 - 2023-11-27

- (Jon) Updated the `lr_common_styles` gem to the latest 1.9.3 patch release.
Expand All @@ -14,7 +84,8 @@

- (Jon) Updated the `app/controllers/application_controller.rb` to include the
`before_action` for the `change_default_caching_policy` method to ensure the
default `Cache-Control` header for all requests is set to 5 minutes (300 seconds).
default `Cache-Control` header for all requests is set to 5 minutes (300
seconds).

## 1.5.0 - 2023-07-05

Expand All @@ -28,8 +99,8 @@
- (Jon) Keeping with the logging improvements this change rewrites the messages
passed to the logging gem to ensure the included details are simple and
straight to the point. This should also improve the issues reported in
[GH-117](https://github.com/epimorphics/hmlr-linked-data/issues/117) ,
at least from the front-end point of view!
[GH-117](https://github.com/epimorphics/hmlr-linked-data/issues/117) , at
least from the front-end point of view!
- (Jon) Updated the [README](README.md) to include the `API_SERVICE_URL`
variable to ensure the local `standard_reports_manager` instance is used in
the test environment.
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN apk add --update \
nodejs \
tzdata \
&& rm -rf /var/cache/apk/* \
&& gem update --system \
&& gem install rubygems-update -v 3.4.22 \
&& update_rubygems \
&& gem install bundler:$BUNDLER_VERSION \
&& bundle config --global frozen 1

Expand Down
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ gem 'js-routes', '< 2.0'
gem 'leaflet-rails'
gem 'prometheus-client', '~> 4.0'
gem 'puma'
gem 'puma-metrics'
gem 'responders', '~> 2.0'
gem 'sentry-ruby', '~> 5.2'
gem 'yajl-ruby', require: 'yajl'
Expand Down Expand Up @@ -74,11 +75,11 @@ end
# TODO: While running the rails app locally for testing you can set gems to your local path
# ! These "local" paths do not work with a docker image - use the repo instead
# gem 'json_rails_logger', '~> 1.0.0', path: '~/Epimorphics/shared/json-rails-logger/'
# gem 'lr_common_styles', '~> 1.9.3', path: '~/Epimorphics/clients/land-registry/projects/lr_common_styles/'
# gem 'lr_common_styles', '~> 1.9.0', path: '~/Epimorphics/clients/land-registry/projects/lr_common_styles/'
# rubocop:enable Layout/LineLength

# TODO: In production you want to set this to the gem from the epimorphics package repo
source 'https://rubygems.pkg.github.com/epimorphics' do
gem 'json_rails_logger', '~> 1.0.0'
gem 'lr_common_styles', '~> 1.9.3'
gem 'lr_common_styles', '~> 1.9.0'
end
12 changes: 8 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,11 @@ GEM
psych (4.0.3)
stringio
public_suffix (5.0.0)
puma (5.6.4)
puma (5.6.7)
nio4r (~> 2.0)
puma-metrics (1.2.5)
prometheus-client (>= 0.10)
puma (>= 5.0)
racc (1.7.1)
rack (2.2.7)
rack-test (2.1.0)
Expand Down Expand Up @@ -364,14 +367,14 @@ GEM
json
lograge
railties
lr_common_styles (1.9.3)
lr_common_styles (1.9.9)
bootstrap-sass (~> 3.4.0)
font-awesome-rails (~> 4.7.0.1)
govuk_elements_rails (~> 2.0.0)
govuk_frontend_toolkit (~> 4.18.1)
govuk_template (~> 0.18.1)
haml-rails (~> 2.0.0)
jquery-rails (~> 4.3.5)
jquery-rails (>= 4.3.5, < 4.7.0)
lodash-rails (~> 4.17.14)
modernizr-rails (~> 2.7.1)
modulejs-rails (~> 2.2.0.0)
Expand Down Expand Up @@ -402,7 +405,7 @@ DEPENDENCIES
json_rails_logger (~> 1.0.0)!
leaflet-rails
libv8-node (>= 16.10.0.0)
lr_common_styles (~> 1.9.3)!
lr_common_styles (~> 1.9.0)!
minitest-rails-capybara
minitest-reporters
minitest-spec-rails
Expand All @@ -412,6 +415,7 @@ DEPENDENCIES
modulejs-rails
prometheus-client (~> 4.0)
puma
puma-metrics
rails (< 6.0.0)
responders (~> 2.0)
rubocop
Expand Down
21 changes: 16 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: assets clean image lint publish realclean run tag test vars
.PHONY: assets auth check clean image lint local publish realclean run tag test vars

ACCOUNT?=$(shell aws sts get-caller-identity | jq -r .Account)
ALPINE_VERSION?=3.13
Expand Down Expand Up @@ -28,23 +28,27 @@ REPO?=${ECR}/${IMAGE}
GITHUB_TOKEN=.github-token
BUNDLE_CFG=.bundle/config

all: image

${BUNDLE_CFG}: ${GITHUB_TOKEN}
@./bin/bundle config set --local rubygems.pkg.github.com ${GPR_OWNER}:`cat ${GITHUB_TOKEN}`

${GITHUB_TOKEN}:
@echo ${PAT} > ${GITHUB_TOKEN}

assets:
@./bin/bundle config set --local without 'development'
all: image

assets: auth
@./bin/bundle config set --local without 'development test'
@./bin/bundle install
@./bin/rails assets:clean assets:precompile

auth: ${GITHUB_TOKEN} ${BUNDLE_CFG}

check: lint test
@echo "All checks passed."

clean:
@[ -d public/assets ] && ./bin/rails assets:clobber || :
@@ rm -rf bundle coverage log node_modules

image: auth
@echo Building ${REPO}:${TAG} ...
Expand All @@ -64,6 +68,12 @@ image: auth
lint: assets
@./bin/bundle exec rubocop

local:
@echo "Installing all packages ..."
@./bin/bundle install
@echo "Starting local server ..."
@./bin/rails server -p ${PORT}

publish: image
@echo Publishing image: ${REPO}:${TAG} ...
@docker push ${REPO}:${TAG} 2>&1
Expand All @@ -88,6 +98,7 @@ tag:
@echo ${TAG}

test: assets
@echo "Running tests ..."
@./bin/rails test

vars:
Expand Down
Loading