Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .github/scripts/release_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ sam deploy \
EnableNotificationsExternal="$ENABLE_NOTIFICATIONS_EXTERNAL" \
EnabledSiteODSCodesValue="${ENABLED_SITE_ODS_CODES:-' '}" \
EnablePostDatedNotifications="$ENABLE_POST_DATED_NOTIFICATIONS" \
EnabledSystemsValue="${ENABLED_SYSTEMS:-' '}" \
EnabledSupplierApplicationIDsValue="${ENABLED_SUPPLIER_APPLICATION_IDS:-' '}" \
BlockedSiteODSCodesValue="${BLOCKED_SITE_ODS_CODES:-' '}" \
NotifyRoutingPlanIDValue="$NOTIFY_ROUTING_PLAN_ID" \
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: true
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: true
ENABLED_SYSTEMS: "Internal Test System"
BLOCKED_SITE_ODS_CODES: "B3J1Z"
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX"
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand Down Expand Up @@ -140,7 +139,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: false
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: true
ENABLED_SYSTEMS: "Internal Test System"
BLOCKED_SITE_ODS_CODES: "B3J1Z"
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX" # Workaround empty string handling
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand All @@ -154,8 +152,7 @@ jobs:
PROXYGEN_ROLE: ${{ secrets.PROXYGEN_PTL_ROLE }}

release_qa:
needs:
[tag_release, release_dev, package_code, get_commit_id, get_config_values]
needs: [tag_release, release_dev, package_code, get_commit_id, get_config_values]
uses: ./.github/workflows/run_release_code_and_api.yml
permissions:
contents: write
Expand Down Expand Up @@ -185,7 +182,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: false
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: true
ENABLED_SYSTEMS: "Internal Test System"
BLOCKED_SITE_ODS_CODES: "B3J1Z"
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX" # Workaround empty string handling
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: true
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: true
ENABLED_SYSTEMS: "Internal Test System"
BLOCKED_SITE_ODS_CODES: "XXXXX" # Workaround empty string handling
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX"
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand Down Expand Up @@ -158,7 +157,6 @@ jobs:
ENABLE_BACKUP: "False"
ENABLE_NOTIFICATIONS_INTERNAL: false
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLED_SYSTEMS: "Internal Test System"
BLOCKED_SITE_ODS_CODES: "B3J1Z"
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX" # Workaround empty string handling
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand Down
43 changes: 5 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: false
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: true
ENABLED_SYSTEMS: "Internal Test System"
BLOCKED_SITE_ODS_CODES: "XXXXX" # Workaround empty string handling
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX"
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand Down Expand Up @@ -145,7 +144,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: false
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: false
ENABLED_SYSTEMS: "Internal Test System"
BLOCKED_SITE_ODS_CODES: "B3J1Z"
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX"
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand All @@ -163,15 +161,7 @@ jobs:
REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }}

release_ref:
needs:
[
tag_release,
release_dev,
release_dev_sandbox,
package_code,
get_commit_id,
get_config_values,
]
needs: [tag_release, release_dev, release_dev_sandbox, package_code, get_commit_id, get_config_values]
uses: ./.github/workflows/run_release_code_and_api.yml
permissions:
contents: write
Expand Down Expand Up @@ -201,7 +191,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: false
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: false
ENABLED_SYSTEMS: "Internal Test System, Apotec Ltd - Apotec CRM - Production, CrxPatientApp, nhsPrescriptionApp, Titan PSU Prod"
BLOCKED_SITE_ODS_CODES: "B3J1Z"
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX"
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand All @@ -219,15 +208,7 @@ jobs:
REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }}

release_qa:
needs:
[
tag_release,
release_dev,
release_dev_sandbox,
package_code,
get_commit_id,
get_config_values,
]
needs: [tag_release, release_dev, release_dev_sandbox, package_code, get_commit_id, get_config_values]
uses: ./.github/workflows/run_release_code_and_api.yml
permissions:
contents: write
Expand Down Expand Up @@ -257,7 +238,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: false
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: true
ENABLED_SYSTEMS: "Internal Test System, Apotec Ltd - Apotec CRM - Production, CrxPatientApp, nhsPrescriptionApp, Titan PSU Prod"
BLOCKED_SITE_ODS_CODES: "B3J1Z"
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX"
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand All @@ -275,8 +255,7 @@ jobs:
REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }}

