Skip to content

Commit 1696064

Browse files
authored
Merge pull request #446 from NHSDigital/release/2024-12-16
Release/2024 12 16
2 parents dd02466 + dbd16cf commit 1696064

File tree

249 files changed

+4438
-11889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+4438
-11889
lines changed

.github/workflows/deploy-nonprod-workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
options:
1212
- dev
1313
- qa
14-
# - int
14+
- int
1515
- ref
1616
sandbox:
1717
description: Do you want to deploy the sandbox version?

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 2024-12-16
4+
- [PI-681] EPR endpoints requirements
5+
- [PI-702] Prod bulk tweak
6+
- [PI-653] EPR create endpoints - forbid duplicate interactions
7+
- [PI-606] ETL Updates, with "add an mhs"
8+
39
## 2024-12-11
410
- [PI-650] Modify the Read Device endpoint for AS Devices
511
- [PI-666] Create an ASID for AS Device and add as a DeviceKey

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024.12.11
1+
2024.12.16

changelog/2024-12-16.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- [PI-681] EPR endpoints requirements
2+
- [PI-702] Prod bulk tweak
3+
- [PI-653] EPR create endpoints - forbid duplicate interactions
4+
- [PI-606] ETL Updates, with "add an mhs"

infrastructure/swagger/05_paths.yaml

Lines changed: 71 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -78,45 +78,49 @@ paths:
7878
- app-level0: []
7979

8080
/ProductTeam/{product_team_id}/Product:
81-
get:
82-
operationId: searchCpmProduct
83-
summary: Retrieve all Products associated with a Product Team (GET)
81+
post:
82+
operationId: createproductendpoint
83+
summary: Create a Product resource (POST)
84+
description: |
85+
This endpoint creates a new Product resource for the specified Product Team.
86+
**Requirements:**
87+
- A valid Product Team must exist
8488
parameters:
8589
- $ref: "#/components/parameters/ProductTeamId"
8690
- $ref: "#/components/parameters/HeaderVersion"
8791
- $ref: "#/components/parameters/HeaderRequestId"
8892
- $ref: "#/components/parameters/HeaderCorrelationId"
93+
requestBody:
94+
$ref: "#/components/requestBodies/ProductCreateRequestBody"
8995
responses:
90-
"200":
91-
$ref: "#/components/responses/ProductSearch"
96+
"201":
97+
$ref: "#/components/responses/ProductCreate"
98+
"400":
99+
$ref: "#/components/responses/BadRequest"
92100
"404":
93101
$ref: "#/components/responses/NotFound"
94102
x-amazon-apigateway-integration:
95103
<<: *ApiGatewayIntegration
96-
uri: ${method_searchCpmProduct}
104+
uri: ${method_createCpmProduct}
97105
security:
98106
- ${authoriser_name}: []
99107
- app-level0: []
100-
post:
101-
operationId: createproductendpoint
102-
summary: Create a Product resource (POST)
108+
get:
109+
operationId: searchCpmProduct
110+
summary: Retrieve all Products associated with a Product Team (GET)
103111
parameters:
104112
- $ref: "#/components/parameters/ProductTeamId"
105113
- $ref: "#/components/parameters/HeaderVersion"
106114
- $ref: "#/components/parameters/HeaderRequestId"
107115
- $ref: "#/components/parameters/HeaderCorrelationId"
108-
requestBody:
109-
$ref: "#/components/requestBodies/ProductCreateRequestBody"
110116
responses:
111-
"201":
112-
$ref: "#/components/responses/ProductCreate"
113-
"400":
114-
$ref: "#/components/responses/BadRequest"
117+
"200":
118+
$ref: "#/components/responses/ProductSearch"
115119
"404":
116120
$ref: "#/components/responses/NotFound"
117121
x-amazon-apigateway-integration:
118122
<<: *ApiGatewayIntegration
119-
uri: ${method_createCpmProduct}
123+
uri: ${method_searchCpmProduct}
120124
security:
121125
- ${authoriser_name}: []
122126
- app-level0: []
@@ -142,7 +146,6 @@ paths:
142146
security:
143147
- ${authoriser_name}: []
144148
- app-level0: []
145-
146149
delete:
147150
operationId: deleteproductendpoint
148151
summary: Delete a Product resource (DELETE)
@@ -168,6 +171,10 @@ paths:
168171
post:
169172
operationId: createproductforeprendpoint
170173
summary: Create an EPR Product resource (POST)
174+
description: |
175+
This endpoint creates a new EPR Product resource for the specified Product Team.
176+
**Requirements:**
177+
- A valid Product Team must exist
171178
parameters:
172179
- $ref: "#/components/parameters/ProductTeamId"
173180
- $ref: "#/components/parameters/HeaderVersion"
@@ -190,47 +197,48 @@ paths:
190197
- app-level0: []
191198

