Skip to content

Commit 24c049d

Browse files
committed
aws: Sync json definitions; increase max parallel cpus
1 parent ee29acc commit 24c049d

8 files changed

Lines changed: 16 additions & 51 deletions

File tree

aws/setup/batch/environment.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{
22
"computeEnvironmentName": "codeclash-batch",
33
"computeEnvironmentArn": "arn:aws:batch:us-east-1:039984708918:compute-environment/codeclash-batch",
4-
"ecsClusterArn": "arn:aws:ecs:us-east-1:039984708918:cluster/AWSBatch-codeclash-batch-1561352c-9234-3de1-999a-dcd1c9989b32",
4+
"ecsClusterArn": "arn:aws:ecs:us-east-1:039984708918:cluster/AWSBatch-codeclash-batch-a9d4e10e-95a6-327b-ad6e-67ea5235e964",
55
"tags": {
66
"project": "codeclash",
77
"author": "kilian"
88
},
99
"type": "MANAGED",
1010
"state": "ENABLED",
11-
"status": "VALID",
1211
"statusReason": "ComputeEnvironment Healthy",
1312
"computeResources": {
1413
"type": "EC2",
1514
"allocationStrategy": "BEST_FIT_PROGRESSIVE",
16-
"minvCpus": 2,
17-
"maxvCpus": 16,
18-
"desiredvCpus": 2,
15+
"minvCpus": 0,
16+
"maxvCpus": 32,
17+
"desiredvCpus": 0,
1918
"instanceTypes": [
2019
"optimal"
2120
],
@@ -31,9 +30,11 @@
3130
"sg-014723b4566a8214d"
3231
],
3332
"instanceRole": "arn:aws:iam::039984708918:instance-profile/kilian-codeclash-ecsInstanceRole",
33+
"tags": {},
3434
"launchTemplate": {
3535
"launchTemplateName": "kilian-codeclash-launch-template",
36-
"version": "$Latest"
36+
"version": "$Latest",
37+
"overrides": []
3738
},
3839
"ec2Configuration": [
3940
{
@@ -46,6 +47,5 @@
4647
"terminateJobsOnUpdate": false,
4748
"jobExecutionTimeoutMinutes": 30
4849
},
49-
"containerOrchestrationType": "ECS",
50-
"uuid": "f413880a-eecc-3dfd-b139-0e9143381b4d"
50+
"uuid": "5246d4a1-4dd8-397e-82c2-af986d0f7a87"
5151
}

aws/setup/batch/iam-ebs.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

aws/setup/batch/iam-environment-role.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131
],
3232
"RoleLastUsed": {
33-
"LastUsedDate": "2025-09-25 19:28:45+00:00",
33+
"LastUsedDate": "2025-09-26 20:48:55+00:00",
3434
"Region": "us-east-1"
3535
}
3636
}

aws/setup/batch/iam-execution-role.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
],
3333
"RoleLastUsed": {
34-
"LastUsedDate": "2025-09-25 19:02:55+00:00",
34+
"LastUsedDate": "2025-09-26 20:51:10+00:00",
3535
"Region": "us-east-1"
3636
}
3737
}

aws/setup/batch/iam-job-role.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
],
3333
"RoleLastUsed": {
34-
"LastUsedDate": "2025-09-25 19:02:58+00:00",
34+
"LastUsedDate": "2025-09-26 20:49:00+00:00",
3535
"Region": "us-east-1"
3636
}
3737
}

aws/setup/batch/job_definition.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"jobDefinitionName": "codeclash-default-job",
3-
"jobDefinitionArn": "arn:aws:batch:us-east-1:039984708918:job-definition/codeclash-default-job:1",
4-
"revision": 1,
5-
"status": "ACTIVE",
63
"type": "container",
74
"parameters": {},
85
"containerProperties": {
@@ -49,6 +46,5 @@
4946
},
5047
"platformCapabilities": [
5148
"EC2"
52-
],
53-
"containerOrchestrationType": "ECS"
49+
]
5450
}

aws/setup/batch/job_queue.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"jobQueueName": "codeclash-queue",
33
"jobQueueArn": "arn:aws:batch:us-east-1:039984708918:job-queue/codeclash-queue",
44
"state": "ENABLED",
5-
"status": "VALID",
65
"statusReason": "JobQueue Healthy",
76
"priority": 1,
87
"computeEnvironmentOrder": [

aws/setup/batch/pull.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def pull_job_definition(job_name: str, batch_client) -> dict:
3939
"""Pull Batch job definition from AWS."""
4040
response = batch_client.describe_job_definitions(jobDefinitionName=job_name, status="ACTIVE")
4141

42+
if not response["jobDefinitions"]:
43+
raise ValueError(f"No job definitions found with name '{job_name}' and status 'ACTIVE'")
44+
4245
latest_revision = max(jd["revision"] for jd in response["jobDefinitions"])
4346
job_data = next(jd for jd in response["jobDefinitions"] if jd["revision"] == latest_revision)
4447

@@ -107,17 +110,14 @@ def pull_file(json_path: Path, region: str) -> None:
107110
case "iam-job-role.json":
108111
data = pull_iam_role("kilian-codeclash-job-role", boto3.client("iam", region_name=region))
109112
cleaned_data = clean_response_data(data, is_iam_role=True)
110-
case "iam-ebs.json":
111-
data = pull_iam_role("kilian-codeclash-ecs-role-for-ebs-volumes", boto3.client("iam", region_name=region))
112-
cleaned_data = clean_response_data(data, is_iam_role=True)
113113
case "environment.json":
114114
data = pull_compute_environment("codeclash-batch", boto3.client("batch", region_name=region))
115115
cleaned_data = clean_response_data(data, is_iam_role=False)
116116
case "job_queue.json":
117117
data = pull_job_queue("codeclash-queue", boto3.client("batch", region_name=region))
118118
cleaned_data = clean_response_data(data, is_iam_role=False)
119119
case "job_definition.json":
120-
data = pull_job_definition("codeclash-ebs-20g", boto3.client("batch", region_name=region))
120+
data = pull_job_definition("codeclash-default-job", boto3.client("batch", region_name=region))
121121
cleaned_data = clean_response_data(data, is_iam_role=False)
122122
case "launch_template.json":
123123
data = pull_launch_template("kilian-codeclash-launch-template", boto3.client("ec2", region_name=region))

0 commit comments

Comments
 (0)