Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/combined-dependencie…
Browse files Browse the repository at this point in the history
…s-0c5a75f5b9
  • Loading branch information
willc-work authored Sep 13, 2024
2 parents 20f9118 + 9f9cf0f commit 5d031be
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 21 deletions.
41 changes: 20 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ GEM
geom2d (0.4.1)
globalid (1.2.1)
activesupport (>= 6.1)
govuk-components (5.5.0)
govuk-components (5.6.1)
html-attributes-utils (~> 1.0.0, >= 1.0.0)
pagy (>= 6, < 10)
view_component (>= 3.9, < 3.14)
govuk_design_system_formbuilder (5.5.0)
view_component (>= 3.9, < 3.15)
govuk_design_system_formbuilder (5.6.0)
actionview (>= 6.1)
activemodel (>= 6.1)
activesupport (>= 6.1)
Expand All @@ -214,7 +214,7 @@ GEM
nokogiri (~> 1.0)
hashdiff (1.1.0)
hashie (5.0.0)
hexapdf (0.46.0)
hexapdf (0.47.0)
cmdparse (~> 3.0, >= 3.0.3)
geom2d (~> 0.4, >= 0.4.1)
openssl (>= 2.2.1)
Expand Down Expand Up @@ -314,18 +314,18 @@ GEM
ruby-saml (~> 1.12)
openssl (3.2.0)
orm_adapter (0.5.0)
pagy (9.0.5)
pagy (9.0.8)
parallel (1.26.3)
parallel_tests (4.7.1)
parallel
parser (3.3.4.2)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pdf-forms (1.5.1)
cliver (~> 0.3.2)
rexml (~> 3.2, >= 3.2.6)
safe_shell (>= 1.0.3, < 2.0)
pg (1.5.7)
pg (1.5.8)
propshaft (0.9.1)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
Expand Down Expand Up @@ -419,29 +419,28 @@ GEM
redis-store (1.9.1)
redis (>= 4, < 5)
regexp_parser (2.9.2)
reline (0.5.9)
reline (0.5.10)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.3.6)
strscan
rexml (3.3.7)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.3)
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.4)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-rails (7.0.1)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
rspec-core (~> 3.13)
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
Expand Down Expand Up @@ -515,17 +514,17 @@ GEM
actionpack (>= 3.1)
railties (>= 3.1)
slim (>= 3.0, < 6.0, != 5.0.0)
slim_lint (0.28.0)
slim_lint (0.29.0)
rexml (~> 3.2)
rubocop (>= 1.0, < 2.0)
slim (>= 3.0, < 6.0)
smart_properties (1.17.0)
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
stringio (3.1.1)
strscan (3.1.0)
temple (0.10.3)
thor (1.3.1)
thor (1.3.2)
thread_safe (0.3.6)
tilt (2.4.0)
timeout (0.4.1)
Expand All @@ -540,7 +539,7 @@ GEM
vcr (6.3.1)
base64
version_gem (1.1.4)
view_component (3.13.0)
view_component (3.14.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand All @@ -566,7 +565,7 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.17)
zeitwerk (2.6.18)

PLATFORMS
arm64-darwin-21
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,24 @@ The current values for these are available as secure notes in 1Password for each
although this could be a potential future option - the code we inherited from crime apply does have the capability of loading
a Portal metadata file from a URL.

## Manual Puppeteer upgrade

The application uses puppeteer as part of its testing pipeline - namely as part of the browser tools dockerfile. This is pinned to a specific puppeteer version, but because Chrome updates quite regularly, we have to manually update this when a new release comes out.

Here is an example PR of what the update looks like: https://github.com/ministryofjustice/laa-check-client-qualifies/pull/1482/files

Note we use a custom image inside browser tools dockerfile - when you create the branch with the puppeteer upgrade, you'll also need to add the branch name inside the YAML file that pushes the changes to Docker (`browser_tools_docker_image.yml`), and update the CircleCI config accordingly.

You can see our custom Docker image here - this will update once you've pushed a new image: https://hub.docker.com/r/checkclientqualifiesdocker/circleci-image/tags

