From 4a45e31cdb58542176e8cfa6e6c8daeb80582231 Mon Sep 17 00:00:00 2001 From: Di Chen Date: Fri, 14 Jan 2022 09:10:40 +0800 Subject: [PATCH 1/2] Rename lambda_config.json to lambda_config.template lambda_config.template will be envsubst-ed, and generate the lambda_config.json which is in valid JSON format. Signed-off-by: Di Chen --- scripts/build-package | 2 +- tests/conftest.py | 2 +- tox.ini | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/build-package b/scripts/build-package index 2fffabcc..7a81f3fc 100755 --- a/scripts/build-package +++ b/scripts/build-package @@ -9,7 +9,7 @@ export EXODUS_CONFIG_CACHE_TTL=${EXODUS_CONFIG_CACHE_TTL:-2} pip install --require-hashes -r requirements.txt --target ./package pip install --no-deps --target ./package . cp ./configuration/exodus-lambda-deploy.yaml ./package -envsubst < ./configuration/lambda_config.json > ./package/lambda_config.json +envsubst < ./configuration/lambda_config.template > ./package/lambda_config.json aws cloudformation package \ --template ./package/exodus-lambda-deploy.yaml \ --s3-bucket $PROJECT-pipeline-artifacts \ diff --git a/tests/conftest.py b/tests/conftest.py index b0dd7dfa..35f6058e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -61,7 +61,7 @@ def mock_conf_file(): test_env["ORIGIN_REQUEST_LOGGER_LEVEL"] = "DEBUG" test_env["EXODUS_HEADERS_MAX_AGE"] = "600" - cmd = "envsubst < ./configuration/lambda_config.json > {temp_path}" + cmd = "envsubst < ./configuration/lambda_config.template > {temp_path}" cmd = cmd.format(temp_path=temp_file.name) subprocess.run( diff --git a/tox.ini b/tox.ini index ab6c04a9..786df009 100644 --- a/tox.ini +++ b/tox.ini @@ -50,6 +50,12 @@ commands= pip install --no-deps --target ./package . # Always using hardcoded config for now. + export ORIGIN_RESPONSE_LOGGER_LEVEL=${ORIGIN_RESPONSE_LOGGER_LEVEL:-WARNING} + export ORIGIN_REQUEST_LOGGER_LEVEL=${ORIGIN_REQUEST_LOGGER_LEVEL:-WARNING} + export EXODUS_HEADERS_MAX_AGE=${EXODUS_HEADERS_MAX_AGE:-600} + export EXODUS_CONFIG_CACHE_TTL=${EXODUS_CONFIG_CACHE_TTL:-2} + + envsubst < configuration/lambda_config.template > configuration/lambda_config.json cp configuration/lambda_config.json package sh -c 'cd package && zip -r ../package.zip .' From ae380646d4ee078398c990a4c505c81ec20a10e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 01:28:22 +0000 Subject: [PATCH 2/2] build(deps): bump click from 8.0.1 to 8.0.3 Bumps [click](https://github.com/pallets/click) from 8.0.1 to 8.0.3. - [Release notes](https://github.com/pallets/click/releases) - [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/click/compare/8.0.1...8.0.3) --- updated-dependencies: - dependency-name: click dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- test-requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index 7ef1ad1d..88fb6dac 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -28,9 +28,9 @@ charset-normalizer==2.0.7 \ --hash=sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0 \ --hash=sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b # via requests -click==8.0.1 \ - --hash=sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a \ - --hash=sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6 +click==8.0.3 \ + --hash=sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3 \ + --hash=sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b # via black coverage==5.5 \ --hash=sha256:004d1880bed2d97151facef49f08e255a20ceb6f9432df75f4eef018fdd5a78c \