release_int:
needs:
[tag_release, release_qa, package_code, get_commit_id, get_config_values]
needs: [tag_release, release_qa, package_code, get_commit_id, get_config_values]
uses: ./.github/workflows/run_release_code_and_api.yml
permissions:
contents: write
Expand Down Expand Up @@ -306,7 +285,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: true
ENABLE_NOTIFICATIONS_EXTERNAL: true
ENABLE_POST_DATED_NOTIFICATIONS: true
ENABLED_SYSTEMS: "CrxPatientApp,nhsPrescriptionApp"
BLOCKED_SITE_ODS_CODES: "XXXXX" # Workaround empty string handling
# See https://nhsd-confluence.digital.nhs.uk/spaces/APIMC/pages/1345218865/Mapping+of+Suppliers+to+APIM+Onboarding+Portal+Apps
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX,YYYYY"
Expand All @@ -329,8 +307,7 @@ jobs:
REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }}

release_int_sandbox:
needs:
[tag_release, release_qa, package_code, get_commit_id, get_config_values]
needs: [tag_release, release_qa, package_code, get_commit_id, get_config_values]
uses: ./.github/workflows/run_release_code_and_api.yml
permissions:
contents: write
Expand Down Expand Up @@ -358,7 +335,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: false
ENABLE_NOTIFICATIONS_EXTERNAL: false
ENABLE_POST_DATED_NOTIFICATIONS: false
ENABLED_SYSTEMS: "Internal Test System, Apotec Ltd - Apotec CRM - Production, CrxPatientApp, nhsPrescriptionApp, Titan PSU Prod"
BLOCKED_SITE_ODS_CODES: "B3J1Z"
ENABLED_SUPPLIER_APPLICATION_IDS: "XXXXX"
NOTIFY_ROUTING_PLAN_ID: "e57fe5cc-0567-4854-abe2-b7dd9014a50c"
Expand All @@ -376,15 +352,7 @@ jobs:
REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }}

release_prod:
needs:
[
tag_release,
release_int,
release_int_sandbox,
package_code,
get_commit_id,
get_config_values,
]
needs: [tag_release, release_int, release_int_sandbox, package_code, get_commit_id, get_config_values]
uses: ./.github/workflows/run_release_code_and_api.yml
permissions:
contents: write
Expand Down Expand Up @@ -414,7 +382,6 @@ jobs:
ENABLE_NOTIFICATIONS_INTERNAL: true
ENABLE_NOTIFICATIONS_EXTERNAL: true
ENABLE_POST_DATED_NOTIFICATIONS: false
ENABLED_SYSTEMS: "CrxPatientApp,nhsPrescriptionApp"
BLOCKED_SITE_ODS_CODES: "XXXXX" # Workaround empty string handling
# See https://nhsd-confluence.digital.nhs.uk/spaces/APIMC/pages/1345218865/Mapping+of+Suppliers+to+APIM+Onboarding+Portal+Apps
ENABLED_SUPPLIER_APPLICATION_IDS: "ee353200-2b8f-47be-8b70-d0777e80d92f,30c8d461-e875-4882-85d1-4d5d90f7f17b"
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/run_release_code_and_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ on:
required: false
type: boolean
default: false
ENABLED_SYSTEMS:
required: true
type: string
BLOCKED_SITE_ODS_CODES:
required: true
type: string
Expand Down Expand Up @@ -231,7 +228,6 @@ jobs:
ENABLE_POST_DATED_NOTIFICATIONS: ${{ inputs.ENABLE_POST_DATED_NOTIFICATIONS }}
REQUIRE_APPLICATION_NAME: ${{ inputs.REQUIRE_APPLICATION_NAME }}
ENABLED_SITE_ODS_CODES: ${{ steps.read.outputs.ods_csv }}
ENABLED_SYSTEMS: ${{ inputs.ENABLED_SYSTEMS }}
BLOCKED_SITE_ODS_CODES: ${{ steps.read.outputs.blocked_ods_csv }}
ENABLED_SUPPLIER_APPLICATION_IDS: ${{ inputs.ENABLED_SUPPLIER_APPLICATION_IDS }}
NOTIFY_ROUTING_PLAN_ID: ${{ inputs.NOTIFY_ROUTING_PLAN_ID }}
Expand Down Expand Up @@ -271,7 +267,7 @@ jobs:
- name: Deploy PSU API
shell: bash
working-directory: .github/scripts
if: ${{ inputs.DEPLOY_APIGEE == true && always() && !failure() && !cancelled() }}
if: ${{ inputs.DEPLOY_APIGEE == true }}
env:
API_TYPE: standard
VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }}
Expand All @@ -293,7 +289,7 @@ jobs:
- name: Deploy CPSU API
shell: bash
working-directory: .github/scripts
if: ${{ inputs.DEPLOY_APIGEE_CPSU == true && always() && !failure() && !cancelled() }}
if: ${{ inputs.DEPLOY_APIGEE_CPSU == true }}
env:
API_TYPE: custom
VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }}
Expand Down Expand Up @@ -337,7 +333,7 @@ jobs:
VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }}

