From fb7ca5bc1514eb67399d369e71eccc3836cc4d3b Mon Sep 17 00:00:00 2001 From: AWS Date: Thu, 28 Jul 2022 17:14:30 +0000 Subject: [PATCH] Release: 1.6.1 --- VERSION | 2 +- .../aft-account-customizations-terraform.yml | 11 +++++++---- sources/aft-lambda-layer/aft_common/metrics.py | 2 +- sources/aft-lambda-layer/setup.py | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index dc1e644a..9c6d6293 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.0 +1.6.1 diff --git a/modules/aft-customizations/buildspecs/aft-account-customizations-terraform.yml b/modules/aft-customizations/buildspecs/aft-account-customizations-terraform.yml index a551c188..45ef818b 100644 --- a/modules/aft-customizations/buildspecs/aft-account-customizations-terraform.yml +++ b/modules/aft-customizations/buildspecs/aft-account-customizations-terraform.yml @@ -136,10 +136,13 @@ phases: post_build: on-failure: ABORT commands: - - export PYTHONPATH="$DEFAULT_PATH/aws-aft-core-framework/sources/aft-lambda-layer:$PYTHONPATH" - - export AWS_PROFILE=aft-management - - python3 $DEFAULT_PATH/aws-aft-core-framework/sources/aft-lambda-layer/aft_common/report_metrics.py --codebuild-name "aft-account-customizations" --codebuild-status $CODEBUILD_BUILD_SUCCEEDING - - unset AWS_PROFILE + - | + if [[ ! -z "$CUSTOMIZATION" ]]; then + export PYTHONPATH="$DEFAULT_PATH/aws-aft-core-framework/sources/aft-lambda-layer:$PYTHONPATH" + export AWS_PROFILE=aft-management + python3 $DEFAULT_PATH/aws-aft-core-framework/sources/aft-lambda-layer/aft_common/report_metrics.py --codebuild-name "aft-account-customizations" --codebuild-status $CODEBUILD_BUILD_SUCCEEDING + unset AWS_PROFILE + fi - | if [[ $CODEBUILD_BUILD_SUCCEEDING == 0 ]]; then exit 1 diff --git a/sources/aft-lambda-layer/aft_common/metrics.py b/sources/aft-lambda-layer/aft_common/metrics.py index 8823e09d..1a90eb69 100644 --- a/sources/aft-lambda-layer/aft_common/metrics.py +++ b/sources/aft-lambda-layer/aft_common/metrics.py @@ -5,7 +5,7 @@ from datetime import datetime from typing import Any, Dict, Optional, TypedDict -import requests # type: ignore +import requests from aft_common import aft_utils as utils from aft_common.auth import AuthClient from boto3.session import Session diff --git a/sources/aft-lambda-layer/setup.py b/sources/aft-lambda-layer/setup.py index fb35069b..c337c856 100644 --- a/sources/aft-lambda-layer/setup.py +++ b/sources/aft-lambda-layer/setup.py @@ -81,6 +81,7 @@ "aws_lambda_powertools == 1.25.9", "autoflake == 1.4", "prospector == 1.7.7", + "types-requests == 2.27.5", ] }, )