diff --git a/requirements/base.txt b/requirements/base.txt index 983774371f..19fce693bd 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -5,7 +5,7 @@ Flask~=1.1.4 boto3>=1.19.5,==1.* jmespath~=0.10.0 PyYAML~=5.3 -cookiecutter~=1.7.2 +cookiecutter~=2.1.1 aws-sam-translator==1.46.0 #docker minor version updates can include breaking changes. Auto update micro version only. docker~=4.2.0 diff --git a/requirements/reproducible-linux.txt b/requirements/reproducible-linux.txt index af31c119f8..d25b8b786b 100644 --- a/requirements/reproducible-linux.txt +++ b/requirements/reproducible-linux.txt @@ -78,9 +78,9 @@ click==7.1.2 \ # aws-sam-cli (setup.py) # cookiecutter # flask -cookiecutter==1.7.3 \ - --hash=sha256:6b9a4d72882e243be077a7397d0f1f76fe66cf3df91f3115dbb5330e214fa457 \ - --hash=sha256:f8671531fa96ab14339d0c59b4f662a4f12a2ecacd94a0f70a3500843da588e2 +cookiecutter==2.1.1 \ + --hash=sha256:9f3ab027cec4f70916e28f03470bdb41e637a3ad354b4d65c765d93aad160022 \ + --hash=sha256:f3982be8d9c53dac1261864013fdec7f83afd2e42ede6f6dd069c5e149c540d5 # via aws-sam-cli (setup.py) dateparser==1.0.0 \ --hash=sha256:159cc4e01a593706a15cd4e269a0b3345edf3aef8bf9278a57dac8adf5bf1e4a \ @@ -201,10 +201,6 @@ markupsafe==2.0.1 \ # via # aws-sam-cli (setup.py) # jinja2 -poyo==0.5.0 \ - --hash=sha256:3e2ca8e33fdc3c411cd101ca395668395dd5dc7ac775b8e809e3def9f9fe041a \ - --hash=sha256:e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd - # via cookiecutter pyrsistent==0.17.3 \ --hash=sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e # via jsonschema @@ -254,6 +250,7 @@ pyyaml==5.4.1 \ --hash=sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0 # via # aws-sam-cli (setup.py) + # cookiecutter # serverlessrepo regex==2021.9.30 \ --hash=sha256:0de8ad66b08c3e673b61981b9e3626f8784d5564f8c3928e2ad408c0eb5ac38c \ @@ -320,7 +317,6 @@ six==1.15.0 \ --hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced # via # aws-lambda-builders - # cookiecutter # docker # jsonschema # python-dateutil diff --git a/samcli/lib/init/__init__.py b/samcli/lib/init/__init__.py index 832b698e2a..1c815ea55e 100644 --- a/samcli/lib/init/__init__.py +++ b/samcli/lib/init/__init__.py @@ -116,6 +116,13 @@ def generate_project( except CookiecutterException as e: raise GenerateProjectFailedError(project=name, provider_error=e) from e + except TypeError as ex: + LOG.debug("Error from cookiecutter: %s", ex) + + _apply_tracing(tracing, output_dir, name) + + +def _apply_tracing(tracing: bool, output_dir: str, name: str) -> None: if tracing: template_file_path = f"{output_dir}/{name}/template.yaml" template_modifier = XRayTracingTemplateModifier(template_file_path) diff --git a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-golang/requirements-dev.txt b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-golang/requirements-dev.txt index b10c8d1048..aa7117612c 100644 --- a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-golang/requirements-dev.txt +++ b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-golang/requirements-dev.txt @@ -1,4 +1,4 @@ -cookiecutter==1.6.0 +cookiecutter==2.1.1 flake8==3.5.0 pytest==3.3.2 pytest-cookies==0.3.0