Package repositories/ into the address2UPRN lambda image so it imports at cold start

main.py imports repositories.historic_epc.* after the re-plug; without the COPY
the lambda fails at init with Runtime.ImportModuleError (caught by
test_lambda_image_copies_full_import_closure).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-06-29 15:46:35 +00:00
parent 0536f70162
commit cc4b40fd95

View file

@ -39,6 +39,10 @@ COPY infrastructure/ infrastructure/
# EpcClientService -> datatypes.epc.domain.mapper -> domain.sap10_calculator;
# without this the lambda fails at init with "No module named 'domain'".
COPY domain/ domain/
# main.py resolves historic-EPC UPRNs via repositories.historic_epc.* (the
# HistoricEpcResolver + S3 repository); without this the lambda fails at init
# with "No module named 'repositories'".
COPY repositories/ repositories/
# Copy the handler
COPY backend/address2UPRN/main.py .