Skip to content

Commit 706d388

Browse files
authored
Merge pull request #7039 from hotosm/develop
Merge develop changes to staging
2 parents 506441b + 21bd7e2 commit 706d388

File tree

7 files changed

+32
-11
lines changed

7 files changed

+32
-11
lines changed

scripts/aws/infra/develop/purgeable/ecs-cron/terragrunt.hcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ inputs = {
6464
dependency.alb.outputs.load_balancer_app_security_group
6565
]
6666

67+
#Enable Execute Command
68+
enable_execute_command = get_env("ECS_TASK_ENABLE_EXECUTE_COMMAND", "false") == "true" ? true : false
69+
6770
# Merge secrets with: key:ValueFrom together
6871
container_secrets = concat(dependency.extras.outputs.container_secrets,
6972
dependency.rds.outputs.database_config_as_ecs_secrets_inputs)

scripts/aws/infra/develop/purgeable/ecs/terragrunt.hcl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ inputs = {
6969
dependency.alb.outputs.load_balancer_app_security_group
7070
]
7171

72+
#Enable Execute Command
73+
enable_execute_command = get_env("ECS_TASK_ENABLE_EXECUTE_COMMAND", "false") == "true" ? true : false
74+
7275
# Merge secrets with: key:ValueFrom together
7376
container_secrets = concat(dependency.extras.outputs.container_secrets,
7477
dependency.rds.outputs.database_config_as_ecs_secrets_inputs)
@@ -82,8 +85,8 @@ inputs = {
8285
## Task count for ECS services.
8386
tasks_count = {
8487
desired_count = 1
85-
min_healthy_pct = 25
86-
max_pct = 200
88+
min_healthy_pct = 100
89+
max_pct = 300
8790
}
8891

8992
health_check_grace_period_seconds = 60

scripts/aws/infra/production/purgeable/ecs-cron/terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ inputs = {
6565
]
6666

6767
#Enable Execute Command
68-
enable_execute_command = false
68+
enable_execute_command = get_env("ECS_TASK_ENABLE_EXECUTE_COMMAND", "false") == "true" ? true : false
6969

7070
# Merge secrets with: key:ValueFrom together
7171
container_secrets = concat(dependency.extras.outputs.container_secrets,

scripts/aws/infra/production/purgeable/ecs/terragrunt.hcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ inputs = {
7070
]
7171

7272
#Enable Execute Command
73-
enable_execute_command = false
73+
enable_execute_command = get_env("ECS_TASK_ENABLE_EXECUTE_COMMAND", "false") == "true" ? true : false
7474

7575
# Merge secrets with: key:ValueFrom together
7676
container_secrets = concat(dependency.extras.outputs.container_secrets,
@@ -85,8 +85,8 @@ inputs = {
8585
## Task count for ECS services.
8686
tasks_count = {
8787
desired_count = 1
88-
min_healthy_pct = 25
89-
max_pct = 200
88+
min_healthy_pct = 100
89+
max_pct = 600
9090
}
9191

9292
## Scaling Policy Target Values

scripts/aws/infra/staging/purgeable/ecs-cron/terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ inputs = {
6565
]
6666

6767
#Enable Execute Command
68-
enable_execute_command = false
68+
enable_execute_command = get_env("ECS_TASK_ENABLE_EXECUTE_COMMAND", "false") == "true" ? true : false
6969

7070
# Merge secrets with: key:ValueFrom together
7171
container_secrets = concat(dependency.extras.outputs.container_secrets,

scripts/aws/infra/staging/purgeable/ecs/terragrunt.hcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ inputs = {
7070
]
7171

7272
#Enable Execute Command
73-
enable_execute_command = false
73+
enable_execute_command = get_env("ECS_TASK_ENABLE_EXECUTE_COMMAND", "false") == "true" ? true : false
7474

7575
# Merge secrets with: key:ValueFrom together
7676
container_secrets = concat(dependency.extras.outputs.container_secrets,
@@ -85,8 +85,8 @@ inputs = {
8585
## Task count for ECS services.
8686
tasks_count = {
8787
desired_count = 1
88-
min_healthy_pct = 25
89-
max_pct = 200
88+
min_healthy_pct = 100
89+
max_pct = 400
9090
}
9191

9292
## Scaling Policy Target Values

scripts/commands/refresh_mapper_level.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import List
88

99
from databases import Database
10-
from backend.services.users.user_service import UserService
10+
from backend.services.users.user_service import UserService, UserServiceError
1111
from backend.models.postgis.user import User
1212
from backend.config import settings
1313

@@ -77,6 +77,21 @@ async def process_user(
7777
)
7878
await asyncio.sleep(RETRY_DELAY)
7979
continue
80+
except UserServiceError as exc:
81+
# Non-retriable external API error from UserService (e.g. OSM returned 404/410)
82+
# 404 for user not found.
83+
# 410 for user deleted from osm. Gone error code.
84+
async with failed_lock:
85+
failed_users.append(user_record.id)
86+
logger.info(
87+
"OSM error for user %s — recorded in osm_failed_users: %s",
88+
user_record.id,
89+
exc,
90+
)
91+
logger.debug(
92+
"UserServiceError for user %s", user_record.id, exc_info=True
93+
)
94+
break
8095
except Exception:
8196
async with failed_lock:
8297
failed_users.append(user_record.id)

0 commit comments

Comments
 (0)