Steps to follow are:

1. create an appropriately named branch referencing the puppeteer version upgrade i.e. `puppeteer-22**`
2. update Dockerfile_browser_tools.dockerfile & package.json with the new puppeteer version
3. run `yarn install` to update yarn.lock
4. add your branch name to .github/workflows/browser_tools_docker_image.yml so the new image gets pushed to Dockerhub
5. update .circleci/config.yml to reference the new image

## Branch naming

We name our branches to start with the Jira ticket ID, followed by a short description of the work.
Expand Down
2 changes: 2 additions & 0 deletions app/lib/feature_flags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class FeatureFlags
# This should go back to being a time-based feature flag once the SI date has been re-set
# after the election on 4th July 2024
mtr_accelerated: { type: "global", default: false },
cw_form_updates: { type: "global", default: false },
shared_ownership: { type: "session", default: false },
ee_banner: { type: "session", default: false },
}.freeze

class << self
Expand Down
4 changes: 4 additions & 0 deletions helm_deploy/laa-estimate-eligibility/templates/_envs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ env:
value: {{ .Values.featureFlags.basicAuthentication }}
- name: OUTGOINGS_FLOW_FEATURE_FLAG
value: {{ .Values.featureFlags.outgoingsFlow }}
- name: CW_FORM_UPDATE_FEATURE_FLAG
value: {{ .Values.featureFlags.cwFormUpdates }}
- name: SHARED_OWNERSHIP_FEATURE_FLAG
value: {{ .Values.featureFlags.sharedOwnership }}
- name: EE_BANNER_FEATURE_FLAG
value: {{ .Values.featureFlags.eeBanner }}
- name: FEATURE_FLAG_OVERRIDES
value: {{ .Values.featureFlags.overrides }}
- name: NOTIFICATIONS_API_KEY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ featureFlags:
basicAuthentication: NOT_ENABLED
outgoingsFlow: ENABLED
conditionalReveals: ENABLED
cwFormUpdates: NOT_ENABLED
sharedOwnership: NOT_ENABLED
eeBanner: NOT_ENABLED

geckoboard:
metricsDataset: "ccq_monthly_metrics_production"
Expand Down
2 changes: 2 additions & 0 deletions helm_deploy/laa-estimate-eligibility/values/ccq-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ featureFlags:
basicAuthentication: ENABLED
outgoingsFlow: ENABLED
conditionalReveals: ENABLED
cwFormUpdates: NOT_ENABLED
sharedOwnership: NOT_ENABLED
eeBanner: NOT_ENABLED

geckoboard:
metricsDataset: "ccq_monthly_metrics_staging"
Expand Down
2 changes: 2 additions & 0 deletions helm_deploy/laa-estimate-eligibility/values/ccq-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ featureFlags:
basicAuthentication: ENABLED
outgoingsFlow: ENABLED
conditionalReveals: ENABLED
cwFormUpdates: ENABLED
sharedOwnership: ENABLED
eeBanner: ENABLED

postgresql:
enabled: true
Expand Down
12 changes: 12 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,24 @@
ENV["BASIC_AUTHENTICATION_FEATURE_FLAG"] = "disabled"
end

config.around(:each, :cw_form_updates) do |example|
ENV["CW_FORM_UPDATE_FEATURE_FLAG"] = "enabled"
example.run
ENV["CW_FORM_UPDATE_FEATURE_FLAG"] = "disabled"
end

config.around(:each, :shared_ownership) do |example|
ENV["SHARED_OWNERSHIP_FEATURE_FLAG"] = "enabled"
example.run
ENV["SHARED_OWNERSHIP_FEATURE_FLAG"] = "disabled"
end

config.around(:each, :ee_banner) do |example|
ENV["EE_BANNER_FEATURE_FLAG"] = "enabled"
example.run
ENV["EE_BANNER_FEATURE_FLAG"] = "disabled"
end

# This can't be done with before(:each, condition) as the condition is that the key is missing
# from most of the tests
config.before do |test|
Expand Down

0 comments on commit 5d031be

Please sign in to comment.