Commit graph

17 commits

Author SHA1 Message Date
Khalim Conn-Kowlessar
f317233939 A recorded batch failure does not return the message to SQS 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 11:51:23 +00:00
Khalim Conn-Kowlessar
f01131a064 A batch message with task_id and subtask_id attaches to the app-owned task 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 11:48:53 +00:00
Daniel Roth
d06e92cd75 task_handler: fix pyright unknown-type errors in pass_task_orchestrator branch 🟪
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 11:15:58 +00:00
Daniel Roth
35a794563a task_handler passes orchestrator and task_id to wrapped function when flag is true 🟩
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 10:48:40 +00:00
Daniel Roth
3a66819a86 task_handler passes orchestrator and task_id to wrapped function when flag is true 🟥 2026-06-24 10:47:05 +00:00
Daniel Roth
a4aaf0e81f Merge branch 'main' into trigger-e2e-locally 2026-06-23 16:38:03 +00:00
Daniel Roth
79a76b10a9 fix db issues 2026-06-23 16:36:59 +00:00
Jun-te Kim
119ff3740c fix(task_handler): persist cloud_logs_url for modelling_e2e
@task_handler never built or passed cloud_logs_url, so every app using
it (incl. modelling_e2e) ran run_subtask with the None default and the
CloudWatch deep-link was never saved onto the SubTask. @subtask_handler
did this correctly.

Extract the URL builder into a shared utilities/aws_lambda/cloud_logs.py
(public cloudwatch_url()), use it from both handlers, and pass the URL
into run_subtask from @task_handler. Add regression tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 15:42:00 +00:00
Daniel Roth
0a3b827be2 task handler returns task and subtask IDs 2026-06-23 10:33:38 +00:00
Daniel Roth
dc830fea63 various fixes 2026-06-22 14:21:52 +00:00
Daniel Roth
8ff58bd645 tell subtask_handler whether to send TaskOrchestrator to handler, defaulting to True 2026-06-10 12:43:24 +00:00
Daniel Roth
2c605f80ca pass task orchestrator to handler 2026-06-10 09:29:46 +00:00
Daniel Roth
bb1c8c88ce Two-parameter subtask handler completes without TypeError 🟩 2026-06-10 08:40:32 +00:00
Jun-te Kim
d0cf3d14ad get rid of comments 2026-05-20 13:21:11 +00:00
Jun-te Kim
914a8ed51e postcode splliter working e2e 2026-05-20 11:07:40 +00:00
Jun-te Kim
d70e8a9e53 utilities/aws_lambda: @subtask_handler injects TaskOrchestrator as third positional arg
The wrapped function now receives the decorator-owned TaskOrchestrator as
a third positional argument so handlers can compose their own use-case
orchestrator that shares the session, instead of opening a second Postgres
connection per invocation.

Both existing callers (backend/ordnanceSurvey/main.py and
backend/bulk_address2uprn_combiner/main.py) have their signatures extended
to accept the new positional argument (typed Optional[TaskOrchestrator] so
the legacy backend.utils.subtasks.subtask_handler — which only passes two
args — keeps working until the migration to the new decorator lands).

@task_handler is intentionally unchanged in this slice; symmetry is
deferred per issue #1103.
2026-05-19 17:31:27 +00:00
Jun-te Kim
54a674b5c8 added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00