regression_tests:
if: ${{ inputs.RUN_REGRESSION_TEST == true && always() && !failure() && !cancelled() }}
if: ${{ inputs.RUN_REGRESSION_TEST == true }}
name: Regression Tests
uses: ./.github/workflows/run_regression_tests.yml
needs: release_code_and_api
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ sam-sync: guard-AWS_DEFAULT_PROFILE guard-stack_name compile
TestPresciptionsParamValue2=$${TEST_PRESCRIPTIONS_2:-PLACEHOLDER} \
TestPresciptionsParamValue3=$${TEST_PRESCRIPTIONS_3:-PLACEHOLDER} \
TestPresciptionsParamValue4=$${TEST_PRESCRIPTIONS_4:-PLACEHOLDER} \
"EnabledSystemsValue=$${ENABLED_SYSTEMS:-Internal Test System}" \
"EnabledSiteODSCodesValue=$${ENABLED_SITE_ODS_CODES:-A83008,FA565}" \
BlockedSiteODSCodesValue=$${BLOCKED_SITE_ODS_CODES:-XXXXX} \
EnabledSupplierApplicationIDsValue=$${ENABLED_SUPPLIER_APPLICATION_IDS:-XXXXX} \
Expand Down Expand Up @@ -78,7 +77,6 @@ sam-deploy: guard-AWS_DEFAULT_PROFILE guard-stack_name
TestPresciptionsParamValue2=$${TEST_PRESCRIPTIONS_2:-PLACEHOLDER} \
TestPresciptionsParamValue3=$${TEST_PRESCRIPTIONS_3:-PLACEHOLDER} \
TestPresciptionsParamValue4=$${TEST_PRESCRIPTIONS_4:-PLACEHOLDER} \
"EnabledSystemsValue=$${ENABLED_SYSTEMS:-Internal Test System}" \
"EnabledSiteODSCodesValue=$${ENABLED_SITE_ODS_CODES:-A83008,FA565}" \
BlockedSiteODSCodesValue=$${BLOCKED_SITE_ODS_CODES:-XXXXX} \
EnabledSupplierApplicationIDsValue=$${ENABLED_SUPPLIER_APPLICATION_IDS:-XXXXX} \
Expand Down
8 changes: 0 additions & 8 deletions SAMtemplates/functions/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ Parameters:
EnabledSiteODSCodesParam:
Type: AWS::SSM::Parameter::Name<String>

EnabledSystemsParam:
Type: AWS::SSM::Parameter::Name<String>

EnabledSupplierApplicationIDsParam:
Type: AWS::SSM::Parameter::Name<String>

Expand Down Expand Up @@ -135,11 +132,6 @@ Resources:
POST_DATED_PRESCRIPTIONS_SQS_QUEUE_URL: !Ref PostDatedNotificationsSQSQueueUrl
ENABLE_POST_DATED_NOTIFICATIONS: !Ref EnablePostDatedNotifications
SQS_SALT: !Ref SQSSaltSecret
# Remove this once we've confirmed that product ID based filtering is working as expected and we
# no longer need the ability to switch back to the old filtering method
USE_APP_ID_FOR_NOTIFICATIONS_FILTERING: true
ENABLED_SYSTEMS_PARAM: !Ref EnabledSystemsParam
#
ENABLED_APPLICATION_IDS_PARAM: !Ref EnabledSupplierApplicationIDsParam
ENABLED_SITE_ODS_CODES_PARAM: !Ref EnabledSiteODSCodesParam
BLOCKED_SITE_ODS_CODES_PARAM: !Ref BlockedSiteODSCodesParam
Expand Down
6 changes: 0 additions & 6 deletions SAMtemplates/main_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ Parameters:
Type: String
Default: " "

EnabledSystemsValue:
Type: String
Default: " "

EnabledSupplierApplicationIDsValue:
Type: String
Default: " "
Expand Down Expand Up @@ -191,7 +187,6 @@ Resources:
EnableNotificationsInternalValue: !Ref EnableNotificationsInternal
EnableNotificationsExternalValue: !Ref EnableNotificationsExternal
EnabledSiteODSCodesValue: !Ref EnabledSiteODSCodesValue
EnabledSystemsValue: !Ref EnabledSystemsValue
EnabledSupplierApplicationIDsValue: !Ref EnabledSupplierApplicationIDsValue
BlockedSiteODSCodesValue: !Ref BlockedSiteODSCodesValue
NotifyRoutingPlanIDValue: !Ref NotifyRoutingPlanIDValue
Expand Down Expand Up @@ -258,7 +253,6 @@ Resources:
EnablePostDatedNotifications: !Ref EnablePostDatedNotifications
SQSSaltSecret: !GetAtt Secrets.Outputs.SQSSaltSecret
EnabledSiteODSCodesParam: !GetAtt Parameters.Outputs.EnabledSiteODSCodesParameterName
EnabledSystemsParam: !GetAtt Parameters.Outputs.EnabledSystemsParameterName
EnabledSupplierApplicationIDsParam: !GetAtt Parameters.Outputs.EnabledSupplierApplicationIDsParameterName
BlockedSiteODSCodesParam: !GetAtt Parameters.Outputs.BlockedSiteODSCodesParameterName
NotifyRoutingPlanIDParam: !GetAtt Parameters.Outputs.NotifyRoutingPlanIDParameterName
Expand Down
19 changes: 0 additions & 19 deletions SAMtemplates/parameters/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ Parameters:
Type: String
Default: " "

EnabledSystemsValue:
Type: String
Default: " "

EnabledSupplierApplicationIDsValue:
Type: String
Default: " "
Expand Down Expand Up @@ -65,14 +61,6 @@ Resources:
Type: String
Value: !Ref EnabledSiteODSCodesValue

EnabledSystemsParameter:
Type: AWS::SSM::Parameter
Properties:
Name: !Sub ${StackName}-PSUNotifyEnabledSystems
Description: "List of application names for which notifications are enabled"
Type: String
Value: !Ref EnabledSystemsValue

EnabledSupplierApplicationIDsParameter:
Type: AWS::SSM::Parameter
Properties:
Expand Down Expand Up @@ -166,7 +154,6 @@ Resources:
- ssm:GetParameters
Resource:
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyEnabledSiteODSCodes
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyEnabledSystems
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyEnabledSupplierApplicationIDs
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyBlockedSiteODSCodes
- !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${StackName}-PSUNotifyRoutingPlanID
Expand All @@ -186,12 +173,6 @@ Outputs:
Export:
Name: !Sub ${StackName}-PSUNotifyEnabledSiteODSCodesParam

EnabledSystemsParameterName:
Description: "Name of the SSM parameter holding enabled system names"
Value: !Ref EnabledSystemsParameter
Export:
Name: !Sub ${StackName}-PSUNotifyEnabledSystemsParam

EnabledSupplierApplicationIDsParameterName:
Description: "Name of the SSM parameter holding enabled supplier apigee application IDs"
Value: !Ref EnabledSupplierApplicationIDsParameter
Expand Down
2 changes: 1 addition & 1 deletion packages/updatePrescriptionStatus/.vitest/setup-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process.env.ENABLE_POST_DATED_NOTIFICATIONS = "true";
process.env.AWS_REGION = "eu-west-2";
process.env.SQS_SALT = "the quick brown fox something something"
process.env.ENABLED_SITE_ODS_CODES_PARAM = "ENABLED_SITE_ODS_CODES_PARAM"
process.env.ENABLED_SYSTEMS_PARAM = "ENABLED_SYSTEMS_PARAM"
process.env.BLOCKED_SITE_ODS_CODES_PARAM = "BLOCKED_SITE_ODS_CODES_PARAM"
process.env.ENABLE_NOTIFICATIONS_PARAM = "ENABLE_NOTIFICATIONS_PARAM"
Comment thread
wildjames marked this conversation as resolved.
process.env.ENABLED_APPLICATION_IDS_PARAM = "ENABLED_APPLICATION_IDS_PARAM"
process.env.REQUIRE_APPLICATION_NAME = "false"
8 changes: 4 additions & 4 deletions packages/updatePrescriptionStatus/src/utils/sqsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,7 @@ export function saltedHash(
export async function getSaltValue(logger: Logger): Promise<string> {
let sqsSalt: string

if (!process.env.SQS_SALT) {
// No secret name configured at all, so fall back
sqsSalt = fallbackSalt
} else {
if (process.env.SQS_SALT) {
try {
// grab the secret, expecting JSON like { "salt": "string" }
const secretJson = await getSecret(process.env.SQS_SALT, {transform: "json"})
Expand All @@ -172,6 +169,9 @@ export async function getSaltValue(logger: Logger): Promise<string> {
logger.error("Failed to fetch SQS_SALT from Secrets Manager, using DEV SALT", {error})
sqsSalt = fallbackSalt
}
} else {
// No secret name configured at all, so fall back
sqsSalt = fallbackSalt
}

if (sqsSalt === fallbackSalt) {
Expand Down
Loading
Loading