Skip to content

Commit c26568b

Browse files
authored
Merge branch 'main' into nz-non-auxia-sign-in-gate
2 parents fd536f7 + 9132ba9 commit c26568b

51 files changed

Lines changed: 3631 additions & 1265 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-node-env/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: 'Sets up Node.js environment and installs dependencies'
44
runs:
55
using: 'composite'
66
steps:
7-
- run: npm install --global corepack@0.31.0
7+
- run: npm install --global corepack@0.36.0
88
shell: bash
99

1010
- run: corepack enable

.github/workflows/dcr-chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Chromatic - DCR
5050
env:
5151
NODE_OPTIONS: '--max_old_space_size=4096'
52-
uses: chromaui/action@v18.7.1
52+
uses: chromaui/action@v18.8.1
5353
if: |
5454
github.event_name == 'merge_group' ||
5555
(github.event_name == 'pull_request' &&

ab-testing/config/abTests.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,51 @@ const ABTests: ABTest[] = [
206206
groups: ["enable"],
207207
shouldForceMetricsCollection: false,
208208
},
209+
{
210+
name: "commercial-mobile-above-nav-test",
211+
description: "Test adding the mobile-above-nav ad slot to mobile pages",
212+
owners: ["commercial.dev@guardian.co.uk"],
213+
expirationDate: "2026-10-30",
214+
type: "server",
215+
status: "ON",
216+
audienceSize: 0 / 100,
217+
audienceSpace: "B",
218+
groups: ["control", "variant"],
219+
shouldForceMetricsCollection: true,
220+
},
221+
{
222+
name: "commercial-rich-links",
223+
description:
224+
"Test to measure the impact of fixing rich links insert behaviour and reduced restrictions on ad insertion around rich links.",
225+
owners: ["commercial.dev@guardian.co.uk"],
226+
expirationDate: "2026-10-28",
227+
type: "client",
228+
status: "ON",
229+
audienceSize: 0 / 100,
230+
audienceSpace: "A",
231+
groups: ["control", "variant"],
232+
shouldForceMetricsCollection: true,
233+
},
234+
{
235+
name: "commercial-header-bidder-timeouts",
236+
description:
237+
"Test to measure the impact of changing the Prebid and APS timeout value.",
238+
owners: ["commercial.dev@guardian.co.uk"],
239+
expirationDate: "2026-10-28",
240+
type: "client",
241+
status: "ON",
242+
audienceSize: 0 / 100,
243+
audienceSpace: "A",
244+
groups: [
245+
"variant-500",
246+
"variant-750",
247+
"variant-1000",
248+
"variant-1250",
249+
"control", // 1500ms timeout
250+
"variant-1650",
251+
],
252+
shouldForceMetricsCollection: true,
253+
},
209254
];
210255

211256
const activeABtests = ABTests.filter((test) => test.status === "ON");

dotcom-rendering/cdk/bin/cdk.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ export const TagPageRenderingPropsCODE: RenderingCDKStackProps = {
111111
domainName: 'tag-page-rendering.code.dev-guardianapis.com',
112112
scaling: { minimumInstances: 1, maximumInstances: 3 },
113113
instanceType: InstanceType.of(InstanceClass.T4G, InstanceSize.SMALL),
114-
imageIdentifier: getImageIdentifier(),
114+
ecsProps: {
115+
imageIdentifier: getImageIdentifier(),
116+
taskCpu: 1024,
117+
taskMemoryLimitMiB: 2048,
118+
},
115119
};
116120

117121
new RenderingCDKStack(
@@ -150,7 +154,11 @@ export const TagPageRenderingPropsPROD: RenderingCDKStackProps = {
150154
},
151155
},
152156
instanceType: InstanceType.of(InstanceClass.C8G, InstanceSize.MEDIUM),
153-
imageIdentifier: getImageIdentifier(),
157+
ecsProps: {
158+
imageIdentifier: getImageIdentifier(),
159+
taskCpu: 2048,
160+
taskMemoryLimitMiB: 4096,
161+
},
154162
};
155163

156164
new RenderingCDKStack(

dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4442,15 +4442,15 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD
44424442
"ReadonlyRootFilesystem": true,
44434443
},
44444444
],
4445-
"Cpu": "1024",
4445+
"Cpu": "2048",
44464446
"ExecutionRoleArn": {
44474447
"Fn::GetAtt": [
44484448
"EcsTaskDefinitionExecutionRoleBE450C73",
44494449
"Arn",
44504450
],
44514451
},
44524452
"Family": "TagPageRenderingPRODEcsTaskDefinition12224835",
4453-
"Memory": "2048",
4453+
"Memory": "4096",
44544454
"NetworkMode": "awsvpc",
44554455
"RequiresCompatibilities": [
44564456
"FARGATE",

dotcom-rendering/cdk/lib/renderingStack.ts

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,28 @@ export interface RenderingCDKStackProps extends Omit<GuStackProps, 'stack'> {
4646
};
4747

4848
/**
49-
* Which image to run.
50-
* This should be the image digest (e.g. 'sha256:abc123') to ensure immutable deployments.
51-
*
52-
* @note Currently optional to control which services run in an EC2-ECS hybrid mode, or EC2-only.
53-
*
54-
* @see https://docs.docker.com/dhi/core-concepts/digests
49+
* ECS configuration including image identifier and instance sizing.
50+
* Optional to control which services run in an EC2-ECS hybrid mode, or EC2-only.
5551
*/
56-
imageIdentifier?: string;
52+
ecsProps?: {
53+
/**
54+
* Which image to run.
55+
* This should be the image digest (e.g. 'sha256:abc123') to ensure immutable deployments.
56+
*
57+
* @see https://docs.docker.com/dhi/core-concepts/digests
58+
*/
59+
imageIdentifier: string;
60+
61+
/**
62+
* vCPU units for the ECS task
63+
*/
64+
taskCpu: number;
65+
66+
/**
67+
* Memory in MB for ECS task
68+
*/
69+
taskMemoryLimitMiB: number;
70+
};
5771
}
5872

5973
const addCPUStepScalingPolicy = (
@@ -200,14 +214,8 @@ export class RenderingCDKStack extends CDKStack {
200214
});
201215

202216
const { stack: guStack, region, account } = this;
203-
const {
204-
guApp,
205-
stage,
206-
instanceType,
207-
scaling,
208-
domainName,
209-
imageIdentifier,
210-
} = props;
217+
const { guApp, stage, instanceType, scaling, domainName, ecsProps } =
218+
props;
211219

212220
const artifactsBucket =
213221
GuDistributionBucketParameter.getInstance(this).valueAsString;
@@ -276,17 +284,16 @@ export class RenderingCDKStack extends CDKStack {
276284
}),
277285
},
278286

