From 8216aceac6ca858a932b5cb81fddc18d60c565b6 Mon Sep 17 00:00:00 2001 From: nihitkas Date: Fri, 16 Dec 2022 14:54:00 -0500 Subject: [PATCH] updates for release v1.3.1 --- CHANGELOG.md | 13 ++++++++++++- .../aws_solutions/cdk/synthesizers.py | 1 + .../cdk_solution_helper_py/helpers_cdk/setup.py | 12 ++++++------ .../helpers_common/setup.py | 6 +++--- .../cdk_solution_helper_py/requirements-dev.txt | 9 +++++---- source/cdk_solution_helper_py/requirements.txt | 1 - source/infrastructure/aspects/app_registry.py | 4 ++-- source/infrastructure/cdk.json | 4 ++-- .../aws_solutions/requirements/requirements.txt | 2 +- source/infrastructure/setup.py | 4 ++-- source/requirements-dev.txt | 8 ++++---- source/scheduler/cdk/setup.py | 8 ++++---- source/scheduler/common/setup.py | 16 ++++++++-------- .../tests/aspects/test_personalize_app_stack.py | 5 +++-- 14 files changed, 53 insertions(+), 40 deletions(-) delete mode 100644 source/cdk_solution_helper_py/requirements.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index d277aa5..662aff5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,18 @@ 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.3.0] - 2022-11-17 +## [1.3.1] - 2022-12-19 + +### Fixed + +- GitHub [issue #19](https://github.com/aws-solutions/maintaining-personalized-experiences-with-machine-learning/issues/19). This fix prevents AWS Service Catalog AppRegistry Application Name and Attribute Group Name from using a string that begins with `AWS`, since strings begining with `AWS` are considered as reserved words by the AWS Service. + +### Changed + +- Locked `boto3` to version `1.25.5`, and upgraded python library packages. + + +## [1.3.0] - 2022-11-17 ### Added diff --git a/source/cdk_solution_helper_py/helpers_cdk/aws_solutions/cdk/synthesizers.py b/source/cdk_solution_helper_py/helpers_cdk/aws_solutions/cdk/synthesizers.py index e8851de..630419b 100644 --- a/source/cdk_solution_helper_py/helpers_cdk/aws_solutions/cdk/synthesizers.py +++ b/source/cdk_solution_helper_py/helpers_cdk/aws_solutions/cdk/synthesizers.py @@ -220,6 +220,7 @@ def patch_app_reg(self): "Fn::Join": [ # NOSONAR (python:S1192) - string for clarity "-", [ + "App", {"Ref": "AWS::StackName"}, { "Fn::FindInMap": ["Solution", "Data", "AppRegistryName"] # NOSONAR (python:S1192) - string for clarity diff --git a/source/cdk_solution_helper_py/helpers_cdk/setup.py b/source/cdk_solution_helper_py/helpers_cdk/setup.py index d3173b9..04cc93f 100644 --- a/source/cdk_solution_helper_py/helpers_cdk/setup.py +++ b/source/cdk_solution_helper_py/helpers_cdk/setup.py @@ -49,18 +49,18 @@ def get_version(): ] }, install_requires=[ - "pip>=22.2.2", + "pip>=22.3.1", "aws_cdk_lib==2.44.0", - "Click>=7.1.2", - "boto3>=1.24.90", - "requests>=2.28.1", - "crhelper>=2.0.11", + "Click==8.1.3", + "boto3==1.25.5", + "requests==2.28.1", + "crhelper==2.0.11", ], entry_points=""" [console_scripts] build-s3-cdk-dist=aws_solutions.cdk.scripts.build_s3_cdk_dist:cli """, - python_requires=">=3.7", + python_requires=">=3.9", classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", diff --git a/source/cdk_solution_helper_py/helpers_common/setup.py b/source/cdk_solution_helper_py/helpers_common/setup.py index 29cae1a..2266334 100644 --- a/source/cdk_solution_helper_py/helpers_common/setup.py +++ b/source/cdk_solution_helper_py/helpers_common/setup.py @@ -42,10 +42,10 @@ def get_version(): license="Apache License 2.0", packages=setuptools.find_namespace_packages(exclude=["build*"]), install_requires=[ - "boto3>=1.24.90", - "pip>=22.2.2", + "boto3==1.25.5", + "pip>=22.3.1", ], - python_requires=">=3.7", + python_requires=">=3.9", classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", diff --git a/source/cdk_solution_helper_py/requirements-dev.txt b/source/cdk_solution_helper_py/requirements-dev.txt index 4e9969b..10fdc74 100644 --- a/source/cdk_solution_helper_py/requirements-dev.txt +++ b/source/cdk_solution_helper_py/requirements-dev.txt @@ -1,8 +1,9 @@ aws_cdk_lib==2.44.0 +aws-cdk.aws-servicecatalogappregistry-alpha==2.44.0a0 black -boto3>=1.24.90 -requests>=2.28.1 -crhelper>=2.0.11 +boto3==1.25.5 +requests==2.28.1 +crhelper==2.0.11 Click moto pipenv @@ -13,4 +14,4 @@ pytest-mock>=3.9.0 tox tox-pyenv -e ./source/cdk_solution_helper_py/helpers_cdk --e ./source/cdk_solution_helper_py/helpers_common \ No newline at end of file +-e ./source/cdk_solution_helper_py/helpers_common diff --git a/source/cdk_solution_helper_py/requirements.txt b/source/cdk_solution_helper_py/requirements.txt deleted file mode 100644 index c2c8ff6..0000000 --- a/source/cdk_solution_helper_py/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -aws-cdk.aws-servicecatalogappregistry-alpha==2.44.0a0 \ No newline at end of file diff --git a/source/infrastructure/aspects/app_registry.py b/source/infrastructure/aspects/app_registry.py index cd31737..c17967c 100644 --- a/source/infrastructure/aspects/app_registry.py +++ b/source/infrastructure/aspects/app_registry.py @@ -57,7 +57,7 @@ def __create_app_for_app_registry(self) -> None: self, "RegistrySetup", application_name=cdk.Fn.join( - "-", [cdk.Aws.STACK_NAME, self.app_registry_name, cdk.Aws.REGION, cdk.Aws.ACCOUNT_ID] + "-", ["App", cdk.Aws.STACK_NAME, self.app_registry_name, cdk.Aws.REGION, cdk.Aws.ACCOUNT_ID] ), description=f"Service Catalog application to track and manage all your resources for the solution {self.solution_name}", ) @@ -81,7 +81,7 @@ def __create_atttribute_group(self) -> None: appreg.AttributeGroup( self, "AppAttributes", - attribute_group_name=cdk.Aws.STACK_NAME, + attribute_group_name=f"AttrGrp-{cdk.Aws.STACK_NAME}", description="Attributes for Solutions Metadata", attributes={ "applicationType": self.application_type, diff --git a/source/infrastructure/cdk.json b/source/infrastructure/cdk.json index 3c76d22..3ad87bd 100644 --- a/source/infrastructure/cdk.json +++ b/source/infrastructure/cdk.json @@ -3,8 +3,8 @@ "context": { "SOLUTION_NAME": "Maintaining Personalized Experiences with Machine Learning", "SOLUTION_ID": "SO0170", - "SOLUTION_VERSION": "v1.3.0", + "SOLUTION_VERSION": "v1.3.1", "APP_REGISTRY_NAME": "personalized-experiences-ML", "APPLICATION_TYPE": "AWS-Solutions" } -} \ No newline at end of file +} diff --git a/source/infrastructure/personalize/aws_lambda/layers/aws_solutions/requirements/requirements.txt b/source/infrastructure/personalize/aws_lambda/layers/aws_solutions/requirements/requirements.txt index acf0cdb..7b9477c 100644 --- a/source/infrastructure/personalize/aws_lambda/layers/aws_solutions/requirements/requirements.txt +++ b/source/infrastructure/personalize/aws_lambda/layers/aws_solutions/requirements/requirements.txt @@ -4,4 +4,4 @@ avro==1.11.1 cronex==0.1.3.1 jmespath==1.0.1 parsedatetime==2.6 -boto3>=1.24.90 +boto3==1.25.5 diff --git a/source/infrastructure/setup.py b/source/infrastructure/setup.py index 1b32890..b5d7fbc 100644 --- a/source/infrastructure/setup.py +++ b/source/infrastructure/setup.py @@ -36,9 +36,9 @@ packages=setuptools.find_packages(), install_requires=[ "aws-cdk-lib==2.44.0", - "pip>=22.2.2", + "pip>=22.3.1", ], - python_requires=">=3.7", + python_requires=">=3.9", classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", diff --git a/source/requirements-dev.txt b/source/requirements-dev.txt index df7a683..f05b067 100644 --- a/source/requirements-dev.txt +++ b/source/requirements-dev.txt @@ -1,11 +1,11 @@ avro==1.11.1 black -boto3 +boto3==1.25.5 aws_cdk_lib==2.44.0 aws_solutions_constructs.aws_lambda_sns==2.25.0 aws-cdk.aws-servicecatalogappregistry-alpha==2.44.0a0 -requests~=2.28.1 -crhelper~=2.0.11 +requests==2.28.1 +crhelper==2.0.11 cronex==0.1.3.1 moto==2.3.0 parsedatetime==2.6 @@ -15,7 +15,7 @@ pytest-env>=0.6.2 pytest-mock>=3.5.1 pyyaml==5.4.1 responses~=0.17.0 -tenacity>=8.0.1 +tenacity==8.0.1 -e cdk_solution_helper_py/helpers_cdk -e cdk_solution_helper_py/helpers_common -e scheduler/cdk diff --git a/source/scheduler/cdk/setup.py b/source/scheduler/cdk/setup.py index 9a2fcca..3d2e178 100644 --- a/source/scheduler/cdk/setup.py +++ b/source/scheduler/cdk/setup.py @@ -42,12 +42,12 @@ def get_version(): license="Apache License 2.0", packages=setuptools.find_namespace_packages(exclude=["build*"]), install_requires=[ - "pip>=22.2.2", + "pip>=22.3.1", "aws_cdk_lib==2.44.0", - "Click>=7.1.2", - "boto3>=1.24.90", + "Click==8.1.3", + "boto3==1.25.5", ], - python_requires=">=3.7", + python_requires=">=3.9", classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", diff --git a/source/scheduler/common/setup.py b/source/scheduler/common/setup.py index bc91bc3..bad7709 100644 --- a/source/scheduler/common/setup.py +++ b/source/scheduler/common/setup.py @@ -42,22 +42,22 @@ def get_version(): license="Apache License 2.0", packages=setuptools.find_namespace_packages(exclude=["build*"]), install_requires=[ - "pip>=22.2.2", + "pip>=22.3.1", "aws-lambda-powertools==1.29.2", "aws-xray-sdk==2.11.0", - "aws-solutions-python>=2.0.0", - "click>=8.1.3", + "aws-solutions-python==2.0.0", + "click==8.1.3", "cronex==0.1.3.1", - "boto3>=1.24.90", - "requests>=2.28.1", - "crhelper>=2.0.11", - "rich>=12.6.0", + "boto3==1.25.5", + "requests==2.28.1", + "crhelper==2.0.11", + "rich==12.6.0", ], entry_points=""" [console_scripts] aws-solutions-scheduler=aws_solutions.scheduler.common.scripts.scheduler_cli:cli """, - python_requires=">=3.7", + python_requires=">=3.9", classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", diff --git a/source/tests/aspects/test_personalize_app_stack.py b/source/tests/aspects/test_personalize_app_stack.py index 2e733ad..cd579f0 100644 --- a/source/tests/aspects/test_personalize_app_stack.py +++ b/source/tests/aspects/test_personalize_app_stack.py @@ -54,6 +54,7 @@ def test_service_catalog_registry_application(synth_template): "Fn::Join": [ "-", [ + "App", {"Ref": "AWS::StackName"}, app.node.try_get_context("APP_REGISTRY_NAME"), {"Ref": "AWS::Region"}, @@ -65,11 +66,11 @@ def test_service_catalog_registry_application(synth_template): "Tags": { "SOLUTION_ID": "SO0170", "SOLUTION_NAME": "Maintaining Personalized Experiences with Machine Learning", - "SOLUTION_VERSION": "v1.3.0", + "SOLUTION_VERSION": "v1.3.1", "Solutions:ApplicationType": "AWS-Solutions", "Solutions:SolutionID": "SO0170", "Solutions:SolutionName": "Maintaining Personalized Experiences with Machine Learning", - "Solutions:SolutionVersion": "v1.3.0", + "Solutions:SolutionVersion": "v1.3.1", }, }, )