Commit graph

405 commits

Author SHA1 Message Date
KhalimCK
bd24a789b9
Merge pull request #1498 from Hestia-Homes/feature/bulk-document-download
Bulk Document Download: emailed ZIP of a property set's documents (ADR-0059/0060)
2026-07-08 12:49:46 +01:00
Daniel Roth
8e880eea6f Expose the Abri test project-code override to the scraper lambda 🟩
Wires TEST_ABRI_PROJECT_CODE_OVERRIDE from an optional deploy-time tfvar
through to the hubspot_deal_etl lambda env; unset keeps production behaviour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 10:28:48 +00:00
Khalim Conn-Kowlessar
b6746cc24a Terraform + CI for bulk_document_download: exports bucket, 10GB /tmp, SES SMTP, wiring 🟩
New lambda_with_sqs consumer (timeout 900, memory 3008, ephemeral_storage 10240
for multi-GB ZIPs); dedicated retrofit-document-exports bucket (no lifecycle on
DATA_BUCKET); IAM to read source buckets + write/presign-read the exports
bucket; SES SMTP creds baked from Secrets Manager (no ses:* on the role). Adds
ephemeral_storage_size knob to the shared lambda modules (default 512, backward
compatible). Wires the queue url+arn into fast-api and orders the CI jobs
(ADR-0055).

NOTE: terraform is drafted, not validated (no AWS/terraform in the dev env).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 10:03:50 +00:00
Daniel Roth
9ec629daf1 correct missed lambda renames 2026-07-07 16:43:25 +00:00
Daniel Roth
2e0cc7432c terraform correction 2026-07-07 15:23:44 +00:00
Daniel Roth
c0e444fccb abri_api not abri 2026-07-07 14:40:33 +00:00
Daniel Roth
1085384f21 Merge branch 'main' into feature/abri-api-integration 2026-07-07 14:08:52 +00:00
Daniel Roth
f5059c0589 tf comment 2026-07-07 14:04:34 +00:00
Khalim Conn-Kowlessar
60c448e66d FastAPI Lambda can send to the modelling_e2e queue
Remote state + MODELLING_E2E_SQS_URL env var + send policy ARN, and
fast_api_lambda deploys after modelling_e2e_lambda so the remote state
exists before it applies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 12:18:48 +00:00
Daniel Roth
7b2fe80688 The abri lambda ships with its queue, DLQ and UAT-pointed staging config 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 10:29:01 +00:00
Jun-te Kim
adb1bf4b56 Log GITHUB_SHA on /health; move zip-size gate to its own PR workflow
/health already returned GITHUB_SHA in its response but never logged
it, and the fastapi lambda's Terraform environment never actually set
GITHUB_SHA — so every health check response contained "unknown" in
production. Wire var.github_sha through the fastapi lambda module
(default "unknown" for local/other invocations) via a new
TF_VAR_github_sha env var set from `github.sha` in
_deploy_lambda.yml's Terraform Plan step, and log it on every /health
call so a request in CloudWatch can be tied back to the deploy that
served it.

