Skip to content

Commit 1c7b186

Browse files
authored
Merge pull request #348 from NHSDigital/release/2024-10-09
Release/2024-10-09
2 parents 7718325 + 9fbeaae commit 1c7b186

Some content is hidden

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

50 files changed

+1592
-64
lines changed

.github/actions/components/caching/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ runs:
3333
shell: bash
3434
run: echo "date=$(date +'%Y-%m-%d-%M:%S')" >> $GITHUB_OUTPUT
3535

36+
- if: ${{ inputs.save-or-restore == 'restore' }}
37+
id: timestamp--reset
38+
uses: ./.github/actions/make/
39+
with:
40+
command: timestamp--reset FILEPATH=.
41+
save-to-cache: "false"
42+
restore-from-cache: "false"
43+
3644
- if: ${{ inputs.save-or-restore == 'restore' }}
3745
id: restore-cache
3846
uses: actions/cache/restore@v3

.github/workflows/_deploy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ jobs:
7373
needs: [get-branch-from-workflow-file, build]
7474
runs-on: [self-hosted, ci]
7575
steps:
76+
- uses: actions/checkout@v4
77+
with:
78+
ref: ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
7679
- uses: ./.github/actions/terraform/
7780
with:
7881
command: init
@@ -87,6 +90,9 @@ jobs:
8790
needs: [get-branch-from-workflow-file, terraform--init]
8891
runs-on: [self-hosted, ci]
8992
steps:
93+
- uses: actions/checkout@v4
94+
with:
95+
ref: ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
9096
- uses: ./.github/actions/terraform/
9197
with:
9298
command: plan
@@ -102,6 +108,9 @@ jobs:
102108
environment: ${{ inputs.account }}
103109
runs-on: [self-hosted, ci]
104110
steps:
111+
- uses: actions/checkout@v4
112+
with:
113+
ref: ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
105114
- uses: ./.github/actions/terraform/
106115
with:
107116
command: apply
@@ -116,6 +125,9 @@ jobs:
116125
needs: [get-branch-from-workflow-file, terraform--apply]
117126
runs-on: [self-hosted, ci]
118127
steps:
128+
- uses: actions/checkout@v4
129+
with:
130+
ref: ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
119131
- uses: ./.github/actions/make/
120132
if: ${{ env.SCOPE == 'per_workspace'}}
121133
with:
@@ -137,6 +149,9 @@ jobs:
137149
needs: [get-branch-from-workflow-file, apigee--deploy]
138150
runs-on: [self-hosted, ci]
139151
steps:
152+
- uses: actions/checkout@v4
153+
with:
154+
ref: ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
140155
- if: ${{ env.ACCOUNT != 'mgmt'}}
141156
uses: ./.github/actions/make/
142157
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ cpm.cdx.json
8585
# test output files
8686
test_failure.json
8787
test_success_*.json
88+
pyrightconfig.json

CHANGELOG.md

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

3+
## 2024-10-09
4+
- [PI-504] Delete product
5+
- [PI-498] Search products
6+
- [PI-549] Fix flaky CI
7+
38
## 2024-10-07
49
- [PI-505] Create EPR Product
510
- [PI-538] Increase rate limiting

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024.10.07
1+
2024.10.09

changelog/2024-10-09.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [PI-504] Delete product
2+
- [PI-498] Search products
3+
- [PI-549] Fix flaky CI

docs/public_swagger/swagger.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,12 @@ paths:
367367
description: logical identifier
368368
schema:
369369
type: string
370+
- $ref: "#/components/parameters/profileParam"
371+
- $ref: "#/components/parameters/lastUpdatedParam"
372+
- $ref: "#/components/parameters/tagParam"
373+
- $ref: "#/components/parameters/securityParam"
374+
- $ref: "#/components/parameters/sourceParam"
375+
- $ref: "#/components/parameters/idParam"
370376
- in: header
371377
name: version
372378
schema:
@@ -393,6 +399,47 @@ paths:
393399
schema:
394400
$ref: "#/components/schemas/OperationOutcome"
395401
/ProductTeam/{product_team_id}/Product:
402+
get:
403+
operationId: searchCpmProduct
404+
summary: searchCpmProduct endpoint for APIGEE integration
405+
parameters:
406+
- name: product_team_id
407+
in: path
408+
required: true
409+
description: logical identifier
410+
schema:
411+
type: string
412+
- $ref: "#/components/parameters/profileParam"
413+
- $ref: "#/components/parameters/lastUpdatedParam"
414+
- $ref: "#/components/parameters/tagParam"
415+
- $ref: "#/components/parameters/securityParam"
416+
- $ref: "#/components/parameters/sourceParam"
417+
- $ref: "#/components/parameters/idParam"
418+
- in: header
419+
name: version
420+
schema:
421+
$ref: "#/components/schemas/Version"
422+
- in: header
423+
name: x-request-id
424+
schema:
425+
$ref: "#/components/schemas/RequestId"
426+
- in: header
427+
name: x-correlation-id
428+
schema:
429+
$ref: "#/components/schemas/CorrelationId"
430+
responses:
431+
"200":
432+
description: Search CpmProducts operation successful
433+
content:
434+
application/fhir+json:
435+
schema:
436+
$ref: "#/components/schemas/Bundle"
437+
"4XX":
438+
description: "Client Error"
439+
content:
440+
application/fhir+json:
441+
schema:
442+
$ref: "#/components/schemas/OperationOutcome"
396443
post:
397444
operationId: createproductendpoint
398445
summary: createProduct endpoint for APIGEE integration
@@ -480,6 +527,47 @@ paths:
480527
application/fhir+json:
481528
schema:
482529
$ref: "#/components/schemas/OperationOutcome"
530+
delete:
531+
operationId: deleteproductendpoint
532+
summary: deleteProduct endpoint for APIGEE integration
533+
parameters:
534+
- name: product_team_id
535+
in: path
536+
required: true
537+
description: logical identifier
538+
schema:
539+
type: string
540+
- name: product_id
541+
in: path
542+
required: true
543+
description: logical identifier
544+
schema:
545+
type: string
546+
- in: header
547+
name: version
548+
schema:
549+
$ref: "#/components/schemas/Version"
550+
- in: header
551+
name: x-request-id
552+
schema:
553+
$ref: "#/components/schemas/RequestId"
554+
- in: header
555+
name: x-correlation-id
556+
schema:
557+
$ref: "#/components/schemas/CorrelationId"
558+
responses:
559+
"204":
560+
description: Delete Product operation successful
561+
content:
562+
application/fhir+json:
563+
schema:
564+
$ref: "#/components/schemas/Bundle"
565+
"4XX":
566+
description: "Client Error"
567+
content:
568+
application/fhir+json:
569+
schema:
570+
$ref: "#/components/schemas/OperationOutcome"
483571
/ProductTeam/{product_team_id}/Product/Epr:
484572
post:
485573
operationId: createproductforeprendpoint

