Commit graph

200 commits

Author SHA1 Message Date
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
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
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
8610a0c875 actually deploy postcode splitter 2026-05-20 15:17:55 +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
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
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
Jun-te Kim
ec4c870465 added bulk address 2 uprn lmabda 2026-04-17 19:08:34 +00:00
Daniel Roth
62fe46adc4 get queue name from settings 2026-04-09 15:00:36 +00:00
Jun-te Kim
8a9f51f9e6 include hubspot api key 2026-04-01 10:33:06 +00:00
Jun-te Kim
b991ab73f7 add postgres 2026-03-31 11:19:16 +00:00
Jun-te Kim
ba331d44dc db details 2026-03-31 11:06:57 +00:00
Jun-te Kim
da3b753b46 merge conflicts resovled and reviweed my code 2026-03-30 17:09:41 +00:00
Jun-te Kim
764ee81dad hubspot etl 2026-03-30 15:52:28 +00:00
Daniel Roth
dd88e3c425 correct ecr in lambda deployment 2026-03-25 16:53:29 +00:00
Daniel Roth
d5830fb63b deploy pashub_to_ara lambda 2026-03-25 15:15:32 +00:00
Daniel Roth
3d0a37cf22 certificate depends on shared because of tfstate bucket 2026-03-17 11:47:56 +00:00
Daniel Roth
e9f37e7959 add certificate for cdn 2026-03-17 11:37:37 +00:00
Daniel Roth
20cc5a3059 dont try to use shared/.tfvars when deploying cloudfront cdn 2026-03-13 15:00:46 +00:00
Daniel Roth
3f10af0be5 dont try to use _deploy_lambda for cdn 2026-03-13 14:35:33 +00:00
Daniel Roth
ddcfa75a03 address PR 2026-03-13 11:16:41 +00:00
Daniel Roth
33406ff678 cdn depends on shared 2026-03-13 09:53:40 +00:00
Daniel Roth
b7bee7486c deploy cdn as its own job, depending on fastapi 2026-03-13 09:51:48 +00:00
Daniel Roth
aac9b784f3 use new domain from github secrets 2026-03-12 17:37:12 +00:00
Daniel Roth
83e502a361 from domain_name from engine environment 2026-03-12 14:47:28 +00:00
Daniel Roth
182fb8931e correct environment variables and policy definition 2026-03-11 17:23:38 +00:00
Daniel Roth
af031d81d4 fast api does not technically depend on shared 2026-03-11 14:04:56 +00:00
Daniel Roth
9aa60c9e70 fast api deployment dependencies 2026-03-11 12:58:31 +00:00
Daniel Roth
8828e4da15 move engine and fastapi depoyments to top of deploy_terraform 2026-03-11 10:04:02 +00:00
Daniel Roth
76a095e815 add github workflow 2026-03-11 09:48:15 +00:00
Daniel Roth
6632e6fcdc Merge branch 'main' into deploy-fastapi-with-terraform 2026-03-10 11:09:01 +00:00
Jun-te Kim
d42ba5b9cf ecr repo 2026-03-10 10:55:57 +00:00
Jun-te Kim
5a98815529 didn't deploy 2026-03-10 10:10:59 +00:00
Daniel Roth
54255942f9 add lambda_service_zip and lambda_with_api_gateway terraform modules 2026-03-10 08:51:08 +00:00
Jun-te Kim
b9105cc658 added ordance survey api 2026-03-09 16:48:37 +00:00
Jun-te Kim
cd822a3eed deploy terraform 2026-03-09 15:26:01 +00:00