Also fix the zip-size gate added for PR #1469: putting it in
tests/test_lambda_zip_size.py (run via the Docker-based ddd_tests.yml
suite) broke CI, because Dockerfile.test's build context excludes
deployment/* (.dockerignore), so check_lambda_zip_size.py couldn't
find variables.tf to read zip_excludes from inside that container.
Move the check to its own lightweight workflow,
check_lambda_zip_size.yml, triggered on pull_request into main — a
plain checkout (no Docker build) has the full repo, so the check
works, runs fast, and still gates merges to main before a regression
can roll into the dev deploy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 13:43:36 +00:00
Jun-te Kim
e816972c45 Move the fastapi Lambda zip-size gate into the PR test suite
deploy_terraform.yml only triggers on push to dev/prod — by the time
it runs, the change has already merged to main and rolled into dev.
That's exactly how the size regression sat undetected for weeks: it
only ever surfaced deep inside terraform apply on dev.

Drop the fast_api_lambda_zip_size_check job from deploy_terraform.yml
and instead add tests/test_lambda_zip_size.py, which runs
backend/app/requirements/check_lambda_zip_size.py as part of the
existing pytest tests/ suite. ddd_tests.yml already runs that suite
on `pull_request: branches: ["**"]`, so this now fails the PR before
anything merges to main, rather than failing the dev deploy after.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 13:28:24 +00:00
Jun-te Kim
d5f1c61689 Move zip-size checker next to the fastapi requirements it checks
Relocate scripts/check_lambda_zip_size.py to
backend/app/requirements/, right beside the requirements.txt it's
built to measure, since it's specific to the fastapi lambda rather
than a generic repo script.

While moving it, also make the excludes list self-updating: the
script now reads zip_excludes straight out of
deployment/terraform/modules/lambda_with_api_gateway/variables.tf
by default instead of duplicating it as CLI flags, so the CI check
and the actual Terraform packaging can't drift apart. requirements.txt
defaults to the sibling file too, so both the CI step and local runs
now collapse to a bare `check_lambda_zip_size.py` invocation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 13:00:59 +00:00
Jun-te Kim
409934a730 Fix fastapi lambda exceeding AWS's 250MB unzipped size limit
dev deploys have failed since PR #1231 (2026-06-15) with
InvalidParameterValueException: Unzipped size must be smaller than
262144000 bytes. The lambda zip is built from the whole repo root
(deployment/terraform/modules/lambda_with_api_gateway) and only
excluded tests/deployment/pycache — so .git (206MB packed), the
per-schema corpus.jsonl fixtures under backend/epc_api/json_samples/
(~50MB), and the sap10_calculator PDF specs (~13MB) were all being
zipped up even though none of them are read at runtime.

Also add scripts/check_lambda_zip_size.py, which mirrors the
terraform module's pip install + zip-with-excludes behaviour to
report the projected unzipped size without mutating the repo, and
wire it into deploy_terraform.yml as a fast_api_lambda_zip_size_check
job that gates the real deploy so this fails fast with a clear
message instead of surfacing as an opaque Terraform/AWS error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 12:54:03 +00:00
Daniel Roth
6a5a2c39d3 remove smoke tests from gh workflows 2026-06-24 11:35:30 +00:00
Jun-te Kim
c49682658a ci: disable integration/deploy/protect workflows (Actions minutes)
Comment out the remaining workflows to cut GitHub Actions usage, per request:
- integration_tests.yml — rebaselining integration suite (PRs to main)
- deploy_fastapi_backend.yml — FastAPI backend deploy (push to dev/prod);
  deploys must be run manually via `sls deploy` while disabled
- protect_releases.yml — main→dev PR-source guardrail

Fully commented (not deleted) so each restores by uncommenting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 07:56:42 +00:00
Jun-te Kim
f2ace566c3 ci: disable unit_tests.yml workflow (Actions minutes)
Comment out the Docker-based unit-test workflow — it was consuming too many
GitHub Actions minutes. Fully commented (rather than deleted) so it can be
restored by uncommenting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 07:54:07 +00:00
Daniel Roth
e949490b20 actually deploy lambda 2026-06-23 08:46:23 +00:00
Daniel Roth
8cb0e986e6 Deploy SharePoint renamer as Lambda with SQS trigger 🟩 2026-06-15 10:52:52 +00:00
Daniel Roth
163703285f deployment 2026-06-09 14:15:52 +00:00
Daniel Roth
e1515b0c00 correct path in terraform 2026-06-08 14:49:41 +00:00
Daniel Roth
df14150b9f terrafform correction 2026-06-04 15:40:26 +00:00
Daniel Roth
761962e991 add ECO_SHAREPOINT_ID env var 2026-06-04 15:40:26 +00:00
Jun-te Kim
a4670f8bc0 deploy lambda 2026-06-04 15:32:51 +00:00
Jun-te Kim
6c8fe86cf9 ddd tests 2026-06-02 15:31:42 +00:00
Jun-te Kim
25ba1427b1 seperate ddd tests 2026-06-02 15:30:58 +00:00
Jun-te Kim
47dfe34ec0 added landlord description overrides 2026-05-29 12:12:54 +00:00
Jun-te Kim
53b211e951 epc token added 2026-05-20 15:43:41 +00:00
Jun-te Kim
78c1d150fa added smoke test 2026-05-20 15:25:42 +00:00
Jun-te Kim
8610a0c875 actually deploy postcode splitter 2026-05-20 15:17:55 +00:00
Jun-te Kim
154b820b29 pytest.ini 2026-05-20 14:26:46 +00:00
Jun-te Kim
bc8ca3ead3 deployment from infrastructure 2026-05-19 12:55:30 +00:00
Daniel Roth
3a7a00051d add new variables to deployment pipeline 2026-05-18 11:09:44 +00:00
Jun-te Kim
0c3a31ed81 smoke tests 2026-05-14 16:49:45 +00:00
Jun-te Kim
16e6000180 smoke tests 2026-05-14 16:44:18 +00:00
Jun-te Kim
572fcc1406 smoke tests 2026-05-14 16:38:22 +00:00
Jun-te Kim
54864bf102 resolve merge conflict 2026-05-13 14:22:04 +00:00
Jun-te Kim
35d191c70e merged from main and resolved pytest.ini confict 2026-05-12 12:54:28 +00:00
Jun-te Kim
18ea95b67d added env variables for boto 2026-05-12 12:34:17 +00:00
Daniel Roth
fe6a724684
Merge pull request #1066 from Hestia-Homes/feature/magicplan-trigger
Magicplan trigger: add missing tf_var_ variables
2026-05-12 12:25:50 +01:00
Daniel Roth
f5bbd2efb3 add missing tf_vars to deploy_lambda workflow 2026-05-12 11:23:50 +00:00
KhalimCK
ccf8c34aae
Merge pull request #986 from Hestia-Homes/feature/match-on-lmk
protecting pushes to dev
2026-05-12 12:22:43 +01:00
Jun-te Kim
c53d8b2a33 basic end up check 2026-05-10 21:07:16 +00:00
Daniel Roth
feaa1ea680 Add MagicPlan Lambda Dockerfile, CI/CD jobs, and SQS IAM wiring in hubspot_deal_etl 2026-05-08 13:12:13 +00:00
Khalim Conn-Kowlessar
0955862973 working on integrating new EPC api into address2UPRN 2026-04-27 11:32:44 +00:00
Jun-te Kim
8c92eee448 fix deployment order 2026-04-22 12:45:44 +00:00
Jun-te Kim
686d1f2c80
Merge pull request #1010 from Hestia-Homes/feature/address_trigger_from_frontend
added bulk address uprn route
2026-04-20 17:39:07 +01:00
Jun-te Kim
33d355e2c3 added dan's changes 2026-04-20 16:34:03 +00:00
Daniel Roth
1750b17ee4 Merge branch 'main' into feature/pashub-to-ara 2026-04-20 09:24:57 +00:00
Daniel Roth
8b71fad8cc correct environment variables 2026-04-20 09:24:36 +00:00