Skip to content

Commit

Permalink
revert: remove cfn-lint integration (#4494)
Browse files Browse the repository at this point in the history
* Revert "fix: `hooks` data imports for pyinstaller (#4491)"

This reverts commit bea3bc0.

* Revert "fix: Update expected message read validate lint integration test (#4488)"

This reverts commit abd7c03.

* Revert "Update lint helpand output message (#4489)"

This reverts commit 3304955.

* Revert "fix: `pyinstaller` binaries (#4486)"

This reverts commit b8a939d.

* Revert "fix:  Fix validate command integration tests console output missmatch and update pyyaml version requirement (#4479)"

This reverts commit ce7143c.

* Revert "Adding cfn-lint as optional parameter for SAM validate command (#4444)"

This reverts commit 2fd533f.
  • Loading branch information
mndeveci authored Dec 17, 2022
1 parent dacd069 commit 42e512d
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 472 deletions.
137 changes: 0 additions & 137 deletions installer/assets/THIRD-PARTY-LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
** docker; version 4.2.0 -- https://pypi.org/project/docker/
** Importlib-metadata; version 4.11.3 -- https://importlib-metadata.readthedocs.io/en/latest/
** libcrypto; version 1.1 -- https://www.openssl.org/
** pbr; version 5.11.0 -- https://pypi.org/project/pbr/
** python-request; version 2.25.1 -- https://pypi.python.org/pypi/requests/2.25.1
** regex; version 2021.9.30 -- https://bitbucket.org/mrabarnett/mrab-regex/src/hg/
** s3transfer; version 0.3.6 -- https://github.com/boto/s3transfer
Expand Down Expand Up @@ -798,138 +797,6 @@ modification, are permitted provided that the following conditions are met:

------

** networkx; version 2.6.3 -- https://pypi.org/project/networkx/
Copyright (c) 2022, Aric Hagberg. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

#. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

#. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.

#. Neither the name of the copyright holder nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

#. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

------

** jsonpointer; version 2.3 -- https://pypi.org/project/jsonpointer/
Copyright (c) 2022, Stefan Kögl. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

#. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

#. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.

#. Neither the name of the copyright holder nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

#. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

------

** jsonpickle; version 3.0.0 -- https://pypi.org/project/jsonpickle/
Copyright (c) 2022, David Aguilar. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

#. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

#. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.

#. Neither the name of the copyright holder nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

#. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

------

** jsonpatch; version 1.32 -- https://pypi.org/project/jsonpickle/
Copyright (c) 2021-2022, Stefan Kögl. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

#. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

#. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.

#. Neither the name of the copyright holder nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

#. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

------

** python-chardet; version 3.0.4 -- https://pypi.org/project/chardet/
Copyright (C) 1991, 1999 Free Software Foundation, Inc.

Expand Down Expand Up @@ -1988,10 +1855,6 @@ Copyright (c) 2015 Hynek Schlawack
Copyright (c) 2014-2022 Anthon van der Neut, Ruamel bvba
** ruamel-yaml-clib; version 0.2.7 -- https://pypi.org/project/ruamel.yaml.clib/
Copyright (c) 2019-2021 Anthon van der Neut, Ruamel bvba
** cfn-lint; version 0.72.2 -- https://pypi.org/project/cfn-lint/
** jschema-to-python; version 1.2.3 -- https://pypi.org/project/jschema-to-python/
** junit-xml; version 1.9 -- https://pypi.org/project/junit-xml/
** sarif-om; version 1.0.4 https://pypi.org/project/sarif-om/
** wheel; version 0.36.2 -- https://github.com/pypa/wheel
"wheel" copyright (c) 2012-2014 Daniel Holth <[email protected]> and
contributors.
Expand Down
1 change: 0 additions & 1 deletion installer/pyinstaller/hidden_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
"pkg_resources.py2_warn",
"aws_lambda_builders.workflows",
"configparser",
"cfnlint"
]
4 changes: 0 additions & 4 deletions installer/pyinstaller/hook-samcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@
hiddenimports = SAM_CLI_HIDDEN_IMPORTS

datas = (
# Collect data files, raw python files (if include_py_files=True) and package metadata directories.
hooks.collect_all(
"samcli", include_py_files=True, include_datas=["hook_packages/terraform/copy_terraform_built_artifacts.py"]
)[0]
+ hooks.collect_all("jschema_to_python", include_py_files=False)[0]
+ hooks.collect_all("cfnlint", include_py_files=True)[0]
# Collect ONLY data files.
+ hooks.collect_data_files("samcli")
+ hooks.collect_data_files("samtranslator")
+ hooks.collect_data_files("aws_lambda_builders")
Expand Down
5 changes: 1 addition & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Werkzeug<2.1
boto3>=1.19.5,==1.*
jmespath~=0.10.0
ruamel_yaml==0.17.21
PyYAML>=5.4.1,==5.*
PyYAML~=5.3
cookiecutter~=2.1.1
aws-sam-translator==1.55.0
#docker minor version updates can include breaking changes. Auto update micro version only.
Expand All @@ -27,6 +27,3 @@ typing_extensions==3.10.0.0
regex==2021.9.30
# NOTE: tzlocal is not a direct dependency of SAM CLI, but pin to 3.0 as 4.0 break appveyor jobs
tzlocal==3.0

#Adding cfn-lint dependency for SAM validate
cfn-lint==0.72.2
57 changes: 5 additions & 52 deletions requirements/reproducible-linux.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
# This file is autogenerated by pip-compile with python 3.7
# To update, run:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/reproducible-linux.txt
#
Expand All @@ -11,10 +11,7 @@ arrow==1.0.3 \
attrs==20.3.0 \
--hash=sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6 \
--hash=sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700
# via
# jschema-to-python
# jsonschema
# sarif-om
# via jsonschema
aws-lambda-builders==1.23.1 \
--hash=sha256:4db4133decf149c5b2daa0959db0f6e5563a9763beac0e25005a90c2ce7abe48 \
--hash=sha256:dda6f7e04bc77120c206ef5269a0c17bbcecacf065865248d31c1c80f325a343
Expand All @@ -23,9 +20,7 @@ aws-sam-translator==1.55.0 \
--hash=sha256:08e182e76d6fabc13ce2f38b8a3932b3131407c6ad29ec2849ef3d9a41576b94 \
--hash=sha256:93dc74614ab291c86be681e025679d08f4fa685ed6b55d410f62f2f235012205 \
--hash=sha256:e86a67b87329a0de7d531d33257d1a448d0d6ecd84aee058d084957f28a8e4b1
# via
# aws-sam-cli (setup.py)
# cfn-lint
# via aws-sam-cli (setup.py)
backports-zoneinfo==0.2.1 \
--hash=sha256:17746bd546106fa389c51dbea67c8b7c8f0d14b5526a579ca6ccf5ed72c526cf \
--hash=sha256:1b13e654a55cd45672cb54ed12148cd33628f672548f373963b0bff67b217328 \
Expand Down Expand Up @@ -131,10 +126,6 @@ cffi==1.15.1 \
--hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \
--hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0
# via cryptography
cfn-lint==0.72.2 \
--hash=sha256:1117a0a50899807021fb7b87ebcfb04eddda06269d9a45c7dbbba3bc7c4631f5 \
--hash=sha256:d7ef1658687cf119adcf6ec312f28b5adc312d80293a54cdd5c140e2695a243c
# via aws-sam-cli (setup.py)
chardet==3.0.4 \
--hash=sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae \
--hash=sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691
Expand Down Expand Up @@ -205,7 +196,6 @@ importlib-metadata==5.0.0 \
--hash=sha256:ddb0e35065e8938f867ed4928d0ae5bf2a53b7773871bfe6bcc7e4fcdc7dea43
# via
# click
# jsonpickle
# jsonschema
itsdangerous==2.1.2 \
--hash=sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44 \
Expand All @@ -229,31 +219,10 @@ jmespath==0.10.0 \
# aws-sam-cli (setup.py)
# boto3
# botocore
jschema-to-python==1.2.3 \
--hash=sha256:76ff14fe5d304708ccad1284e4b11f96a658949a31ee7faed9e0995279549b91 \
--hash=sha256:8a703ca7604d42d74b2815eecf99a33359a8dccbb80806cce386d5e2dd992b05
# via cfn-lint
jsonpatch==1.32 \
--hash=sha256:26ac385719ac9f54df8a2f0827bb8253aa3ea8ab7b3368457bcdb8c14595a397 \
--hash=sha256:b6ddfe6c3db30d81a96aaeceb6baf916094ffa23d7dd5fa2c13e13f8b6e600c2
# via cfn-lint
jsonpickle==3.0.0 \
--hash=sha256:504586e5c0fd52fd76a56f86c36f8c4d29778bdef92dc06d38ca6e2e9fc4f090 \
--hash=sha256:7c4b13d595ff3520148ed870b9f5917023ebdc55c9ec0cb695688fdc16e90c3e
# via jschema-to-python
jsonpointer==2.3 \
--hash=sha256:51801e558539b4e9cd268638c078c6c5746c9ac96bc38152d443400e4f3793e9 \
--hash=sha256:97cba51526c829282218feb99dab1b1e6bdf8efd1c43dc9d57be093c0d69c99a
# via jsonpatch
jsonschema==3.2.0 \
--hash=sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163 \
--hash=sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a
# via
# aws-sam-translator
# cfn-lint
junit-xml==1.9 \
--hash=sha256:ec5ca1a55aefdd76d28fcc0b135251d156c7106fa979686a4b48d62b761b4732
# via cfn-lint
# via aws-sam-translator
markupsafe==2.1.1 \
--hash=sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003 \
--hash=sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88 \
Expand Down Expand Up @@ -296,16 +265,6 @@ markupsafe==2.1.1 \
--hash=sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a \
--hash=sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7
# via jinja2
networkx==2.6.3 \
--hash=sha256:80b6b89c77d1dfb64a4c7854981b60aeea6360ac02c6d4e4913319e0a313abef \
--hash=sha256:c0946ed31d71f1b732b5aaa6da5a0388a345019af232ce2f49c766e2d6795c51
# via cfn-lint
pbr==5.11.0 \
--hash=sha256:b97bc6695b2aff02144133c2e7399d5885223d42b7912ffaec2ca3898e673bfe \
--hash=sha256:db2317ff07c84c4c63648c9064a79fe9d9f5c7ce85a9099d4b6258b3db83225a
# via
# jschema-to-python
# sarif-om
pycparser==2.21 \
--hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \
--hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206
Expand Down Expand Up @@ -363,7 +322,6 @@ pyyaml==5.4.1 \
--hash=sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0
# via
# aws-sam-cli (setup.py)
# cfn-lint
# cookiecutter
# serverlessrepo
regex==2021.9.30 \
Expand Down Expand Up @@ -461,10 +419,6 @@ s3transfer==0.5.0 \
--hash=sha256:50ed823e1dc5868ad40c8dc92072f757aa0e653a192845c94a3b676f4a62da4c \
--hash=sha256:9c1dc369814391a6bda20ebbf4b70a0f34630592c9aa520856bf384916af2803
# via boto3
sarif-om==1.0.4 \
--hash=sha256:539ef47a662329b1c8502388ad92457425e95dc0aaaf995fe46f4984c4771911 \
--hash=sha256:cd5f416b3083e00d402a92e449a7ff67af46f11241073eea0461802a3b5aef98
# via cfn-lint
serverlessrepo==0.1.10 \
--hash=sha256:671f48038123f121437b717ed51f253a55775590f00fbab6fbc6a01f8d05c017 \
--hash=sha256:b99c69be8ce87ccc48103fbe371ba7b148c3374c57862e59118c402522e5ed52
Expand All @@ -481,7 +435,6 @@ six==1.15.0 \
# via
# docker
# jsonschema
# junit-xml
# python-dateutil
# serverlessrepo
# websocket-client
Expand Down
9 changes: 0 additions & 9 deletions samcli/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@ def region_option(f):

def callback(ctx, param, value):
state = ctx.ensure_object(Context)
from botocore import exceptions, utils
from samcli.commands.exceptions import RegionError

try:
utils.validate_region_name(value)
except exceptions.InvalidRegionError as ex:
raise RegionError(
message=f"Provided region: {value} doesn't match a supported format", wrapped_from=ex.__class__.__name__
) from ex
state.region = value
return value

Expand Down
Loading

0 comments on commit 42e512d

Please sign in to comment.