Conversation
0da8129 to
bab96e7
Compare
… back to recordId from SQS
ae5f4af to
4f2f398
Compare
infrastructure/terraform/components/dl/module_s3bucket_reporting.tf
Outdated
Show resolved
Hide resolved
| logger.error({ err: result.reason }); | ||
| processed.failed += 1; |
There was a problem hiding this comment.
These are not covered by unit tests. If we can get them tested we can remove the coverage thresholds in the jest config file.
| const { reportDate, senderId } = event.data; | ||
|
|
||
| try { | ||
| const query = fs.readFileSync('/var/task/queries/report.sql', 'utf8'); |
There was a problem hiding this comment.
Is this the pattern we've followed else where? The reports in core use saved athena queries rather than a local file.
There was a problem hiding this comment.
Yes I copied this from core but happy to start using saved queries.
| statement { | ||
| sid = "SQSDLQPermissions" | ||
| effect = "Allow" | ||
|
|
||
| actions = [ | ||
| "sqs:SendMessage", | ||
| ] | ||
|
|
||
| resources = [ | ||
| module.sqs_report_generator.sqs_dlq_arn, | ||
| ] | ||
| } |
There was a problem hiding this comment.
Do we need these permissions now we're not sending directly to the DLQ?
| { | ||
| "dependencies": { | ||
| "@aws-sdk/client-athena": "^3.984.0", | ||
| "@aws-sdk/client-sqs": "^3.984.0", |
There was a problem hiding this comment.
Not sure we need this if we're no longer sending events directly to the DLQ.
| | **Uk.nhs.notify.digital.letters.print.printed.v1** | [`../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.printed.v1-event.json`](../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.printed.v1-event.json) | [`../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.printed.v1-event.md`](../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.print.printed.v1-event.md) | | ||
| | **Uk.nhs.notify.digital.letters.queue.item.dequeued.v1** | [`../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.json`](../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.json) | [`../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.md`](../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.dequeued.v1-event.md) | | ||
| | **Uk.nhs.notify.digital.letters.queue.item.enqueued.v1** | [`../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1-event.json`](../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1-event.json) | [`../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1-event.md`](../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.enqueued.v1-event.md) | | ||
| | **Uk.nhs.notify.digital.letters.queue.item.removed.v1** | [`../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.removed.v1-event.json`](../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.removed.v1-event.json) | [`../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.removed.v1-event.md`](../../output/digital-letters/2025-10-draft/example-events/uk.nhs.notify.digital.letters.queue.item.removed.v1-event.md) | |
There was a problem hiding this comment.
Shouldn't we have a new entry for uk.nhs.notify.digital.letters.queue.digital.letter.read.v1
There was a problem hiding this comment.
I might need some help figuring out what's missing here! I see that it's missing from src/cloudevents/readme-index.yaml but I'm not sure what else should be added.
Description
Generate report component.

Testing
Generate Report Event

Report Generated in S3

Report Generated Event

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.