From 1e841390f54f66ce8ea1dd2b0464e6c067a73fc5 Mon Sep 17 00:00:00 2001 From: Anoop Surej <201928812+anoop-surej-nhs@users.noreply.github.com> Date: Tue, 24 Feb 2026 14:58:41 +0000 Subject: [PATCH 1/5] CHORE AS Fix vale errors --- contract/README.md | 4 +-- docs/NHSLOGIN.md | 2 +- ...on_to_check_the_editorconfig_compliance.md | 2 +- .../ADR-005_NHS_Login_OIDC_Flow_Library.md | 2 +- .../config/vocabularies/words/accept.txt | 29 ++++++++++++++++--- scripts/config/vale/vale.ini | 15 ++++++++++ 6 files changed, 45 insertions(+), 9 deletions(-) diff --git a/contract/README.md b/contract/README.md index 204018e0..0937b5e0 100644 --- a/contract/README.md +++ b/contract/README.md @@ -7,11 +7,11 @@ In the MyVaccines codebase there are 2 files for contract testing with EliD: ### 1. eligibility-api.contract.ts - Run against a real EliD environment, set by the environment variable "ELIGIBILITY_API_ENDPOINT" as follows: - - Github Actions: the value is defined in the workflow/action .yaml file, passed in as a env var to the contract-test action + - GitHub Actions: the value is defined in the workflow/action .yaml file, passed in as a env var to the contract-test action - Local: ELIGIBILITY_API_ENDPOINT is set in env.local - Assertions verify that in the EliD response: - Success cases: For a given NHS number - - the eligibilityStatus has the expected value (hardcoded in the test assertion as an expectation) + - the eligibilityStatus has the expected value (hard-coded in the test assertion as an expectation) - CohortElement is present - Failure cases: - that for each NHS number expected to fail, a 'LOADING_ERROR' response gets returned diff --git a/docs/NHSLOGIN.md b/docs/NHSLOGIN.md index eb87f842..0d08afd3 100644 --- a/docs/NHSLOGIN.md +++ b/docs/NHSLOGIN.md @@ -35,5 +35,5 @@ After successful set up, you will receive an email where you will get access to ### Setup SSO Connection between fake client and VitA app -Reach out to NHS Login Support in Slack, and request the sso connection from Fake Client to VitA app and provide Client ID of each. +Reach out to NHS Login Support in Slack, and request the SSO connection from Fake Client to VitA app and provide Client ID of each. This will have to be done for each SSO Client we create in the different environments. diff --git a/docs/adr/ADR-001_Use_git_hook_and_GitHub_action_to_check_the_editorconfig_compliance.md b/docs/adr/ADR-001_Use_git_hook_and_GitHub_action_to_check_the_editorconfig_compliance.md index 0ddc032b..a7d19db4 100644 --- a/docs/adr/ADR-001_Use_git_hook_and_GitHub_action_to_check_the_editorconfig_compliance.md +++ b/docs/adr/ADR-001_Use_git_hook_and_GitHub_action_to_check_the_editorconfig_compliance.md @@ -54,7 +54,7 @@ Implementation of this compliance check (like text encoding, line endings, tabs Other linting tools like for example [Prettier](https://prettier.io/) and [ESLint](https://eslint.org/) are not considered here as they are code formatting tools dedicated to specific technologies and languages. The main drivers for this decision are the style consistency across all files in the codebase and to eliminate any disruptive changes introduced based on preferences. EditorConfig rules are recognised and supported by most if not all major editors and IDEs. -Here is the recommended ruleset: +Here is the recommended rule set: ```console charset = utf-8 diff --git a/docs/adr/ADR-005_NHS_Login_OIDC_Flow_Library.md b/docs/adr/ADR-005_NHS_Login_OIDC_Flow_Library.md index cefb1033..ee8a3a93 100644 --- a/docs/adr/ADR-005_NHS_Login_OIDC_Flow_Library.md +++ b/docs/adr/ADR-005_NHS_Login_OIDC_Flow_Library.md @@ -34,7 +34,7 @@ for selecting one of these libraries. ## Decision -We have decided to adopt the next-auth library (also known as [authjs](https://authjs.dev/)). This library offers a clean +We have decided to adopt the next-auth library (also known as [Auth.js](https://authjs.dev/)). This library offers a clean and concise approach to configuring authentication providers and provides flexibility for future use cases. Furthermore, next-auth manages sessions and session lifecycle, eliminating the need for a separate session management library. Notably, next-auth leverages the well-regarded [openid-client](https://github.com/panva/openid-client) library internally. diff --git a/scripts/config/vale/styles/config/vocabularies/words/accept.txt b/scripts/config/vale/styles/config/vocabularies/words/accept.txt index eb725a94..a5f62351 100644 --- a/scripts/config/vale/styles/config/vocabularies/words/accept.txt +++ b/scripts/config/vale/styles/config/vocabularies/words/accept.txt @@ -1,4 +1,3 @@ -[A-Z]+s Bitwarden bot (?i)CLI @@ -31,10 +30,32 @@ Trufflehog [Ww]iremock [Cc]loudfront [Pp]reprod -Lifecycle -[Ff]argate +[Ll]ifecycle +(?i)fargate buildx [Nn]ginx vegeta jq -JMeter +(?i)jmeter +cybersecurity +sublicense +[Hh]omebrew +asdf +nodejs +eligibilityStatus +ESLint +pythonist +cron +Ankur +Oanea +id_token +access_token +authjs +Anoop +Surej +JWTs +APIs +Chatbot +tfstate +NHSDigital +Subnets diff --git a/scripts/config/vale/vale.ini b/scripts/config/vale/vale.ini index 171494e5..d3be51f8 100644 --- a/scripts/config/vale/vale.ini +++ b/scripts/config/vale/vale.ini @@ -6,3 +6,18 @@ Vocab = words [*.md] BasedOnStyles = Vale + +[docs/developer-guides/*.md] +BasedOnStyles = + +[docs/user-guides/*.md] +BasedOnStyles = + +[docs/adr/ADR-001*.md] +BasedOnStyles = + +[docs/adr/ADR-003*.md] +BasedOnStyles = + +[docs/adr/ADR-XXX*.md] +BasedOnStyles = From 2089a9d16a8ca3e88504595f841339e0713fcfc6 Mon Sep 17 00:00:00 2001 From: Anoop Surej <201928812+anoop-surej-nhs@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:39:45 +0000 Subject: [PATCH 2/5] CHORE AS Fix editorconfig errors (file format) --- .editorconfig | 3 ++ docs/developer-guides/Scripting_Docker.md | 4 +- .../modules/deploy_splunk/files/lambda.py | 50 +++++++++---------- public/assets/static/service-failure.html | 14 +++--- wiremock/__files/update-from-prod | 2 +- 5 files changed, 38 insertions(+), 35 deletions(-) diff --git a/.editorconfig b/.editorconfig index 02e8abcc..c5d50f2a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,3 +19,6 @@ indent_size = 4 [{Makefile,*.mk,go.mod,go.sum,*.go,.gitmodules}] indent_style = tab + +[*.jmx] +indent_style = unset diff --git a/docs/developer-guides/Scripting_Docker.md b/docs/developer-guides/Scripting_Docker.md index 304920db..c11ebb22 100644 --- a/docs/developer-guides/Scripting_Docker.md +++ b/docs/developer-guides/Scripting_Docker.md @@ -154,8 +154,8 @@ It is usually the case that there is a specific image that you will most often w ```make build: # Build the project artefact @Pipeline - DOCKER_IMAGE=my-shiny-app - make docker-build + DOCKER_IMAGE=my-shiny-app + make docker-build ``` Now when you run `make build`, it will do the right thing. Keeping this convention consistent across projects means that new starters can be on-boarded quickly, without needing to learn a new set of conventions each time. diff --git a/infrastructure/modules/deploy_splunk/files/lambda.py b/infrastructure/modules/deploy_splunk/files/lambda.py index 350f3818..0bef7894 100644 --- a/infrastructure/modules/deploy_splunk/files/lambda.py +++ b/infrastructure/modules/deploy_splunk/files/lambda.py @@ -8,26 +8,26 @@ Cloudwatch Logs sends to Firehose records that look like this: { - "messageType": "DATA_MESSAGE", - "owner": "123456789012", - "logGroup": "log_group_name", - "logStream": "log_stream_name", - "subscriptionFilters": [ + "messageType": "DATA_MESSAGE", + "owner": "123456789012", + "logGroup": "log_group_name", + "logStream": "log_stream_name", + "subscriptionFilters": [ "subscription_filter_name" - ], - "logEvents": [ + ], + "logEvents": [ { - "id": "01234567890123456789012345678901234567890123456789012345", - "timestamp": 1510109208016, - "message": "log message 1" + "id": "01234567890123456789012345678901234567890123456789012345", + "timestamp": 1510109208016, + "message": "log message 1" }, { - "id": "01234567890123456789012345678901234567890123456789012345", - "timestamp": 1510109208017, - "message": "log message 2" + "id": "01234567890123456789012345678901234567890123456789012345", + "timestamp": 1510109208017, + "message": "log message 2" } ... - ] + ] } The data is additionally compressed with GZIP. @@ -37,22 +37,22 @@ 1) Gunzip the data 2) Parse the json 3) Set the result to ProcessingFailed for any record whose messageType is not DATA_MESSAGE, thus redirecting them to the - processing error output. Such records do not contain any log events. You can modify the code to set the result to - Dropped instead to get rid of these records completely. + processing error output. Such records do not contain any log events. You can modify the code to set the result to + Dropped instead to get rid of these records completely. 4) For records whose messageType is DATA_MESSAGE, extract the individual log events from the logEvents field, and pass - each one to the transformLogEvent method. You can modify the transformLogEvent method to perform custom - transformations on the log events. + each one to the transformLogEvent method. You can modify the transformLogEvent method to perform custom + transformations on the log events. 5) Concatenate the result from (4) together and set the result as the data of the record returned to Firehose. Note that - this step will not add any delimiters. Delimiters should be appended by the logic within the transformLogEvent - method. + this step will not add any delimiters. Delimiters should be appended by the logic within the transformLogEvent + method. 6) Any individual record exceeding 6,000,000 bytes in size after decompression, processing and base64-encoding is marked - as Dropped, and the original record is split into two and re-ingested back into Firehose or Kinesis. The re-ingested - records should be about half the size compared to the original, and should fit within the size limit the second time - round. + as Dropped, and the original record is split into two and re-ingested back into Firehose or Kinesis. The re-ingested + records should be about half the size compared to the original, and should fit within the size limit the second time + round. 7) When the total data size (i.e. the sum over multiple records) after decompression, processing and base64-encoding - exceeds 6,000,000 bytes, any additional records are re-ingested back into Firehose or Kinesis. + exceeds 6,000,000 bytes, any additional records are re-ingested back into Firehose or Kinesis. 8) The retry count for intermittent failures during re-ingestion is set 20 attempts. If you wish to retry fewer number - of times for intermittent failures you can lower this value. + of times for intermittent failures you can lower this value. """ import base64 diff --git a/public/assets/static/service-failure.html b/public/assets/static/service-failure.html index 92fb0ee9..54490467 100644 --- a/public/assets/static/service-failure.html +++ b/public/assets/static/service-failure.html @@ -34,11 +34,11 @@
@@ -89,16 +89,16 @@