From 0432fb4b87115051510ddf21557fb61dd31c2ce5 Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 10:44:03 +0100 Subject: [PATCH 01/10] use python 3.12 for dev environment --- Pipfile | 3 ++- Pipfile.lock | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Pipfile b/Pipfile index f2d6c8b..1def0e3 100644 --- a/Pipfile +++ b/Pipfile @@ -15,6 +15,7 @@ cachetools = "==v5.2.0" wheel = "==0.38.4" urllib3 = "==1.26.19" dc-logging-utils = {file = "."} +attrs = "==23.1.0" [dev-packages] boto3 = ">=1.20,<1.30" @@ -31,7 +32,7 @@ psycopg = {extras = ["binary"], version = "*"} tqdm = "*" [requires] -python_version = "3.10" +python_version = "3.12" [scripts] ruff-check = "ruff ." diff --git a/Pipfile.lock b/Pipfile.lock index d87b980..8016259 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "d2f4dbf582fcb35afa97cea2f029be3e0b02268a05c1c28ae6829937555589ce" + "sha256": "4a2adbb379c37dd5be7a59c70493d66ca72eb5fa0bc0cb9a7dac16fe5b48feab" }, "pipfile-spec": 6, "requires": { - "python_version": "3.10" + "python_version": "3.12" }, "sources": [ { @@ -21,6 +21,7 @@ "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04", "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015" ], + "index": "pypi", "markers": "python_version >= '3.7'", "version": "==23.1.0" }, From 7314169094a48c2d01eedfc4d20869584e867cfc Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 10:44:24 +0100 Subject: [PATCH 02/10] update ruff command --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 1def0e3..786eb63 100644 --- a/Pipfile +++ b/Pipfile @@ -35,6 +35,6 @@ tqdm = "*" python_version = "3.12" [scripts] -ruff-check = "ruff ." +ruff-check = "ruff check ." ruff-format-check = "ruff format --check ." pytest = "pytest --ruff --junitxml=test-results/junit.xml --cov=dc_logging_client" From 30f74a754f82db991c32bee0e47dfcb951fac632 Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 10:44:36 +0100 Subject: [PATCH 03/10] use ubuntu 24.04 image in CI --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 814e08e..6fb1448 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ orbs: jobs: install_and_update_dependencies: machine: - image: ubuntu-2204:2023.10.1 + image: ubuntu-2404:2024.05.1 steps: - checkout - restore_cache: @@ -31,7 +31,7 @@ jobs: run-tests: machine: - image: ubuntu-2204:2023.10.1 + image: ubuntu-2404:2024.05.1 steps: - checkout - attach_workspace: @@ -69,7 +69,7 @@ jobs: deploy: machine: - image: ubuntu-2204:2022.10.2 + image: ubuntu-2404:2024.05.1 parameters: dc-environment: type: enum From 2bb5b75f6443a2e1a21b88cfbb9a6364bc070ef6 Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 10:45:38 +0100 Subject: [PATCH 04/10] declare package compatibility with >=3.11 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 1e54687..8132b26 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ project_urls = Tracker = https://github.com/DemocracyClub/dc_logging/issues [options] -python_requires = >=3.8 +python_requires = >=3.11 packages = dc_logging_client include_package_data = true zip_safe = true From 0014af44e47fbd58ef788923f587e0c9c5059ff6 Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 10:45:50 +0100 Subject: [PATCH 05/10] docs fixes --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f23220f..8d81b27 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The logging client provides four things: Docker is required on the local system to run test. -* Install Python dependencies: `pipenv install --dev` +* Install Python dependencies: `pipenv sync --dev` * Run the test suite: `pytest` * Run lint checks: `ruff .` * Auto-format: `ruff format` @@ -35,8 +35,7 @@ Install the desired version using pip or pipenv. For pipenv, especially on projects deployed on AWS Lambda, it's advised to use the `zip` package from the release page: -`pipenv install https://github. -com/DemocracyClub/dc_logging/archive/refs/tags/[VERSION].zip` +`pipenv install https://github.com/DemocracyClub/dc_logging/archive/refs/tags/[VERSION].zip` ### Using the library From eb0635626556ad8b37934a78d5b68eec1c164754 Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 11:03:07 +0100 Subject: [PATCH 06/10] ensure lockfile is up to date in CI --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6fb1448..4973f70 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,6 +23,7 @@ jobs: pkg-manager: pipenv args: --dev - run: pipenv run pipenv check # before save_cache so an insecure cache is never saved + - run: pipenv run pipenv verify - save_cache: when: on_success paths: From 9ba747f7d8158fb1b2a70174872c4c54b7029c9d Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 11:16:54 +0100 Subject: [PATCH 07/10] run lambdas on python 3.12 --- dc_logging_aws/stacks/dc_logs_stack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dc_logging_aws/stacks/dc_logs_stack.py b/dc_logging_aws/stacks/dc_logs_stack.py index 02dc380..73e3ee1 100644 --- a/dc_logging_aws/stacks/dc_logs_stack.py +++ b/dc_logging_aws/stacks/dc_logs_stack.py @@ -195,7 +195,7 @@ def create_lambda_function(self, cls): client_layer = lambda_python.PythonLayerVersion( self, "logging_client_layer", - compatible_runtimes=[aws_lambda.Runtime.PYTHON_3_10], + compatible_runtimes=[aws_lambda.Runtime.PYTHON_3_12], entry="./dc_logging_client", ) @@ -205,7 +205,7 @@ def create_lambda_function(self, cls): function_name=f"ingest-{cls.stream_name}-{self.dc_environment}", entry="./dc_logging_aws/lambdas/ingest", index="handler.py", - runtime=aws_lambda.Runtime.PYTHON_3_10, + runtime=aws_lambda.Runtime.PYTHON_3_12, timeout=Duration.minutes(2), environment={ "STREAM_NAME": cls.stream_name, From 620ab09ca93ddbb5c6bffb9c7df9b9230bc64b15 Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 11:38:03 +0100 Subject: [PATCH 08/10] update cdk libs --- Pipfile | 2 +- Pipfile.lock | 78 ++++++++++++++++++++++++++--------------------- package-lock.json | 14 ++++----- package.json | 2 +- 4 files changed, 53 insertions(+), 43 deletions(-) diff --git a/Pipfile b/Pipfile index 786eb63..fcd24fd 100644 --- a/Pipfile +++ b/Pipfile @@ -5,7 +5,7 @@ name = "pypi" [packages] # Matches the Node version of the CDK in package.json -"aws-cdk-lib" = ">=2.105.0,< 2.106.0" +"aws-cdk-lib" = "<3.0.0,>=2.162.1" "aws_cdk.aws_lambda_python_alpha" = ">= 2.0.0alpha1" "aws-cdk.aws-kinesisfirehose-alpha" = ">= 2.104.0a0" "aws-cdk.aws-kinesisfirehose-destinations-alpha" = ">= 2.104.0a0" diff --git a/Pipfile.lock b/Pipfile.lock index 8016259..2e76df7 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "4a2adbb379c37dd5be7a59c70493d66ca72eb5fa0bc0cb9a7dac16fe5b48feab" + "sha256": "aa157d1c537638ef6ccbd3455c9c1afde13afc66c58f056cf0f83edf4e5b9aef" }, "pipfile-spec": 6, "requires": { @@ -27,35 +27,36 @@ }, "aws-cdk-lib": { "hashes": [ - "sha256:4c55b50b8b51ccc8bfd5b54e8d2c7b13e7f268b19166c8471a4c49574d32b4a1", - "sha256:c2828c6b2fc0c751e8bc3d80bd5066bd8e363452f2aaa0b19818f14ebc836b48" + "sha256:5c8157f144acecb40fa190bd49feb669f5be5d1bb2cf7bf7b0cdc3daa19615d9", + "sha256:696cf76ebe8ee6cb4af14e5d621cf551659e27c5c5c0e6c0146e478eada6195b" ], "index": "pypi", - "version": "==2.105.0" + "markers": "python_version ~= '3.8'", + "version": "==2.162.1" }, "aws-cdk.asset-awscli-v1": { "hashes": [ - "sha256:56fe2ef91d3c8d33559aa32d2130e5f35f23af1fb82f06648ebbc82ffe0a5879", - "sha256:88d1c269fd5cf8c9f6e0464ed22e2d4f269dfd5b36b8c4d37687bdba9c269839" + "sha256:5d402dc0754af19ce280474913ba9a3efb998153b77fa3e648596b6a296e963d", + "sha256:cd0a2cf2783fb2ac84b3e1384dc6284eae47c22f32f4e72579a52aff17c12ca4" ], - "markers": "python_version ~= '3.7'", - "version": "==2.2.201" + "markers": "python_version ~= '3.8'", + "version": "==2.2.207" }, "aws-cdk.asset-kubectl-v20": { "hashes": [ - "sha256:346283e43018a43e3b3ca571de3f44e85d49c038dc20851894cb8f9b2052b164", - "sha256:7f0617ab6cb942b066bd7174bf3e1f377e57878c3e1cddc21d6b2d13c92d0cc1" + "sha256:237cd8530d9e8be0bbc7159af927dbb6b7f91bf3f4099c8ef4d9a213b34264be", + "sha256:d5612e5bd03c215a28ce53193b1144ecf4e93b3b6779563c046a8a74d83a3979" ], - "markers": "python_version ~= '3.7'", - "version": "==2.1.2" + "markers": "python_version ~= '3.8'", + "version": "==2.1.3" }, "aws-cdk.asset-node-proxy-agent-v6": { "hashes": [ - "sha256:42cdbc1de2ed3f845e3eb883a72f58fc7e5554c2e0b6fcdb366c159778dce74d", - "sha256:e442673d4f93137ab165b75386761b1d46eea25fc5015e5145ae3afa9da06b6e" + "sha256:1f292c0631f86708ba4ee328b3a2b229f7e46ea1c79fbde567ee9eb119c2b0e2", + "sha256:24a388b69a44d03bae6dbf864c4e25ba650d4b61c008b4568b94ffbb9a69e40e" ], - "markers": "python_version ~= '3.7'", - "version": "==2.0.1" + "markers": "python_version ~= '3.8'", + "version": "==2.1.0" }, "aws-cdk.aws-glue-alpha": { "hashes": [ @@ -89,6 +90,14 @@ "index": "pypi", "version": "==2.105.0a0" }, + "aws-cdk.cloud-assembly-schema": { + "hashes": [ + "sha256:7c75861adc41f7b959910d4b3b191ea242815402e599dbfa31934892838ae25e", + "sha256:92613b46213b460681e9424f09b77f06ff059eb1c773092540364ef82fcecf55" + ], + "markers": "python_version ~= '3.8'", + "version": "==38.0.1" + }, "cachetools": { "hashes": [ "sha256:6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757", @@ -100,19 +109,20 @@ }, "cattrs": { "hashes": [ - "sha256:0341994d94971052e9ee70662542699a3162ea1e0c62f7ce1b4a57f563685108", - "sha256:a934090d95abaa9e911dac357e3a8699e0b4b14f8529bcc7d2b1ad9d51672b9f" + "sha256:67c7495b760168d931a10233f979b28dc04daf853b30752246f4f8471c6d68d0", + "sha256:8028cfe1ff5382df59dd36474a86e02d817b06eaf8af84555441bac915d2ef85" ], "markers": "python_version >= '3.8'", - "version": "==23.2.3" + "version": "==24.1.2" }, "constructs": { "hashes": [ - "sha256:2972f514837565ff5b09171cfba50c0159dfa75ee86a42921ea8c86f2941b3d2", - "sha256:518551135ec236f9cc6b86500f4fbbe83b803ccdc6c2cb7684e0b7c4d234e7b1" + "sha256:1f0f59b004edebfde0f826340698b8c34611f57848139b7954904c61645f13c1", + "sha256:ce54724360fffe10bab27d8a081844eb81f5ace7d7c62c84b719c49f164d5307" ], "index": "pypi", - "version": "==10.3.0" + "markers": "python_version ~= '3.8'", + "version": "==10.4.2" }, "dc-logging-utils": { "file": "." @@ -127,19 +137,19 @@ }, "importlib-resources": { "hashes": [ - "sha256:3893a00122eafde6894c59914446a512f728a0c1a45f9bb9b63721b6bacf0b4a", - "sha256:e8bf90d8213b486f428c9c39714b920041cb02c184686a3dee24905aaa8105d6" + "sha256:980862a1d16c9e147a59603677fa2aa5fd82b87f223b6cb870695bcfce830065", + "sha256:ac29d5f956f01d5e4bb63102a5a19957f1b9175e45649977264a1416783bb717" ], "markers": "python_version >= '3.8'", - "version": "==6.1.1" + "version": "==6.4.5" }, "jsii": { "hashes": [ - "sha256:15349b329b79699c88a6041c8987a4470e6cfa544e5c1e4a126bc5be9f48a623", - "sha256:d3cba8c18f2bb4eb94aa41a202b4eb14a561a3a347ed086294a6c9d5d17c90d6" + "sha256:1e9b3e49797450258d473c16052258f2291bde4dd410d30c21e325c000c10a0c", + "sha256:c1da4d21be208db7dd341bc8fd9c4cdbaa5ff1a3cec7ce4f5f4e3ce89bc949cc" ], "markers": "python_version ~= '3.8'", - "version": "==1.93.0" + "version": "==1.104.0" }, "publication": { "hashes": [ @@ -150,11 +160,11 @@ }, "python-dateutil": { "hashes": [ - "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", - "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" + "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", + "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.8.2" + "version": "==2.9.0.post0" }, "six": { "hashes": [ @@ -174,11 +184,11 @@ }, "typing-extensions": { "hashes": [ - "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783", - "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd" + "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" ], "markers": "python_version >= '3.8'", - "version": "==4.9.0" + "version": "==4.12.2" }, "urllib3": { "hashes": [ diff --git a/package-lock.json b/package-lock.json index 2759b8b..f6dd7a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,13 +5,13 @@ "packages": { "": { "dependencies": { - "aws-cdk": "^2.105.0" + "aws-cdk": "^2.162.1" } }, "node_modules/aws-cdk": { - "version": "2.105.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.105.0.tgz", - "integrity": "sha512-3ji+HNlCJUJ3o9h430gdRhocmeQrpM49fibXpvj3rvzBwuyWSTe2t8uohMPScSMETv59sHOlZpOdAEd+WwkuHQ==", + "version": "2.162.1", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.162.1.tgz", + "integrity": "sha512-p9WeiJ7wfiWj0Bpr1HhNdWENf0TxSZN73JtNqvqyaK6SptiLJc+R+ELo0hF3qKT99NWHTCbwWA/JH3BvEXbFxA==", "bin": { "cdk": "bin/cdk" }, @@ -38,9 +38,9 @@ }, "dependencies": { "aws-cdk": { - "version": "2.105.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.105.0.tgz", - "integrity": "sha512-3ji+HNlCJUJ3o9h430gdRhocmeQrpM49fibXpvj3rvzBwuyWSTe2t8uohMPScSMETv59sHOlZpOdAEd+WwkuHQ==", + "version": "2.162.1", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.162.1.tgz", + "integrity": "sha512-p9WeiJ7wfiWj0Bpr1HhNdWENf0TxSZN73JtNqvqyaK6SptiLJc+R+ELo0hF3qKT99NWHTCbwWA/JH3BvEXbFxA==", "requires": { "fsevents": "2.3.2" } diff --git a/package.json b/package.json index e23507f..938d1dc 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "aws-cdk": "^2.105.0" + "aws-cdk": "^2.162.1" } } From b7392bb292eafb9e9431ee7e0e5d34cff7e1b47b Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 16 Oct 2024 14:30:24 +0100 Subject: [PATCH 09/10] bump boto3 to a version that declares support for python 3.12 --- Pipfile | 2 +- Pipfile.lock | 39 ++++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Pipfile b/Pipfile index fcd24fd..23d93dd 100644 --- a/Pipfile +++ b/Pipfile @@ -18,7 +18,7 @@ dc-logging-utils = {file = "."} attrs = "==23.1.0" [dev-packages] -boto3 = ">=1.20,<1.30" +boto3 = "==1.35.*" mypy-boto3-organizations = "*" mypy-boto3-ssm = "1.26.97" ruff = "==0.1.8" diff --git a/Pipfile.lock b/Pipfile.lock index 2e76df7..8bc159d 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "aa157d1c537638ef6ccbd3455c9c1afde13afc66c58f056cf0f83edf4e5b9aef" + "sha256": "519c09db0742ee2baac836d727431bc6aa11126d0ca77e1cd7c74d218bf2ad8d" }, "pipfile-spec": 6, "requires": { @@ -249,11 +249,12 @@ }, "boto3": { "hashes": [ - "sha256:1eb4c548118b5fc5e018dee956fd33e6fb249cd1f2def85f1bba816aef4d9f3e", - "sha256:96e9890ebe7cd823b5f4976dd676e112c000c6528c28e20a2f274590589dd18b" + "sha256:2bf7e7f376aee52155fc4ae4487f29333a6bcdf3a05c3bc4fede10b972d951a6", + "sha256:e74bc6d69c04ca611b7f58afe08e2ded6cb6504a4a80557b656abeefee395f88" ], "index": "pypi", - "version": "==1.29.7" + "markers": "python_version >= '3.8'", + "version": "==1.35.41" }, "boto3-stubs": { "extras": [ @@ -272,11 +273,11 @@ }, "botocore": { "hashes": [ - "sha256:58b33d02cafa23461c8a9d211b30e8cded992380a84de409379fd02811fa3e11", - "sha256:c6795c731b04c8e3635588c44cfd1a4462fc5987859195522c96812cf3eceff9" + "sha256:8a09a32136df8768190a6c92f0240cd59c30deb99c89026563efadbbed41fa00", + "sha256:915c4d81e3a0be3b793c1e2efdf19af1d0a9cd4a2d8de08ee18216c14d67764b" ], - "markers": "python_version >= '3.7'", - "version": "==1.32.7" + "markers": "python_version >= '3.8'", + "version": "==1.35.41" }, "botocore-stubs": { "hashes": [ @@ -1261,11 +1262,11 @@ }, "python-dateutil": { "hashes": [ - "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", - "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" + "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", + "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.8.2" + "version": "==2.9.0.post0" }, "python-jose": { "extras": [ @@ -1598,11 +1599,11 @@ }, "s3transfer": { "hashes": [ - "sha256:baa479dc2e63e5c2ed51611b4d46cdf0295e2070d8d0b86b22f335ee5b954986", - "sha256:e8d6bd52ffd99841e3a57b34370a54841f12d3aab072af862cdcc50955288002" + "sha256:263ed587a5803c6c708d3ce44dc4dfedaab4c1a32e8329bab818933d79ddcf5d", + "sha256:4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" ], - "markers": "python_version >= '3.7'", - "version": "==0.8.0" + "markers": "python_version >= '3.8'", + "version": "==0.10.3" }, "sarif-om": { "hashes": [ @@ -1699,11 +1700,11 @@ }, "urllib3": { "hashes": [ - "sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07", - "sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0" + "sha256:37a0344459b199fce0e80b0d3569837ec6b6937435c5244e7fd73fa6006830f3", + "sha256:3e3d753a8618b86d7de333b4223005f68720bcd6a7d2bcb9fbd2229ec7c1e429" ], - "index": "pypi", - "version": "==1.26.18" + "markers": "python_version >= '3.10'", + "version": "==1.26.19" }, "wcwidth": { "hashes": [ From 38c5032d66299776bfb76f948e624fc48988944c Mon Sep 17 00:00:00 2001 From: chris48s Date: Thu, 17 Oct 2024 16:08:31 +0100 Subject: [PATCH 10/10] improve logging of failures sometimes we get a 202 with a handled error lets log that --- dc_logging_client/log_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dc_logging_client/log_client.py b/dc_logging_client/log_client.py index cf38686..cacdddd 100644 --- a/dc_logging_client/log_client.py +++ b/dc_logging_client/log_client.py @@ -67,6 +67,10 @@ def log(self, data: BaseLogEntry): logger.warning( f"Failed to log `{data.as_log_line()}`. Got `{response}`" ) + if response.get("FunctionError"): + logger.warning( + f"Failed to log `{data.as_log_line()}`. Got `{response["Payload"].read().decode('utf-8')}`" + ) class DCWidePostcodeLoggingClient(BaseLoggingClient):