Skip to content

CCM-14205#65

Merged
rhyscoxnhs merged 2 commits intomainfrom
feature/CCM-14205
Mar 30, 2026
Merged

CCM-14205#65
rhyscoxnhs merged 2 commits intomainfrom
feature/CCM-14205

Conversation

@rhyscoxnhs
Copy link
Copy Markdown
Contributor

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

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.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@rhyscoxnhs rhyscoxnhs changed the title CCM-14205 - Enabled XRay tracing CCM-14205 Mar 25, 2026
@rhyscoxnhs rhyscoxnhs marked this pull request as ready for review March 25, 2026 16:51
@rhyscoxnhs rhyscoxnhs requested review from a team as code owners March 25, 2026 16:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a reusable tests/test-support workspace for AWS/deployment helpers, adds a new tests/performance Jest workspace for running load tests against a live AWS deployment, and hardens logging by enabling Pino redaction of sensitive fields. It also bumps shared Terraform module versions and enables X-Ray tracing for the transform/filter Lambda (conditionally).

Changes:

  • Add tests/test-support helpers (AWS clients, deployment naming, SQS URL builders) and consume them from integration/performance tests.
  • Add a new tests/performance workspace with Jest config, global setup/teardown (S3 seed/cleanup), and a Lambda throughput/latency test reading CloudWatch Logs Insights.
  • Enable Pino redaction in @nhs-notify-client-callbacks/logger and update Terraform shared module versions (3.0.6 → 3.0.7) including conditional X-Ray tracing.

Reviewed changes

Copilot reviewed 43 out of 46 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/client-subscriptions-management/client-subscriptions-management Adds a bash wrapper to run the TypeScript CLI via tsx.
tests/test-support/tsconfig.json Adds TS config for the new test-support workspace.
tests/test-support/package.json Defines the test-support workspace package and exports.
tests/test-support/helpers/sqs.ts Adds SQS queue URL builders based on deployment naming.
tests/test-support/helpers/index.ts Re-exports test-support helpers.
tests/test-support/helpers/deployment.ts Adds deployment detail loading and resource-name builders.
tests/test-support/helpers/clients.ts Adds AWS SDK client factories (SQS/S3/CloudWatch Logs).
tests/performance/tsconfig.json Adds TS config for the new performance test workspace (incl. helpers path).
tests/performance/package.json Adds performance test workspace package and dependencies.
tests/performance/lambda-throughput.test.ts Adds the main load/latency performance test.
tests/performance/jest.global-teardown.ts Removes perf client subscription config from S3 after tests.
tests/performance/jest.global-setup.ts Seeds perf client subscription config into S3 before tests.
tests/performance/jest.config.ts Adds Jest config for performance workspace (serial, forceExit, helpers mapper).
tests/performance/helpers/sqs.ts Adds SQS send utilities and load generation helper.
tests/performance/helpers/index.ts Re-exports performance helper modules.
tests/performance/helpers/event-factories.ts Adds perf test event generators for Message/Channel status events.
tests/performance/helpers/deployment.ts Adds perf helper for transform/filter Lambda log group naming.
tests/performance/helpers/cloudwatch.ts Adds CloudWatch log collection + Logs Insights percentile query utilities.
tests/performance/README.md Documents prerequisites and how to run performance tests.
tests/integration/tsconfig.json Removes paths mapping from integration TS config (keeps isolatedModules).
tests/integration/package.json Adds dependency on the new test-support workspace.
tests/integration/metrics.test.ts Switches shared helpers to test-support and local helpers to relative imports.
tests/integration/jest.global-teardown.ts Switches shared helpers import to test-support package.
tests/integration/jest.global-setup.ts Switches shared helpers import to test-support package.
tests/integration/jest.config.ts Removes helpers moduleNameMapper now that tests use relative imports.
tests/integration/infrastructure-exists.test.ts Switches shared helpers import to test-support package.
tests/integration/helpers/sqs.ts Removes duplicated queue URL builder logic now provided by test-support.
tests/integration/helpers/index.ts Deletes the old barrel export previously used by the helpers alias.
tests/integration/event-bus-to-webhook.test.ts Switches shared helpers to test-support and local helpers to relative imports.
tests/integration/dlq-redrive.test.ts Switches shared helpers to test-support and local helpers to relative imports.
src/logger/src/index.ts Adds REDACT_PATHS and configures Pino redaction.
src/logger/src/tests/redaction.test.ts Adds unit tests covering Pino redaction behavior.
src/logger/src/tests/index.test.ts Extends logger config tests to assert redaction config.
scripts/config/vale/styles/config/vocabularies/words/accept.txt Updates Vale accepted vocabulary entries.
scripts/config/sonar-scanner.properties Updates sonar coverage exclusions to include test-support path.
package.json Adds new workspaces (tests/performance, tests/test-support).
package-lock.json Updates lockfile for new workspaces/dependencies and workspace links.
infrastructure/terraform/modules/client-destination/module_target_dlq.tf Bumps shared SQS module version to 3.0.7.
infrastructure/terraform/modules/client-destination/README.md Updates generated module source reference to 3.0.7.
infrastructure/terraform/components/callbacks/s3_bucket_client_config.tf Bumps shared S3 bucket module version to 3.0.7.
infrastructure/terraform/components/callbacks/module_transform_filter_lambda.tf Bumps shared Lambda module version and enables X-Ray tracing conditionally.
infrastructure/terraform/components/callbacks/module_sqs_inbound_event.tf Bumps shared SQS module version to 3.0.7.
infrastructure/terraform/components/callbacks/module_mock_webhook_lambda.tf Bumps shared Lambda module version to 3.0.7.
infrastructure/terraform/components/callbacks/module_kms.tf Bumps shared KMS module version to 3.0.7.
infrastructure/terraform/components/callbacks/README.md Updates generated module source references to 3.0.7.
eslint.config.mjs Adds new tsconfigs to typed linting and updates rule overrides for new test workspaces.
Comments suppressed due to low confidence (2)

tests/integration/package.json:23

  • @aws-sdk/client-sqs is listed in both dependencies and devDependencies. This duplicates installs and can cause version drift; keep it in just one section (typically dependencies for a test workspace that executes against AWS).
    "@aws-sdk/client-cloudwatch-logs": "^3.991.0",
    "@aws-sdk/client-s3": "^3.821.0",
    "@aws-sdk/client-sqs": "^3.990.0",
    "async-wait-until": "^2.0.12",
    "@nhs-notify-client-callbacks/test-support": "*"
  },
  "devDependencies": {
    "@aws-sdk/client-sqs": "^3.990.0",
    "@tsconfig/node22": "^22.0.2",

tests/integration/package.json:26

  • async-wait-until is listed in both dependencies and devDependencies. Remove the duplicate entry so there’s a single source of truth for the installed version.
    "async-wait-until": "^2.0.12",
    "@nhs-notify-client-callbacks/test-support": "*"
  },
  "devDependencies": {
    "@aws-sdk/client-sqs": "^3.990.0",
    "@tsconfig/node22": "^22.0.2",
    "@types/jest": "^29.5.14",
    "async-wait-until": "^2.0.12",
    "jest": "^29.7.0",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@mjewildnhs mjewildnhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for now.

@rhyscoxnhs rhyscoxnhs enabled auto-merge (squash) March 27, 2026 09:29
@rhyscoxnhs rhyscoxnhs disabled auto-merge March 27, 2026 10:38
@rhyscoxnhs rhyscoxnhs merged commit 5a66267 into main Mar 30, 2026
23 checks passed
@rhyscoxnhs rhyscoxnhs deleted the feature/CCM-14205 branch March 30, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants