diff --git a/applications/landlord_description_overrides/handler.py b/applications/landlord_description_overrides/handler.py index 9637d16c..5e689a45 100644 --- a/applications/landlord_description_overrides/handler.py +++ b/applications/landlord_description_overrides/handler.py @@ -120,8 +120,9 @@ def handler( ) -> dict[str, int]: trigger = LandlordDescriptionOverridesTriggerBody.model_validate(body) - # The classifier reads the ORIGINAL upload (raw landlord headers), so the S3 - # bucket comes from the trigger URI rather than a fixed env var. + # The classifier reads a dedicated CSV of the classifier columns (raw + # landlord headers preserved), converted from the upload by the frontend, so + # the S3 bucket comes from the trigger URI rather than a fixed env var. bucket, _key = parse_s3_uri(trigger.s3_uri) # boto3.client is overloaded per-service in the installed stubs; cast to Any @@ -136,7 +137,7 @@ def handler( csv_client, bucket ) - # Raw rows, not load_batch: the original upload carries the description + # Raw rows, not load_batch: the classifier CSV carries the description # columns but not the canonical address/postcode columns load_batch requires. rows = csv_client.read_rows(trigger.s3_uri) diff --git a/backend/address2UPRN/handler/Dockerfile b/backend/address2UPRN/handler/Dockerfile index 7d174152..ffecf54b 100644 --- a/backend/address2UPRN/handler/Dockerfile +++ b/backend/address2UPRN/handler/Dockerfile @@ -32,6 +32,9 @@ RUN pip install --no-cache-dir -r requirements.txt COPY utils/ utils/ COPY backend/ backend/ COPY datatypes/ datatypes/ +# main.py imports infrastructure.epc_client.epc_client_service (EpcClientService); +# without this the lambda fails at init with "No module named 'infrastructure'". +COPY infrastructure/ infrastructure/ # Copy the handler COPY backend/address2UPRN/main.py .