Skip to content

CCM-17605: Enable component test sharding#323

Open
lapenna-bjss wants to merge 14 commits intomainfrom
feature/CCM-17605_Enable_component_test_sharding
Open

CCM-17605: Enable component test sharding#323
lapenna-bjss wants to merge 14 commits intomainfrom
feature/CCM-17605_Enable_component_test_sharding

Conversation

@lapenna-bjss
Copy link
Copy Markdown
Collaborator

@lapenna-bjss lapenna-bjss commented May 5, 2026

Description

Currently, component tests run in a single job using eight workers. This PR introduces test sharding to split the suite into smaller groups that run concurrently across multiple runners, reducing overall execution time.

Important changes

  • Component tests are divided into shards and executed in parallel jobs instead of a single job.
  • The generate-dependencies step is now cached based on schema inputs.
  • pre.sh now bypasses dependency build steps when ACTION=output, preventing redundant work during terraform output.
  • Firewall buffer intervals are now defined as environment specific variables. This removes the need to provision firewall setup during component test runs.

Terraform deployment

Before
image
After
image

Component tests

Before
image
After
image

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.

@lapenna-bjss lapenna-bjss requested review from a team as code owners May 5, 2026 07:52
--terraformAction "apply" \
--overrideProjectName "nhs" \
--overrideRoleName "nhs-main-acct-digital-letters-github-deploy" \
--internalRef "feature/CCM-17605_Enable_component_test_sharding" \
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Temporarily pointing to the NHS Notify internal branch containing the sharding changes, as main does not yet support this. This will be reverted once that PR is merged.

with:
target_environment: "pr${{ needs.metadata.outputs.pr_number }}"
target_account_group: nhs-notify-digital-letters-dev
internal_ref: "feature/CCM-17605_Enable_component_test_sharding"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Temporarily pointing to the NHS Notify internal branch containing the sharding changes, as main does not yet support this. This will be reverted once that PR is merged.

@gareth-allan gareth-allan self-assigned this May 5, 2026
Comment thread .github/actions/acceptance-tests/action.yaml
Copy link
Copy Markdown
Contributor

@gareth-allan gareth-allan left a comment

Choose a reason for hiding this comment

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

I think you could also now remove the constants that were used by the Firehose setup/teardown utilties.

Comment thread infrastructure/terraform/components/dl/variables.tf Outdated
Comment on lines +23 to +26
internal_ref:
description: "Branch or ref to use in nhs-notify-internal (defaults to main)"
required: false
type: string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I assume you'll remove this once the branch of nhs-notify-internal is merged?

sidnhs
sidnhs previously approved these changes May 5, 2026
simonlabarere
simonlabarere previously approved these changes May 5, 2026
@lapenna-bjss lapenna-bjss dismissed stale reviews from simonlabarere and sidnhs via 9cce64e May 5, 2026 10:32
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.

4 participants