Skip to content

Commit f1c03e9

Browse files
committed
Make attribute name optional. Deploy to int environment. Add manual check for attribute name in PSU lambda
1 parent 2a109c4 commit f1c03e9

3 files changed

Lines changed: 47 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,41 @@ jobs:
186186
REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }}
187187
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.QA_CLOUD_FORMATION_DEPLOY_ROLE }}
188188
PROXYGEN_ROLE: ${{ secrets.PROXYGEN_PTL_ROLE }}
189+
190+
# TODO: DELETEME
191+
release_int:
192+
needs: [tag_release, package_code, get_commit_id]
193+
uses: ./.github/workflows/run_release_code_and_api.yml
194+
with:
195+
ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}}
196+
STACK_NAME: psu
197+
AWS_ENVIRONMENT: int
198+
APIGEE_ENVIRONMENT: int
199+
ENABLE_MUTUAL_TLS: true
200+
BUILD_ARTIFACT: packaged_code
201+
TRUSTSTORE_FILE: psu-truststore.pem
202+
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
203+
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
204+
LOG_LEVEL: DEBUG
205+
LOG_RETENTION_DAYS: 30
206+
CREATE_INT_RELEASE_NOTES: true
207+
CREATE_INT_RC_RELEASE_NOTES: true
208+
DEPLOY_APIGEE: true
209+
DYNAMODB_AUTOSCALE: false
210+
DEPLOY_APIGEE_CPSU: true
211+
DEPLOY_CHECK_PRESCRIPTION_STATUS_UPDATE: true
212+
ENABLE_ALERTS: true
213+
RUN_REGRESSION_TEST: true
214+
STATE_MACHINE_LOG_LEVEL: ALL
215+
ENABLE_NOTIFICATIONS_INTERNAL: true
216+
ENABLE_NOTIFICATIONS_EXTERNAL: false
217+
MTLS_KEY: psu-mtls-1
218+
IS_PULL_REQUEST: false
219+
secrets:
220+
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.INT_CLOUD_FORMATION_DEPLOY_ROLE }}
221+
DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
222+
INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
223+
PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
224+
DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}
225+
PROXYGEN_ROLE: ${{ secrets.PROXYGEN_PROD_ROLE }}
226+
REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }}

packages/specification/eps-prescription-status-update-api.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ paths:
239239
description: |
240240
Please ensure that any non-ASCII characters, including symbols like '+', in URL query string parameters are properly URL encoded.
241241
242-
URL encoding replaces unsafe characters with a "%" followed by two hexadecimal digits, and spaces are typically replaced with a plus (+) sign or "%20".
242+
URL encoding replaces unsafe characters with a "%" followed by two hexadecimal digits, and spaces are typically replaced with a plus (+) sign or "%20".
243243
244244
The prescription id to return prescription status updates for
245245
- in: header
@@ -301,7 +301,7 @@ paths:
301301
## Overview
302302
This endpoint provides a callback for the NHS notifications service to update the
303303
Prescription Status Update API on the delivery status of requested notifications.
304-
304+
305305
Please refer to [their documentation](https://digital.nhs.uk/developer/api-catalogue/nhs-notify#post-/%3Cclient-provided-message-status-URI%3E) for more detail on the request schema.
306306
parameters:
307307
- in: header
@@ -455,7 +455,7 @@ x-nhsd-apim:
455455
secret: psu-mtls-1
456456
target-attributes:
457457
- name: name
458-
required: true
458+
required: false
459459
- name: show-all-suppliers
460460
required: false
461461
header: show-all-suppliers

packages/updatePrescriptionStatus/src/updatePrescriptionStatus.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ const lambdaHandler = async (event: APIGatewayProxyEvent): Promise<APIGatewayPro
7575
})
7676
let responseEntries: Array<BundleEntry> = []
7777

78+
// Check for target attribute name header
79+
if (!event.headers["attribute-name"]) {
80+
logger.error("Missing `attribute-name` in request headers")
81+
return response(400, responseEntries)
82+
}
83+
7884
const xRequestID = getXRequestID(event, responseEntries)
7985
const applicationName = event.headers["attribute-name"] ?? "unknown"
8086

0 commit comments

Comments
 (0)