Skip to content

Prep for PROD ECS - #16651

Draft
aug24 wants to merge 2 commits into
mainfrom
jr/prep-for-prod-ecs
Draft

Prep for PROD ECS#16651
aug24 wants to merge 2 commits into
mainfrom
jr/prep-for-prod-ecs

Conversation

@aug24

@aug24 aug24 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What does this change?

This PR adds ECS capability to the PROD tag rendering nodes, and expands testing to cover with and without ECS.

Why?

How has this change been tested?

Screenshots

Before After
before after

Comment thread dotcom-rendering/cdk/bin/cdk.ts Outdated
new RenderingCDKStack(
cdkApp,
'TagPageRendering-PROD',
getTagPageRenderingPropsPROD(process.env.IMAGE_DIGEST),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the biggie. This will trigger a deployment including ECS

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

@aug24 aug24 added the feature Departmental tracking: work on a new feature label Sep 1, 2026

@akash1810 akash1810 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IIUC this PR, ultimately, adds a CDK snapshot test for the current state of tag-page-rendering PROD? If so, could we can make the diff smaller to make this more accessible for future travellers? For example, I don't think we need to convert from a const to a function?

Comment thread dotcom-rendering/cdk/bin/cdk.ts Outdated
instanceType: InstanceType.of(InstanceClass.T4G, InstanceSize.SMALL),
imageIdentifier: process.env.IMAGE_DIGEST ?? 'DEV',
};
export function getTagPageRenderingPropsCODE(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are we converting to a function here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wanted to make it possible to synth with and without process.env.IMAGE_IDENTIFIER in two tests so I could compare the outputs, and so we could switch in and out with confidence.

In the end I think I only added one test for PROD though! I can go back and add the other test OR just tear it out if we are confident this is the direction of travel.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wanted to make it possible to synth with and without process.env.IMAGE_IDENTIFIER in two tests so I could compare the outputs, and so we could switch in and out with confidence.

I think that's already possible via the imageIdentifier property being an optional string within RenderingCDKStackProps? As we're falling back to DEV, I'm not sure the second test works as expected?

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🚀 Image pushed to AWS ECR

Image digest: sha256:784755d244a1514824b47c2d1cb445a527ea51659ec44843fa74277cd063a7da

🐛 Run the image locally

The following can be used to run the image locally:

# Refer to image using the immutable digest. Find alternatives below.
IMAGE_IDENTIFIER="@sha256:784755d244a1514824b47c2d1cb445a527ea51659ec44843fa74277cd063a7da"

# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-jr-prep-for-prod-ecs"

# Refer to image using build tag
# IMAGE_IDENTIFIER=":build-30801"

# Refer to image via the GitHub commit SHA tag
# IMAGE_IDENTIFIER=":sha-b06c2f157b59e0bbba37e103a37c37bac5736a00"

# Set environment variables for the AWS CLI
AWS_PROFILE="<A_PROFILE_FROM_JANUS>"
AWS_DEFAULT_REGION="eu-west-1"

IMAGE_ACCOUNT_ID=$(aws ssm get-parameter --name /organisation/accounts/deployTools --query "Parameter.Value" --output text)
REGISTRY="${IMAGE_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
IMAGE="${REGISTRY}/guardian/dotcom-rendering${IMAGE_IDENTIFIER}"

# Login to AWS ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html
aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY

# Pull the image
docker pull $IMAGE

# Run the image. You'll likely need to set additional flags. See https://docs.docker.com/reference/cli/docker/container/run.
docker run $IMAGE

From guardian/actions-publish-image.

@aug24
aug24 force-pushed the jr/prep-for-prod-ecs branch from 67bb56a to c9a5d27 Compare September 3, 2026 16:16
@aug24
aug24 force-pushed the jr/prep-for-prod-ecs branch from c9a5d27 to b06c2f1 Compare September 3, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants