Skip to content

Commit 27795a1

Browse files
authored
fix(web-frontend): pin browser profiler to older version to fix build (#221)
* fix(web-frontend): pin browser profiler to older version to fix build issue * fix(sticker-catalogue): increase startup wait, use valid fargate combination * fix: default memory/cpu alignment
1 parent 9a7f01d commit 27795a1

8 files changed

Lines changed: 61 additions & 37 deletions

File tree

print-service/infra/aws/lib/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class Api extends Construct {
5151
ddApiKey: props.sharedProps.datadog.apiKeyParameter,
5252
port: 8080,
5353
cpu: 512,
54-
memoryLimitMiB: 512,
54+
memoryLimitMiB: 1024,
5555
environmentVariables: {
5656
DD_DATA_STREAMS_ENABLED: "true",
5757
DD_TRACE_OTEL_ENABLED: "true",

shared/lib/shared-constructs/lib/web-service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ export class WebService extends Construct {
115115
let taskDefinition: ecs.FargateTaskDefinition | undefined = undefined;
116116

117117
// Task Definition
118-
const memoryLimitMiB = props.memoryLimitMiB ?? 512;
119118
const cpu = props.cpu ?? 256;
119+
// Fargate valid CPU/memory combos: 256→(512-2048), 512→(1024-4096), 1024→(2048-8192), etc.
120+
const minMemoryForCpu: Record<number, number> = { 256: 512, 512: 1024, 1024: 2048, 2048: 4096, 4096: 8192 };
121+
const defaultMemory = minMemoryForCpu[cpu] ?? 512;
122+
const memoryLimitMiB = props.memoryLimitMiB ?? defaultMemory;
120123

121124
if (!props.sharedProps.enableDatadog) {
122125
taskDefinition = new ecs.FargateTaskDefinition(
@@ -140,6 +143,7 @@ export class WebService extends Construct {
140143
`${props.sharedProps.serviceName}Definition`,
141144
{
142145
memoryLimitMiB,
146+
cpu,
143147
runtimePlatform: {
144148
cpuArchitecture: ecs.CpuArchitecture.X86_64,
145149
operatingSystemFamily: ecs.OperatingSystemFamily.LINUX,

sticker-award/infra/aws/lib/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export class Api extends Construct {
9999
additionalPathMappings: [],
100100
serviceDependencies: props.serviceProps.serviceDependencies,
101101
cpu: 512,
102+
memoryLimitMiB: 1024,
102103
});
103104

104105
props.serviceProps.messagingConfiguration.grantPermissions(

sticker-catalogue/infra/aws/lib/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ export class Api extends Construct {
8989
interval: Duration.seconds(30),
9090
timeout: Duration.seconds(5),
9191
retries: 3,
92-
startPeriod: Duration.seconds(60),
92+
startPeriod: Duration.seconds(120),
9393
},
9494
serviceDiscoveryNamespace: props.serviceDiscoveryNamespace,
9595
serviceDiscoveryName: props.serviceDiscoveryName,
9696
deployInPrivateSubnet: props.deployInPrivateSubnet,
9797
serviceDependencies: props.serviceProps.serviceDependencies,
9898
cpu: 1024,
99-
memoryLimitMiB: 1024,
99+
memoryLimitMiB: 2048,
100100
});
101101

102102
props.stickerImagesBucket.grantReadWrite(webService.taskRole);

user-management/infra/aws/lib/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class Api extends Construct {
6363
image: "ghcr.io/datadog/stickerlandia/user-management-service",
6464
imageTag: props.sharedProps.version,
6565
cpu: 1024,
66-
memoryLimitMiB: 1024,
66+
memoryLimitMiB: 2048,
6767
assetPath: path.resolve(__dirname, "../../.."),
6868
dockerfile: "src/Stickerlandia.UserManagement.Api/Dockerfile",
6969
ddApiKey: props.sharedProps.datadog.apiKeyParameter,

web-backend/infra/aws/lib/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export class Api extends Construct {
7070
path: "/api/app/{proxy+}",
7171
additionalPathMappings: [],
7272
cpu: 512,
73+
memoryLimitMiB: 1024,
7374
healthCheckPath: "/api/app",
7475
serviceDiscoveryNamespace: props.serviceDiscoveryNamespace,
7576
serviceDiscoveryName: props.serviceDiscoveryName,

web-frontend/package-lock.json

Lines changed: 39 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web-frontend/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@datadog/browser-logs": "^6.18.0",
14-
"@datadog/browser-rum": "^6.18.0",
15-
"@datadog/browser-rum-react": "^6.18.0",
13+
"@datadog/browser-logs": "6.28.1",
14+
"@datadog/browser-rum": "6.28.1",
15+
"@datadog/browser-rum-react": "6.28.1",
1616
"react": "^19.1.0",
1717
"react-dom": "^19.1.0",
18-
"vite-envs": "^4.6.2",
1918
"react-router": "^7.8.1",
20-
"tailwindcss": "^4.1.12"
19+
"tailwindcss": "^4.1.12",
20+
"vite-envs": "^4.6.2"
2121
},
2222
"devDependencies": {
23+
"@emotion/react": "^11.14.0",
24+
"@emotion/styled": "^11.14.1",
2325
"@eslint/js": "^9.30.1",
26+
"@mui/icons-material": "^7.3.1",
27+
"@mui/material": "^7.3.1",
28+
"@tailwindcss/vite": "^4.1.12",
2429
"@types/react": "^19.1.8",
2530
"@types/react-dom": "^19.1.6",
2631
"@vitejs/plugin-react": "^4.6.0",
27-
"@tailwindcss/vite": "^4.1.12",
28-
"@mui/icons-material": "^7.3.1",
29-
"@mui/material": "^7.3.1",
30-
"@emotion/styled": "^11.14.1",
31-
"@emotion/react": "^11.14.0",
3232
"eslint": "^9.30.1",
3333
"eslint-plugin-react-hooks": "^5.2.0",
3434
"eslint-plugin-react-refresh": "^0.4.20",
3535
"globals": "^16.3.0",
3636
"vite": "^7.0.4"
3737
}
38-
}
38+
}

0 commit comments

Comments
 (0)