192199
/ProductTeam/{product_team_id}/Product/{product_id}/DeviceReferenceData:
193-
get:
194-
operationId: searchDeviceReferenceData
195-
summary: Retrieve all Data Reference Data resources associated with a Product (GET)
200+
post:
201+
operationId: createDeviceReferenceData
202+
summary: Create a Device Reference Data resource (POST)
203+
description: This endpoint has not yet been configured. Do not use.
196204
parameters:
197205
- $ref: "#/components/parameters/ProductTeamId"
198206
- $ref: "#/components/parameters/ProductId"
199207
- $ref: "#/components/parameters/HeaderVersion"
200208
- $ref: "#/components/parameters/HeaderRequestId"
201209
- $ref: "#/components/parameters/HeaderCorrelationId"
210+
requestBody:
211+
$ref: "#/components/requestBodies/DeviceReferenceDataCreateRequestBody"
202212
responses:
203-
"200":
204-
$ref: "#/components/responses/DeviceRefDataSearch"
213+
"201":
214+
$ref: "#/components/responses/DeviceRefDataCreate"
215+
"400":
216+
$ref: "#/components/responses/BadRequest"
205217
"404":
206218
$ref: "#/components/responses/NotFound"
207219
x-amazon-apigateway-integration:
208220
<<: *ApiGatewayIntegration
209-
uri: ${method_searchDeviceReferenceData}
221+
uri: ${method_createDeviceReferenceData}
210222
security:
211223
- ${authoriser_name}: []
212224
- app-level0: []
213-
post:
214-
operationId: createDeviceReferenceData
215-
summary: Create a Device Reference Data resource (POST)
225+
get:
226+
operationId: searchDeviceReferenceData
227+
summary: Retrieve all Data Reference Data resources associated with a Product (GET)
216228
parameters:
217229
- $ref: "#/components/parameters/ProductTeamId"
218230
- $ref: "#/components/parameters/ProductId"
219231
- $ref: "#/components/parameters/HeaderVersion"
220232
- $ref: "#/components/parameters/HeaderRequestId"
221233
- $ref: "#/components/parameters/HeaderCorrelationId"
222-
requestBody:
223-
$ref: "#/components/requestBodies/DeviceReferenceDataCreateRequestBody"
224234
responses:
225-
"201":
226-
$ref: "#/components/responses/DeviceRefDataCreate"
227-
"400":
228-
$ref: "#/components/responses/BadRequest"
235+
"200":
236+
$ref: "#/components/responses/DeviceRefDataSearch"
229237
"404":
230238
$ref: "#/components/responses/NotFound"
231239
x-amazon-apigateway-integration:
232240
<<: *ApiGatewayIntegration
233-
uri: ${method_createDeviceReferenceData}
241+
uri: ${method_searchDeviceReferenceData}
234242
security:
235243
- ${authoriser_name}: []
236244
- app-level0: []
@@ -239,6 +247,12 @@ paths:
239247
: post:
240248
operationId: createDeviceReferenceDataMessageSet
241249
summary: Create a Device Reference Data Message Set resource (POST)
250+
description: |
251+
This endpoint creates a Device Reference Data Message Set resource for the specified Product.
252+
**Requirements:**
253+
- A valid Product Team must exist
254+
- A valid EPR Product must already exist under the Product Team
255+
- There can be no existing MHS MessageSet DRD for the EPR Product already
242256
parameters:
243257
- $ref: "#/components/parameters/ProductTeamId"
244258
- $ref: "#/components/parameters/ProductId"
@@ -265,6 +279,12 @@ paths:
265279
: post:
266280
operationId: createDeviceReferenceDataAdditionalInteractions
267281
summary: Create a Device Reference Data Additional Interactions resource (POST)
282+
description: |
283+
This endpoint creates a Device Reference Data Additional Interactions resource for the specified Product.
284+
**Requirements:**
285+
- A valid Product Team must exist
286+
- A valid EPR Product must already exist under the Product Team
287+
- There can be no existing AS AdditionalInteractions DRD for the EPR Product already
268288
parameters:
269289
- $ref: "#/components/parameters/ProductTeamId"
270290
- $ref: "#/components/parameters/ProductId"
@@ -314,6 +334,8 @@ paths:
314334
post:
315335
operationId: createDevice
316336
summary: Create a Device resource (POST)
337+
description: |
338+
This endpoint has not yet been configured. Do not use.
317339
parameters:
318340
- $ref: "#/components/parameters/ProductTeamId"
319341
- $ref: "#/components/parameters/ProductId"
@@ -363,6 +385,14 @@ paths:
363385
: post:
364386
operationId: createDeviceMessageHandlingSystem
365387
summary: Create a Message Handling System Device resource (POST)
388+
description: |
389+
This endpoint creates a new Message Handling System Device resource for the specified Product.
390+
**Requirements:**
391+
- A valid Product Team must exist
392+
- A valid Product must exist under the Product Team
393+
- One existing MHS Message Set Device Reference Data must be present for the Product
394+
- No existing MHS device for the product
395+
- Must provide a spine_mhs questionnaire response
366396
parameters:
367397
- $ref: "#/components/parameters/ProductTeamId"
368398
- $ref: "#/components/parameters/ProductId"
@@ -389,6 +419,14 @@ paths:
389419
post:
390420
operationId: createDeviceAccreditedSystem
391421
summary: Create a Accredited System Device resource (POST)
422+
description: |
423+
This endpoint creates a new Accredited System Device resource for the specified Product.
424+
**Requirements:**
425+
- A valid Product Team must exist
426+
- A valid Product must exist under the Product Team
427+
- One existing MHS Message Set Device Reference Data must be present for the Product
428+
- One existing AS Additional Interactions Device Reference Data must be present for the Product
429+
- Must provide a spine_as questionnaire response
392430
parameters:
393431
- $ref: "#/components/parameters/ProductTeamId"
394432
- $ref: "#/components/parameters/ProductId"