infrastructure/swagger/05_paths.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ paths:
134134
description: logical identifier
135135
schema:
136136
type: string
137+
- $ref: "#/components/parameters/profileParam"
138+
- $ref: "#/components/parameters/lastUpdatedParam"
139+
- $ref: "#/components/parameters/tagParam"
140+
- $ref: "#/components/parameters/securityParam"
141+
- $ref: "#/components/parameters/sourceParam"
142+
- $ref: "#/components/parameters/idParam"
137143
- *RequestHeaderVersion
138144
- *RequestHeaderRequestId
139145
- *RequestHeaderCorrelationId
@@ -154,6 +160,40 @@ paths:
154160
- app-level0: []
155161

156162
/ProductTeam/{product_team_id}/Product:
163+
get:
164+
operationId: searchCpmProduct
165+
summary: searchCpmProduct endpoint for APIGEE integration
166+
parameters:
167+
- name: product_team_id
168+
in: path
169+
required: true
170+
description: logical identifier
171+
schema:
172+
type: string
173+
- $ref: "#/components/parameters/profileParam"
174+
- $ref: "#/components/parameters/lastUpdatedParam"
175+
- $ref: "#/components/parameters/tagParam"
176+
- $ref: "#/components/parameters/securityParam"
177+
- $ref: "#/components/parameters/sourceParam"
178+
- $ref: "#/components/parameters/idParam"
179+
- *RequestHeaderVersion
180+
- *RequestHeaderRequestId
181+
- *RequestHeaderCorrelationId
182+
responses:
183+
"200":
184+
description: Search CpmProducts operation successful
185+
content:
186+
application/fhir+json:
187+
schema:
188+
$ref: "#/components/schemas/Bundle"
189+
"4XX":
190+
<<: *Response4XX
191+
x-amazon-apigateway-integration:
192+
<<: *ApiGatewayIntegration
193+
uri: ${method_searchCpmProduct}
194+
security:
195+
- ${authoriser_name}: []
196+
- app-level0: []
157197
post:
158198
operationId: createproductendpoint
159199
summary: createProduct endpoint for APIGEE integration
@@ -226,6 +266,42 @@ paths:
226266
- ${authoriser_name}: []
227267
- app-level0: []
228268

269+
delete:
270+
operationId: deleteproductendpoint
271+
summary: deleteProduct endpoint for APIGEE integration
272+
parameters:
273+
- name: product_team_id
274+
in: path
275+
required: true
276+
description: logical identifier
277+
schema:
278+
type: string
279+
- name: product_id
280+
in: path
281+
required: true
282+
description: logical identifier
283+
schema:
284+
type: string
285+
- *RequestHeaderVersion
286+
- *RequestHeaderRequestId
287+
- *RequestHeaderCorrelationId
288+
responses:
289+
responses:
290+
"204":
291+
description: Delete Product operation successful
292+
content:
293+
application/fhir+json:
294+
schema:
295+
$ref: "#/components/schemas/Bundle"
296+
"4XX":
297+
<<: *Response4XX
298+
x-amazon-apigateway-integration:
299+
<<: *ApiGatewayIntegration
300+
uri: ${method_deleteCpmProduct}
301+
security:
302+
- ${authoriser_name}: []
303+
- app-level0: []
304+
229305
/ProductTeam/{product_team_id}/Product/Epr:
230306
post:
231307
operationId: createproductforeprendpoint

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.10.07"
3+
version = "2024.10.09"
44
description = "Repository for the Connecting Party Manager API and related services"
55
authors = ["NHS England"]
66
license = "LICENSE.md"

scripts/builder/build.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,10 @@ generate--sbom: build
4545

4646
validate--sbom: generate--sbom
4747
grype sbom:./cpm.cdx.json --fail-on CRITICAL
48+
49+
timestamp--reset:
50+
@if [ -z "$(FILEPATH)" ]; then \
51+
echo "Error: FILEPATH not provided"; \
52+
exit 1; \
53+
fi
54+
FILEPATH=$(FILEPATH) bash $(CURDIR)/scripts/builder/timestamp_reset.sh

0 commit comments

Comments
 (0)