279-
// Provision ECS resources only when `imageIdentifier` has been provided
280-
...(imageIdentifier == null
287+
// Provision ECS resources only when `ecsProps` has been provided
288+
...(ecsProps == null
281289
? {}
282290
: {
283291
ecsProps: {
284292
repositoryName: 'guardian/dotcom-rendering',
285-
imageIdentifier,
293+
imageIdentifier: ecsProps.imageIdentifier,
286294

287-
// TODO tune these values
288-
memoryLimitMiB: 2048,
289-
cpu: 1024,
295+
memoryLimitMiB: ecsProps.taskMemoryLimitMiB,
296+
cpu: ecsProps.taskCpu,
290297
scaling: {
291298
minimumTasks: 1,
292299
maximumTasks: 2,
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
export const euParliament = {
2+
components: [
3+
{
4+
kind: 'stackedProgress',
5+
props: {
6+
total: 720,
7+
label: null,
8+
calculateWinner: false,
9+
excludedCopy: null,
10+
sections: [
11+
{
12+
colour: { name: '--eu-parliament-theleft' },
13+
name: 'Left',
14+
value: 40,
15+
align: 'left',
16+
exclude: false,
17+
},
18+
{
19+
name: 'S&D',
20+
colour: { name: '--eu-parliament-sd' },
21+
value: 100,
22+
align: 'left',
23+
exclude: false,
24+
},
25+
{
26+
name: 'Grn/EFA',
27+
colour: { name: '--eu-parliament-greensefa' },
28+
value: 40,
29+
align: 'left',
30+
exclude: false,
31+
},
32+
{
33+
name: 'Renew',
34+
colour: { name: '--eu-parliament-renew' },
35+
value: 60,
36+
align: 'left',
37+
exclude: false,
38+
},
39+
{
40+
name: 'EPP',
41+
colour: { name: '--eu-parliament-epp' },
42+
value: 150,
43+
align: 'left',
44+
exclude: false,
45+
},
46+
{
47+
name: 'ECR',
48+
colour: { name: '--eu-parliament-ecr' },
49+
value: 60,
50+
align: 'left',
51+
exclude: false,
52+
},
53+
{
54+
name: 'NI',
55+
colour: { name: '--eu-parliament-ni' },
56+
value: 30,
57+
align: 'left',
58+
exclude: false,
59+
},
60+
{
61+
name: 'PfE',
62+
colour: { name: '--eu-parliament-unknown' },
63+
value: 70,
64+
align: 'left',
65+
exclude: false,
66+
},
67+
{
68+
name: 'ESN',
69+
colour: { name: '--eu-parliament-unknown' },
70+
value: 20,
71+
align: 'left',
72+
exclude: false,
73+
},
74+
],
75+
},
76+
},
77+
{
78+
kind: 'valuesWithChange',
79+
props: {
80+
valueDescription: 'Seats',
81+
changeDescription: 'Change in seats',
82+
values: [
83+
{
84+
name: 'Left',
85+
value: 46,
86+
change: 9,
87+
colour: { name: '--eu-parliament-theleft' },
88+
},
89+
{
90+
name: 'S&D',
91+
value: 100,
92+
change: -3,
93+
colour: { name: '--eu-parliament-sd' },
94+
},
95+
{
96+
name: 'Grn/EFA',
97+
value: 40,
98+
change: -19,
99+
colour: { name: '--eu-parliament-greensefa' },
100+
},
101+
{
102+
name: 'Renew',
103+
value: 60,
104+
change: -25,
105+
colour: { name: '--eu-parliament-renew' },
106+
},
107+
{
108+
name: 'EPP',
109+
value: 150,
110+
change: 12,
111+
colour: { name: '--eu-parliament-epp' },
112+
},
113+
{
114+
name: 'ECR',
115+
value: 60,
116+
change: 9,
117+
colour: { name: '--eu-parliament-ecr' },
118+
},
119+
{
120+
name: 'NI',
121+
value: 30,
122+
change: 0,
123+
colour: { name: '--eu-parliament-ni' },
124+
},
125+
{
126+
name: 'PfE',
127+
value: 70,
128+
change: 0,
129+
colour: { name: '--eu-parliament-unknown' },
130+
},
131+
{
132+
name: 'ESN',
133+
value: 20,
134+
change: 0,
135+
colour: { name: '--eu-parliament-unknown' },
136+
},
137+
],
138+
},
139+
},
140+
{
141+
kind: 'onwardLink',
142+
props: {
143+
text: 'See full results',
144+
link: 'https://www.theguardian.com',
145+
},
146+
},
147+
],
148+
};
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
export const ukGeneralExitPoll = {
2+
components: [
3+
{
4+
kind: 'versus',
5+
props: {
6+
left: {
7+
name: 'Labour',
8+
abbreviation: 'Lab',
9+
image: {
10+
url: 'https://uploads.guim.co.uk/2024/06/24/Starmer.png',
11+
alt: 'Watercolour portrait of Sir Keir Starmer',
12+
},
13+
colour: { name: '--uk-elections-labour' },
14+
value: 0,
15+
description: 'seats declared',
16+
},
17+
right: {
18+
name: 'Conservatives',
19+
abbreviation: 'Con',
20+
image: {
21+
url: 'https://uploads.guim.co.uk/2024/06/24/Sunak.png',
22+
alt: 'Watercolour portrait of Rishi Sunak',
23+
},
24+
colour: { name: '--uk-elections-conservative' },
25+
value: 0,
26+
description: 'seats declared',
27+
},
28+
colour: 'name',
29+
faded: true,
30+
banner: 'Exit poll',
31+
},
32+
},
33+
{
34+
kind: 'onwardLink',
35+
props: {
36+
text: 'View results page',
37+
link: 'https://www.theguardian.com',
38+
},
39+
},
40+
],
41+
};

0 commit comments

Comments
 (0)