Skip to content

Commit

Permalink
Fix: Service responses are not compressed (#6360)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirho-ucsc committed Jul 17, 2024
1 parent 30df469 commit 6cb3814
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
1 change: 0 additions & 1 deletion lambdas/indexer/.chalice/config.json.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"manage_iam_role": False,
"iam_role_arn": "${aws_iam_role.%s.arn}" % app_name,
"environment_variables": config.lambda_env,
"minimum_compression_size": config.minimum_compression_size,
"lambda_timeout": config.api_gateway_lambda_timeout,
"lambda_memory_size": 128,
**chalice.vpc_lambda_config(app_name),
Expand Down
1 change: 0 additions & 1 deletion lambdas/service/.chalice/config.json.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"manage_iam_role": False,
"iam_role_arn": "${aws_iam_role.%s.arn}" % app_name,
"environment_variables": config.lambda_env,
"minimum_compression_size": config.minimum_compression_size,
"lambda_timeout": config.api_gateway_lambda_timeout,
"lambda_memory_size": 2048,
**chalice.vpc_lambda_config(app_name),
Expand Down
1 change: 1 addition & 0 deletions src/azul/chalice.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def __init__(self,
self.non_interactive_routes: set[tuple[str, str]] = set()
if spec is not None:
assert 'paths' not in spec, 'The top-level spec must not define paths'
spec['x-amazon-apigateway-minimum-compression-size'] = config.minimum_compression_size
self._specs: Optional[MutableJSON] = copy_json(spec)
self._specs['paths'] = {}
else:
Expand Down
10 changes: 10 additions & 0 deletions src/azul/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "azul",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"private": true
}
5 changes: 5 additions & 0 deletions src/azul/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,11 @@ def tf_config(self, app_name):
del deployment['lifecycle']['create_before_destroy']
assert not deployment['lifecycle'], deployment
del deployment['lifecycle']
# deployment['lifecycle'] = {
# 'replace_triggered_by': [
# 'aws_api_gateway_rest_api.%s' % app_name
# ]
# }
deployment['triggers'] = {'redeployment': deployment.pop('stage_description')}

return {
Expand Down

0 comments on commit 6cb3814

Please sign in to comment.