infrastructure/swagger/12_components--responses.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ components:
5555
message: "Require a 'spine_mhs' questionnaire response to create a MHS Device"
5656
- code: "VALIDATION_ERROR"
5757
message: "Not an EPR Product: Cannot create MHS device for product without exactly one Party Key"
58+
- code: "VALIDATION_ERROR"
59+
message: "Duplicate 'Interaction ID' provided: value '<INTERACTION ID>' occurs <N> times in the questionnaire response."
5860
SdsSearchDeviceBadRequest:
5961
description: searchSDSDevice Bad request
6062
content:
235 KB
Loading

infrastructure/terraform/per_workspace/modules/etl/sds/etl-diagram--bulk-transform-and-load.asl.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
},
6868
"Map": {
6969
"Type": "Map",
70+
"MaxConcurrency": 10,
7071
"ItemProcessor": {
7172
"ProcessorConfig": {
7273
"Mode": "INLINE"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "connecting-party-manager"
3-
version = "2024.12.11"
3+
version = "2024.12.16"
44
description = "Repository for the Connecting Party Manager API and related services"
55
authors = ["NHS England"]
66
license = "LICENSE.md"

scripts/etl/clear_state_inputs.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import boto3
1111
from etl_utils.constants import CHANGELOG_NUMBER, WorkerKey
1212
from etl_utils.io import pkl_dumps_lz4
13-
from sds.epr.bulk_create.bulk_load_fanout import FANOUT
1413

14+
from etl.sds.tests.etl_test_utils.etl_state import _delete_objects_by_prefix
1515
from test_helpers.aws_session import aws_session
1616
from test_helpers.terraform import read_terraform_output
1717

@@ -38,12 +38,9 @@ def main(changelog_number, workspace):
3838
s3_client.put_object(
3939
Bucket=etl_bucket, Key=WorkerKey.LOAD, Body=EMPTY_JSON_DATA
4040
)
41-
for i in range(FANOUT):
42-
s3_client.put_object(
43-
Bucket=etl_bucket,
44-
Key=f"{WorkerKey.LOAD}.{i}",
45-
Body=pkl_dumps_lz4(EMPTY_JSON_DATA),
46-
)
41+
_delete_objects_by_prefix(
42+
s3_client=s3_client, bucket=etl_bucket, key_prefix=f"{WorkerKey.LOAD}."
43+
)
4744
s3_client.delete_object(Bucket=etl_bucket, Key=CHANGELOG_NUMBER)
4845

4946
if changelog_number:

0 commit comments

Comments
 (0)