From 56b918f9767ffa4ad27ffbfdd6794dabd0a1a877 Mon Sep 17 00:00:00 2001 From: bohdan-onsha Date: Thu, 28 Mar 2024 11:23:41 +0200 Subject: [PATCH] fix issue with syndicate not uploading deploy output on fail --- CHANGELOG.md | 3 +++ setup.py | 2 +- syndicate/core/build/deployment_processor.py | 21 ++++++++++++-------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a2c7afb..5ee4ad1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +# [1.11.2] - 2024-03-28 +- fix issue with syndicate not uploading deploy output on fail + # [1.11.1] - 2024-03-26 - Added clarification error message in case of deployment after failed deploy - Fixed generation of tests when generating meta for a new lambda function diff --git a/setup.py b/setup.py index d40ae599..bcef1508 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( name='aws-syndicate', - version='1.11.1', + version='1.11.2', packages=find_packages(), include_package_data=True, install_requires=[ diff --git a/syndicate/core/build/deployment_processor.py b/syndicate/core/build/deployment_processor.py index bebc8da6..73778749 100644 --- a/syndicate/core/build/deployment_processor.py +++ b/syndicate/core/build/deployment_processor.py @@ -128,14 +128,19 @@ def _build_args(name, meta, context, pass_context=False): def update_failed_output(res_name, res_meta, resource_type, output): from syndicate.core import PROCESSOR_FACADE - describe_func = PROCESSOR_FACADE.describe_handlers()[resource_type] - failed_resource_output = describe_func(res_name, res_meta) - if failed_resource_output: - if isinstance(failed_resource_output, list): - for item in failed_resource_output: - output.update(item) - else: - output.update(failed_resource_output) + + try: + describe_func = PROCESSOR_FACADE.describe_handlers()[resource_type] + failed_resource_output = describe_func(res_name, res_meta) + if failed_resource_output: + if isinstance(failed_resource_output, list): + for item in failed_resource_output: + output.update(item) + else: + output.update(failed_resource_output) + except Exception as e: + _LOG.warning(f'Unable to describe {resource_type} ' + f'resource with name {res_name}. Exception: {e}') return output