Conversation
61703dc to
d9a4b1a
Compare
16dabad to
d9a4b1a
Compare
infrastructure/terraform/components/dl/cloudwatch_event_rule_letter_prepared.tf
Show resolved
Hide resolved
| ] | ||
|
|
||
| resources = [ | ||
| "arn:aws:sqs:${var.region}:${var.aws_account_id}:${var.project}-${var.environment}-${local.component}-print-sender-queue" |
There was a problem hiding this comment.
tiny one, is it worth using ${local.csi} instead of ${var.project}-${var.environment}-${local.component}? from the file terraform/components/dl/locals_tfscaffold.tf:
csi = replace(
format(
"%s-%s-%s",
var.project,
var.environment,
local.component,
),
"_",
"",
)
a35e9f1 to
4ba840b
Compare
tests/playwright/digital-letters-component-tests/print-sender.component.spec.ts
Show resolved
Hide resolved
| module "eventpub" { | ||
| source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.30/terraform-eventpub.zip" | ||
|
|
||
| name = "eventpub" |
There was a problem hiding this comment.
is this how we expose the events to the digital letters API? just wondering if the name should be a bit more descriptive.
lambdas/print-sender-lambda/src/__tests__/app/print-sender.test.ts
Outdated
Show resolved
Hide resolved
lambdas/print-sender-lambda/src/__tests__/app/print-sender.test.ts
Outdated
Show resolved
Hide resolved
lambdas/print-sender-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts
Show resolved
Hide resolved
lambdas/print-sender-lambda/src/__tests__/apis/sqs-trigger-lambda.test.ts
Show resolved
Hide resolved
…validate-private-key.test.ts
gareth-allan
left a comment
There was a problem hiding this comment.
A couple of last comments, but it otherwise looks good!
|
|
||
| create_dlq = true | ||
| create_dlq = true | ||
| max_receive_count = 1 |
There was a problem hiding this comment.
Why set the max receive count to 1 for this lambda? Do we not want to benefit from automatic retries before sending a message to the DLQ?
| export const HANDLE_TTL_DLQ_NAME = `${CSI}-ttl-handle-expiry-errors-queue`; | ||
| export const PRINT_ANALYSER_DLQ_NAME = `${CSI}-print-analyser-dlq`; | ||
| export const PRINT_SENDER_DLQ_NAME = `${CSI}-print-sender-dlq`; | ||
| export const EVENT_PUBLISHER_DLQ_NAME = `${CSI}-event-publisher-errors`; |
There was a problem hiding this comment.
Is EVENT_PUBLISHER_DLQ_NAME used anywhere?
Description
Create new Print Sender component that triggers a Letter Prepared Event to be eventually passed to the Supplier API from a Letter Analysed Event.
Contains changes from #174 to pull packages from GitHub.
Note: When merging main, @nhsdigital/nhs-notify-event-schemas-supplier-api was updated to 1.0.10, which introduces a breaking change requiring billingRef in the events. As this change is not yet supported, the dependency has been temporarily pinned to 1.0.6.
Test evidence
Print Sender logs
Event Bus logs
Input Letter Analysed event + Output Letter Prepared event

Event is published to the cross domain event bus

Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.