diff --git a/.github/workflows/update-reproducibles.yml b/.github/workflows/update-reproducibles.yml index b57cef5d3d..80dd5ad387 100644 --- a/.github/workflows/update-reproducibles.yml +++ b/.github/workflows/update-reproducibles.yml @@ -22,7 +22,7 @@ jobs: python: 3.11 target: update-reproducible-linux-reqs - os: macos-latest - python: 3.8 + python: 3.11 target: update-reproducible-mac-reqs - os: windows-latest python: 3.12 diff --git a/Makefile b/Makefile index 5083326961..5ab70d44d2 100644 --- a/Makefile +++ b/Makefile @@ -58,11 +58,9 @@ schema: # Verifications to run before sending a pull request pr: init dev schema black-check -# (jfuss) We updated to have two requirement files, one for mac and one for linux. This -# is meant to be a short term fix when upgrading the Linux installer to be python3.11 from -# python3.7. Having different requirements is not ideal but this allows us to isolate changes -# giving us the ability to roll out upgrade to Linux first. When we update the MacOS installer -# we can move to a single file again. +# lucashuy: Linux and MacOS are on the same Python version, +# however we should follow up in a different change +# to consider combining these files again update-reproducible-linux-reqs: python3.11 -m venv venv-update-reproducible-linux venv-update-reproducible-linux/bin/pip install --upgrade pip-tools pip @@ -70,7 +68,7 @@ update-reproducible-linux-reqs: venv-update-reproducible-linux/bin/pip-compile --generate-hashes --allow-unsafe -o requirements/reproducible-linux.txt update-reproducible-mac-reqs: - python3.8 -m venv venv-update-reproducible-mac + python3.11 -m venv venv-update-reproducible-mac venv-update-reproducible-mac/bin/pip install --upgrade pip-tools pip venv-update-reproducible-mac/bin/pip install -r requirements/base.txt venv-update-reproducible-mac/bin/pip-compile --generate-hashes --allow-unsafe -o requirements/reproducible-mac.txt diff --git a/installer/pyinstaller/build-mac.sh b/installer/pyinstaller/build-mac.sh index 15d21737ee..190377d930 100755 --- a/installer/pyinstaller/build-mac.sh +++ b/installer/pyinstaller/build-mac.sh @@ -34,7 +34,7 @@ if [ "$openssl_version" = "" ]; then fi if [ "$python_version" = "" ]; then - python_version="3.8.20"; + python_version="3.11.10"; fi if ! [ "$build_binary_name" = "" ]; then @@ -100,7 +100,7 @@ sudo make -j8 install cd .. echo "Installing Python Libraries" -/usr/local/bin/python3.8 -m venv venv +/usr/local/bin/python3.11 -m venv venv ./venv/bin/pip install --upgrade pip ./venv/bin/pip install -r src/requirements/reproducible-mac.txt diff --git a/requirements/base.txt b/requirements/base.txt index 0028374120..59a7b10d84 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -34,4 +34,4 @@ tzlocal==5.2 cfn-lint~=1.20.1 # Type checking boto3 objects -boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.35.63 +boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.35.71 diff --git a/requirements/reproducible-linux.txt b/requirements/reproducible-linux.txt index 364c3f6233..bec6173cef 100644 --- a/requirements/reproducible-linux.txt +++ b/requirements/reproducible-linux.txt @@ -36,25 +36,25 @@ blinker==1.9.0 \ --hash=sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf \ --hash=sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc # via flask -boto3==1.35.63 \ - --hash=sha256:d0f938d4f6f392b6ffc5e75fff14a42e5bbb5228675a0367c8af55398abadbec \ - --hash=sha256:deb593d9a0fb240deb4c43e4da8e6626d7c36be7b2fd2fe28f49d44d395b7de0 +boto3==1.35.71 \ + --hash=sha256:3ed7172b3d4fceb6218bb0ec3668c4d40c03690939c2fca4f22bb875d741a07f \ + --hash=sha256:e2969a246bb3208122b3c349c49cc6604c6fc3fc2b2f65d99d3e8ccd745b0c16 # via # aws-sam-cli (setup.py) # aws-sam-translator -boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.35.63 \ - --hash=sha256:74663e6087360f49a4da4d2079bca6a809586f44d42238046d5a726c48be4a00 \ - --hash=sha256:cc471636d28f595bf750dc3c2079d16e988c9f518a66f50c9d62b0119c3f72cf +boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.35.71 \ + --hash=sha256:4abf357250bdb16d1a56489a59bfc385d132a43677956bd984f6578638d599c0 \ + --hash=sha256:50e20fa74248c96b3e3498b2d81388585583e38b9f0609d2fa58257e49c986a5 # via aws-sam-cli (setup.py) -botocore==1.35.63 \ - --hash=sha256:0ca1200694a4c0a3fa846795d8e8a08404c214e21195eb9e010c4b8a4ca78a4a \ - --hash=sha256:2b8196bab0a997d206c3d490b52e779ef47dffb68c57c685443f77293aca1589 +botocore==1.35.71 \ + --hash=sha256:f9fa058e0393660c3fe53c1e044751beb64b586def0bd2212448a7c328b0cbba \ + --hash=sha256:fc46e7ab1df3cef66dfba1633f4da77c75e07365b36f03bd64a3793634be8fc1 # via # boto3 # s3transfer -botocore-stubs==1.35.63 \ - --hash=sha256:7ac5cbfb3bf15106c3344a56d5e853c07dd1fc775ebc37ff1a2d2cb0e79b4ef1 \ - --hash=sha256:e7d1f5c704c837b751e5c2b1d128f7c889ab04ebf2d56143702f5fc92702858b +botocore-stubs==1.35.71 \ + --hash=sha256:7e938bb169c28faf05ce14e67bb0b5e5583092ab6ccc9d3d68d698530edb6584 \ + --hash=sha256:c5f7208b20ae19400fa73eb569017f1e372990f7a5505a72116ed6420904f666 # via boto3-stubs certifi==2024.8.30 \ --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ @@ -416,13 +416,13 @@ mpmath==1.3.0 \ --hash=sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f \ --hash=sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c # via sympy -mypy-boto3-apigateway==1.35.25 \ - --hash=sha256:436cee5bc8a4e75a116653dddf277b7582f331d7af8ac8c0195d2eb7828e45b8 \ - --hash=sha256:ea3b419ae868d63f0613eeacc6a75861fd57b689d6a14bb7562eed303913a5ae +mypy-boto3-apigateway==1.35.67 \ + --hash=sha256:799be089b61b3b1745c9359d34f42573624cb0d36812a4d19276680afd5f1b19 \ + --hash=sha256:7ee4e0957cd367f72e9aee5abdb2f7b5cefdc1da214e19272ef6741d0200299f # via boto3-stubs -mypy-boto3-cloudformation==1.35.41 \ - --hash=sha256:125698530718b36fd9e42a13cdc964028304440d80927adf2e1dfcf5e376839e \ - --hash=sha256:c7b190f7179cd328b323558d4cb07ce520492c9ed0541ebe7c47af53b207fa30 +mypy-boto3-cloudformation==1.35.64 \ + --hash=sha256:aba213f3411a65096a8d95633c36e0c57a775ac6ac9ccf1e6fd9bea4002073bc \ + --hash=sha256:d1a1500df811ac8ebd459640f5b31c14daac784d8a00fc4f67bc6eb391e7b5a8 # via boto3-stubs mypy-boto3-ecr==1.35.21 \ --hash=sha256:90a067cc131129e010887b8da3caa8d34d32da9c17121b5dc047f738c2c1f00c \ @@ -436,13 +436,13 @@ mypy-boto3-kinesis==1.35.26 \ --hash=sha256:865f2697f62dfc7d04052436a925bdf0d39a9317cde8c6981a6ac46e659c1c7f \ --hash=sha256:f5e526f3b91ac9709c487a4334853149c2cabb41700ef93827daeb742e05c05e # via boto3-stubs -mypy-boto3-lambda==1.35.58 \ - --hash=sha256:a75cad0637f88ee45d19e60e94fc391c3e6c5948864271ccb053ac6b2cadafb7 \ - --hash=sha256:c6807363ee18579b3d6dff7c090f64b462a1f243be46fe6847333624e31ebbfc +mypy-boto3-lambda==1.35.68 \ + --hash=sha256:00499898236fe423c9292f77644102d4bd6699b3c16b8c4062eb759c022447f5 \ + --hash=sha256:577a9465ac63ac564efc2755a7e72c28a9d2f496747c1faf242cb13d5017b262 # via boto3-stubs -mypy-boto3-s3==1.35.61 \ - --hash=sha256:4cfc410a02a302935876f0d1ae3f0738bf540acd686168790fb0c5986a085f1e \ - --hash=sha256:6965fe6c5f3d8362ac7895663540844ed29c885c92a62233c29a1c031ca28c90 +mypy-boto3-s3==1.35.69 \ + --hash=sha256:11a34259983e09d67e4d3a322fd47904a006bbfff19984e4e36a77e30f2014bb \ + --hash=sha256:97f7944a84a4a49282825bef1483a25680dcdce75da6017745d709d2cf2aa1c0 # via boto3-stubs mypy-boto3-schemas==1.35.0 \ --hash=sha256:a63cbf1c5189e29638b7f1522357db080bfd99e142110a06df6192b5d68f0dc8 \ @@ -460,17 +460,17 @@ mypy-boto3-sqs==1.35.0 \ --hash=sha256:61752f1c2bf2efa3815f64d43c25b4a39dbdbd9e472ae48aa18d7c6d2a7a6eb8 \ --hash=sha256:9fd6e622ed231c06f7542ba6f8f0eea92046cace24defa95d0d0ce04e7caee0c # via boto3-stubs -mypy-boto3-stepfunctions==1.35.54 \ - --hash=sha256:2ee7940aa2bda046197e296a5ba9c0e7ccc5350b509fd7a883f0667c183e3bfe \ - --hash=sha256:f0f260d44cd1beb70845ed37184b4c11bad7e8d8d55ac02aed86a1632d29e69c +mypy-boto3-stepfunctions==1.35.68 \ + --hash=sha256:4abef0d339463ebe612836f42154a092e95eed025baca9a15be1286cc9a90434 \ + --hash=sha256:ceea974dd9f779f19042dc6ce6ac64955036be9b825512a6a33eecb7d682f43c # via boto3-stubs mypy-boto3-sts==1.35.61 \ --hash=sha256:37465ba1d3202cd39b508c346955f9a5a2597071300791a569cbbc2ad7ab4dd1 \ --hash=sha256:cf8e7b49396e4ad3a5709d51034a4925afcf14f01fa42e1ae222d3b09f111054 # via boto3-stubs -mypy-boto3-xray==1.35.0 \ - --hash=sha256:a3c3a6d83f659f6dc4dbf392ac1481029af6b941e9485ea4878bbf60e338f82c \ - --hash=sha256:c3c7aff1b2d05e218f991ab74101d2296927553bbb7d4b2d961ffb7326995931 +mypy-boto3-xray==1.35.67 \ + --hash=sha256:289b4fed82208724d9a5f5eb662013e142dc9c1d78aab5950b58dfe3259a31b9 \ + --hash=sha256:36a4a1b7782777001083551ccd844496f71b42122fe4c3f95fc0a9d512a7317f # via boto3-stubs networkx==3.4.2 \ --hash=sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1 \ diff --git a/requirements/reproducible-mac.txt b/requirements/reproducible-mac.txt index c9e65bcb17..1eef9f4b9c 100644 --- a/requirements/reproducible-mac.txt +++ b/requirements/reproducible-mac.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile --allow-unsafe --generate-hashes --output-file=requirements/reproducible-mac.txt @@ -28,24 +28,6 @@ aws-sam-translator==1.94.0 \ # via # aws-sam-cli (setup.py) # cfn-lint -backports-zoneinfo==0.2.1 \ - --hash=sha256:17746bd546106fa389c51dbea67c8b7c8f0d14b5526a579ca6ccf5ed72c526cf \ - --hash=sha256:1b13e654a55cd45672cb54ed12148cd33628f672548f373963b0bff67b217328 \ - --hash=sha256:1c5742112073a563c81f786e77514969acb58649bcdf6cdf0b4ed31a348d4546 \ - --hash=sha256:4a0f800587060bf8880f954dbef70de6c11bbe59c673c3d818921f042f9954a6 \ - --hash=sha256:5c144945a7752ca544b4b78c8c41544cdfaf9786f25fe5ffb10e838e19a27570 \ - --hash=sha256:7b0a64cda4145548fed9efc10322770f929b944ce5cee6c0dfe0c87bf4c0c8c9 \ - --hash=sha256:8439c030a11780786a2002261569bdf362264f605dfa4d65090b64b05c9f79a7 \ - --hash=sha256:8961c0f32cd0336fb8e8ead11a1f8cd99ec07145ec2931122faaac1c8f7fd987 \ - --hash=sha256:89a48c0d158a3cc3f654da4c2de1ceba85263fafb861b98b59040a5086259722 \ - --hash=sha256:a76b38c52400b762e48131494ba26be363491ac4f9a04c1b7e92483d169f6582 \ - --hash=sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc \ - --hash=sha256:e55b384612d93be96506932a786bbcde5a2db7a9e6a4bb4bffe8b733f5b9036b \ - --hash=sha256:e81b76cace8eda1fca50e345242ba977f9be6ae3945af8d46326d776b4cf78d1 \ - --hash=sha256:e8236383a20872c0cdf5a62b554b27538db7fa1bbec52429d8d106effbaeca08 \ - --hash=sha256:f04e857b59d9d1ccc39ce2da1021d196e47234873820cbeaad210724b1ee28ac \ - --hash=sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2 - # via tzlocal binaryornot==0.4.4 \ --hash=sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061 \ --hash=sha256:b8b71173c917bddcd2c16070412e369c3ed7f0528926f70cac18a6c97fd563e4 @@ -54,25 +36,25 @@ blinker==1.8.2 \ --hash=sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01 \ --hash=sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83 # via flask -boto3==1.35.63 \ - --hash=sha256:d0f938d4f6f392b6ffc5e75fff14a42e5bbb5228675a0367c8af55398abadbec \ - --hash=sha256:deb593d9a0fb240deb4c43e4da8e6626d7c36be7b2fd2fe28f49d44d395b7de0 +boto3==1.35.71 \ + --hash=sha256:3ed7172b3d4fceb6218bb0ec3668c4d40c03690939c2fca4f22bb875d741a07f \ + --hash=sha256:e2969a246bb3208122b3c349c49cc6604c6fc3fc2b2f65d99d3e8ccd745b0c16 # via # aws-sam-cli (setup.py) # aws-sam-translator -boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.35.63 \ - --hash=sha256:74663e6087360f49a4da4d2079bca6a809586f44d42238046d5a726c48be4a00 \ - --hash=sha256:cc471636d28f595bf750dc3c2079d16e988c9f518a66f50c9d62b0119c3f72cf +boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.35.71 \ + --hash=sha256:4abf357250bdb16d1a56489a59bfc385d132a43677956bd984f6578638d599c0 \ + --hash=sha256:50e20fa74248c96b3e3498b2d81388585583e38b9f0609d2fa58257e49c986a5 # via aws-sam-cli (setup.py) -botocore==1.35.63 \ - --hash=sha256:0ca1200694a4c0a3fa846795d8e8a08404c214e21195eb9e010c4b8a4ca78a4a \ - --hash=sha256:2b8196bab0a997d206c3d490b52e779ef47dffb68c57c685443f77293aca1589 +botocore==1.35.71 \ + --hash=sha256:f9fa058e0393660c3fe53c1e044751beb64b586def0bd2212448a7c328b0cbba \ + --hash=sha256:fc46e7ab1df3cef66dfba1633f4da77c75e07365b36f03bd64a3793634be8fc1 # via # boto3 # s3transfer -botocore-stubs==1.35.63 \ - --hash=sha256:7ac5cbfb3bf15106c3344a56d5e853c07dd1fc775ebc37ff1a2d2cb0e79b4ef1 \ - --hash=sha256:e7d1f5c704c837b751e5c2b1d128f7c889ab04ebf2d56143702f5fc92702858b +botocore-stubs==1.35.71 \ + --hash=sha256:7e938bb169c28faf05ce14e67bb0b5e5583092ab6ccc9d3d68d698530edb6584 \ + --hash=sha256:c5f7208b20ae19400fa73eb569017f1e372990f7a5505a72116ed6420904f666 # via boto3-stubs certifi==2024.8.30 \ --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ @@ -322,16 +304,6 @@ idna==3.10 \ --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 # via requests -importlib-metadata==8.5.0 \ - --hash=sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b \ - --hash=sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7 - # via flask -importlib-resources==6.4.5 \ - --hash=sha256:980862a1d16c9e147a59603677fa2aa5fd82b87f223b6cb870695bcfce830065 \ - --hash=sha256:ac29d5f956f01d5e4bb63102a5a19957f1b9175e45649977264a1416783bb717 - # via - # jsonschema - # jsonschema-specifications itsdangerous==2.2.0 \ --hash=sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef \ --hash=sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173 @@ -443,13 +415,13 @@ mpmath==1.3.0 \ --hash=sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f \ --hash=sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c # via sympy -mypy-boto3-apigateway==1.35.25 \ - --hash=sha256:436cee5bc8a4e75a116653dddf277b7582f331d7af8ac8c0195d2eb7828e45b8 \ - --hash=sha256:ea3b419ae868d63f0613eeacc6a75861fd57b689d6a14bb7562eed303913a5ae +mypy-boto3-apigateway==1.35.67 \ + --hash=sha256:799be089b61b3b1745c9359d34f42573624cb0d36812a4d19276680afd5f1b19 \ + --hash=sha256:7ee4e0957cd367f72e9aee5abdb2f7b5cefdc1da214e19272ef6741d0200299f # via boto3-stubs -mypy-boto3-cloudformation==1.35.41 \ - --hash=sha256:125698530718b36fd9e42a13cdc964028304440d80927adf2e1dfcf5e376839e \ - --hash=sha256:c7b190f7179cd328b323558d4cb07ce520492c9ed0541ebe7c47af53b207fa30 +mypy-boto3-cloudformation==1.35.64 \ + --hash=sha256:aba213f3411a65096a8d95633c36e0c57a775ac6ac9ccf1e6fd9bea4002073bc \ + --hash=sha256:d1a1500df811ac8ebd459640f5b31c14daac784d8a00fc4f67bc6eb391e7b5a8 # via boto3-stubs mypy-boto3-ecr==1.35.21 \ --hash=sha256:90a067cc131129e010887b8da3caa8d34d32da9c17121b5dc047f738c2c1f00c \ @@ -463,13 +435,13 @@ mypy-boto3-kinesis==1.35.26 \ --hash=sha256:865f2697f62dfc7d04052436a925bdf0d39a9317cde8c6981a6ac46e659c1c7f \ --hash=sha256:f5e526f3b91ac9709c487a4334853149c2cabb41700ef93827daeb742e05c05e # via boto3-stubs -mypy-boto3-lambda==1.35.58 \ - --hash=sha256:a75cad0637f88ee45d19e60e94fc391c3e6c5948864271ccb053ac6b2cadafb7 \ - --hash=sha256:c6807363ee18579b3d6dff7c090f64b462a1f243be46fe6847333624e31ebbfc +mypy-boto3-lambda==1.35.68 \ + --hash=sha256:00499898236fe423c9292f77644102d4bd6699b3c16b8c4062eb759c022447f5 \ + --hash=sha256:577a9465ac63ac564efc2755a7e72c28a9d2f496747c1faf242cb13d5017b262 # via boto3-stubs -mypy-boto3-s3==1.35.61 \ - --hash=sha256:4cfc410a02a302935876f0d1ae3f0738bf540acd686168790fb0c5986a085f1e \ - --hash=sha256:6965fe6c5f3d8362ac7895663540844ed29c885c92a62233c29a1c031ca28c90 +mypy-boto3-s3==1.35.69 \ + --hash=sha256:11a34259983e09d67e4d3a322fd47904a006bbfff19984e4e36a77e30f2014bb \ + --hash=sha256:97f7944a84a4a49282825bef1483a25680dcdce75da6017745d709d2cf2aa1c0 # via boto3-stubs mypy-boto3-schemas==1.35.0 \ --hash=sha256:a63cbf1c5189e29638b7f1522357db080bfd99e142110a06df6192b5d68f0dc8 \ @@ -487,26 +459,22 @@ mypy-boto3-sqs==1.35.0 \ --hash=sha256:61752f1c2bf2efa3815f64d43c25b4a39dbdbd9e472ae48aa18d7c6d2a7a6eb8 \ --hash=sha256:9fd6e622ed231c06f7542ba6f8f0eea92046cace24defa95d0d0ce04e7caee0c # via boto3-stubs -mypy-boto3-stepfunctions==1.35.54 \ - --hash=sha256:2ee7940aa2bda046197e296a5ba9c0e7ccc5350b509fd7a883f0667c183e3bfe \ - --hash=sha256:f0f260d44cd1beb70845ed37184b4c11bad7e8d8d55ac02aed86a1632d29e69c +mypy-boto3-stepfunctions==1.35.68 \ + --hash=sha256:4abef0d339463ebe612836f42154a092e95eed025baca9a15be1286cc9a90434 \ + --hash=sha256:ceea974dd9f779f19042dc6ce6ac64955036be9b825512a6a33eecb7d682f43c # via boto3-stubs mypy-boto3-sts==1.35.61 \ --hash=sha256:37465ba1d3202cd39b508c346955f9a5a2597071300791a569cbbc2ad7ab4dd1 \ --hash=sha256:cf8e7b49396e4ad3a5709d51034a4925afcf14f01fa42e1ae222d3b09f111054 # via boto3-stubs -mypy-boto3-xray==1.35.0 \ - --hash=sha256:a3c3a6d83f659f6dc4dbf392ac1481029af6b941e9485ea4878bbf60e338f82c \ - --hash=sha256:c3c7aff1b2d05e218f991ab74101d2296927553bbb7d4b2d961ffb7326995931 +mypy-boto3-xray==1.35.67 \ + --hash=sha256:289b4fed82208724d9a5f5eb662013e142dc9c1d78aab5950b58dfe3259a31b9 \ + --hash=sha256:36a4a1b7782777001083551ccd844496f71b42122fe4c3f95fc0a9d512a7317f # via boto3-stubs networkx==3.1 \ --hash=sha256:4f33f68cb2afcf86f28a45f43efc27a9386b535d567d2127f8f61d51dec58d36 \ --hash=sha256:de346335408f84de0eada6ff9fafafff9bcda11f0a0dfaa931133debb146ab61 # via cfn-lint -pkgutil-resolve-name==1.3.10 \ - --hash=sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174 \ - --hash=sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e - # via jsonschema pycparser==2.22 \ --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \ --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc @@ -1015,11 +983,9 @@ typing-extensions==4.12.2 \ --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 # via - # annotated-types # aws-sam-cli (setup.py) # aws-sam-translator # boto3-stubs - # botocore-stubs # cfn-lint # mypy-boto3-apigateway # mypy-boto3-cloudformation @@ -1037,7 +1003,6 @@ typing-extensions==4.12.2 \ # mypy-boto3-xray # pydantic # pydantic-core - # rich tzlocal==5.2 \ --hash=sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8 \ --hash=sha256:8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e @@ -1096,12 +1061,6 @@ wheel==0.45.1 \ --hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \ --hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248 # via aws-lambda-builders -zipp==3.20.2 \ - --hash=sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350 \ - --hash=sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29 - # via - # importlib-metadata - # importlib-resources # The following packages are considered to be unsafe in a requirements file: setuptools==75.3.0 \ diff --git a/requirements/reproducible-win.txt b/requirements/reproducible-win.txt index 6a7c45f9c6..8412518c77 100644 --- a/requirements/reproducible-win.txt +++ b/requirements/reproducible-win.txt @@ -36,25 +36,25 @@ blinker==1.9.0 \ --hash=sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf \ --hash=sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc # via flask -boto3==1.35.63 \ - --hash=sha256:d0f938d4f6f392b6ffc5e75fff14a42e5bbb5228675a0367c8af55398abadbec \ - --hash=sha256:deb593d9a0fb240deb4c43e4da8e6626d7c36be7b2fd2fe28f49d44d395b7de0 +boto3==1.35.71 \ + --hash=sha256:3ed7172b3d4fceb6218bb0ec3668c4d40c03690939c2fca4f22bb875d741a07f \ + --hash=sha256:e2969a246bb3208122b3c349c49cc6604c6fc3fc2b2f65d99d3e8ccd745b0c16 # via # aws-sam-cli (setup.py) # aws-sam-translator -boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.35.63 \ - --hash=sha256:74663e6087360f49a4da4d2079bca6a809586f44d42238046d5a726c48be4a00 \ - --hash=sha256:cc471636d28f595bf750dc3c2079d16e988c9f518a66f50c9d62b0119c3f72cf +boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.35.71 \ + --hash=sha256:4abf357250bdb16d1a56489a59bfc385d132a43677956bd984f6578638d599c0 \ + --hash=sha256:50e20fa74248c96b3e3498b2d81388585583e38b9f0609d2fa58257e49c986a5 # via aws-sam-cli (setup.py) -botocore==1.35.63 \ - --hash=sha256:0ca1200694a4c0a3fa846795d8e8a08404c214e21195eb9e010c4b8a4ca78a4a \ - --hash=sha256:2b8196bab0a997d206c3d490b52e779ef47dffb68c57c685443f77293aca1589 +botocore==1.35.71 \ + --hash=sha256:f9fa058e0393660c3fe53c1e044751beb64b586def0bd2212448a7c328b0cbba \ + --hash=sha256:fc46e7ab1df3cef66dfba1633f4da77c75e07365b36f03bd64a3793634be8fc1 # via # boto3 # s3transfer -botocore-stubs==1.35.63 \ - --hash=sha256:7ac5cbfb3bf15106c3344a56d5e853c07dd1fc775ebc37ff1a2d2cb0e79b4ef1 \ - --hash=sha256:e7d1f5c704c837b751e5c2b1d128f7c889ab04ebf2d56143702f5fc92702858b +botocore-stubs==1.35.71 \ + --hash=sha256:7e938bb169c28faf05ce14e67bb0b5e5583092ab6ccc9d3d68d698530edb6584 \ + --hash=sha256:c5f7208b20ae19400fa73eb569017f1e372990f7a5505a72116ed6420904f666 # via boto3-stubs certifi==2024.8.30 \ --hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \ @@ -420,13 +420,13 @@ mpmath==1.3.0 \ --hash=sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f \ --hash=sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c # via sympy -mypy-boto3-apigateway==1.35.25 \ - --hash=sha256:436cee5bc8a4e75a116653dddf277b7582f331d7af8ac8c0195d2eb7828e45b8 \ - --hash=sha256:ea3b419ae868d63f0613eeacc6a75861fd57b689d6a14bb7562eed303913a5ae +mypy-boto3-apigateway==1.35.67 \ + --hash=sha256:799be089b61b3b1745c9359d34f42573624cb0d36812a4d19276680afd5f1b19 \ + --hash=sha256:7ee4e0957cd367f72e9aee5abdb2f7b5cefdc1da214e19272ef6741d0200299f # via boto3-stubs -mypy-boto3-cloudformation==1.35.41 \ - --hash=sha256:125698530718b36fd9e42a13cdc964028304440d80927adf2e1dfcf5e376839e \ - --hash=sha256:c7b190f7179cd328b323558d4cb07ce520492c9ed0541ebe7c47af53b207fa30 +mypy-boto3-cloudformation==1.35.64 \ + --hash=sha256:aba213f3411a65096a8d95633c36e0c57a775ac6ac9ccf1e6fd9bea4002073bc \ + --hash=sha256:d1a1500df811ac8ebd459640f5b31c14daac784d8a00fc4f67bc6eb391e7b5a8 # via boto3-stubs mypy-boto3-ecr==1.35.21 \ --hash=sha256:90a067cc131129e010887b8da3caa8d34d32da9c17121b5dc047f738c2c1f00c \ @@ -440,13 +440,13 @@ mypy-boto3-kinesis==1.35.26 \ --hash=sha256:865f2697f62dfc7d04052436a925bdf0d39a9317cde8c6981a6ac46e659c1c7f \ --hash=sha256:f5e526f3b91ac9709c487a4334853149c2cabb41700ef93827daeb742e05c05e # via boto3-stubs -mypy-boto3-lambda==1.35.58 \ - --hash=sha256:a75cad0637f88ee45d19e60e94fc391c3e6c5948864271ccb053ac6b2cadafb7 \ - --hash=sha256:c6807363ee18579b3d6dff7c090f64b462a1f243be46fe6847333624e31ebbfc +mypy-boto3-lambda==1.35.68 \ + --hash=sha256:00499898236fe423c9292f77644102d4bd6699b3c16b8c4062eb759c022447f5 \ + --hash=sha256:577a9465ac63ac564efc2755a7e72c28a9d2f496747c1faf242cb13d5017b262 # via boto3-stubs -mypy-boto3-s3==1.35.61 \ - --hash=sha256:4cfc410a02a302935876f0d1ae3f0738bf540acd686168790fb0c5986a085f1e \ - --hash=sha256:6965fe6c5f3d8362ac7895663540844ed29c885c92a62233c29a1c031ca28c90 +mypy-boto3-s3==1.35.69 \ + --hash=sha256:11a34259983e09d67e4d3a322fd47904a006bbfff19984e4e36a77e30f2014bb \ + --hash=sha256:97f7944a84a4a49282825bef1483a25680dcdce75da6017745d709d2cf2aa1c0 # via boto3-stubs mypy-boto3-schemas==1.35.0 \ --hash=sha256:a63cbf1c5189e29638b7f1522357db080bfd99e142110a06df6192b5d68f0dc8 \ @@ -464,17 +464,17 @@ mypy-boto3-sqs==1.35.0 \ --hash=sha256:61752f1c2bf2efa3815f64d43c25b4a39dbdbd9e472ae48aa18d7c6d2a7a6eb8 \ --hash=sha256:9fd6e622ed231c06f7542ba6f8f0eea92046cace24defa95d0d0ce04e7caee0c # via boto3-stubs -mypy-boto3-stepfunctions==1.35.54 \ - --hash=sha256:2ee7940aa2bda046197e296a5ba9c0e7ccc5350b509fd7a883f0667c183e3bfe \ - --hash=sha256:f0f260d44cd1beb70845ed37184b4c11bad7e8d8d55ac02aed86a1632d29e69c +mypy-boto3-stepfunctions==1.35.68 \ + --hash=sha256:4abef0d339463ebe612836f42154a092e95eed025baca9a15be1286cc9a90434 \ + --hash=sha256:ceea974dd9f779f19042dc6ce6ac64955036be9b825512a6a33eecb7d682f43c # via boto3-stubs mypy-boto3-sts==1.35.61 \ --hash=sha256:37465ba1d3202cd39b508c346955f9a5a2597071300791a569cbbc2ad7ab4dd1 \ --hash=sha256:cf8e7b49396e4ad3a5709d51034a4925afcf14f01fa42e1ae222d3b09f111054 # via boto3-stubs -mypy-boto3-xray==1.35.0 \ - --hash=sha256:a3c3a6d83f659f6dc4dbf392ac1481029af6b941e9485ea4878bbf60e338f82c \ - --hash=sha256:c3c7aff1b2d05e218f991ab74101d2296927553bbb7d4b2d961ffb7326995931 +mypy-boto3-xray==1.35.67 \ + --hash=sha256:289b4fed82208724d9a5f5eb662013e142dc9c1d78aab5950b58dfe3259a31b9 \ + --hash=sha256:36a4a1b7782777001083551ccd844496f71b42122fe4c3f95fc0a9d512a7317f # via boto3-stubs networkx==3.4.2 \ --hash=sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1 \ diff --git a/samcli/__init__.py b/samcli/__init__.py index c80e2016bd..f2234ebf97 100644 --- a/samcli/__init__.py +++ b/samcli/__init__.py @@ -2,4 +2,4 @@ SAM CLI version """ -__version__ = "1.131.0" +__version__ = "1.132.0" diff --git a/samcli/commands/_utils/options.py b/samcli/commands/_utils/options.py index c29168e2b9..624ad2bdbe 100644 --- a/samcli/commands/_utils/options.py +++ b/samcli/commands/_utils/options.py @@ -849,8 +849,10 @@ def resolve_image_repos_option(f): def use_container_build_click_option(): return click.option( - "--use-container", + "--use-container/--no-use-container", "-u", + required=False, + default=False, is_flag=True, help="Build functions within an AWS Lambda-like container.", ) diff --git a/samcli/runtime_config.json b/samcli/runtime_config.json index 8eeecc72ee..381559d9ef 100644 --- a/samcli/runtime_config.json +++ b/samcli/runtime_config.json @@ -1,3 +1,3 @@ { - "app_template_repo_commit": "e9255c4b848b523ca903e5ee0fbd28d52f2a4c4e" + "app_template_repo_commit": "4801f61b2288fa85f2e06cf5c1a8d8dbe22094cb" } diff --git a/tests/unit/commands/samconfig/test_samconfig.py b/tests/unit/commands/samconfig/test_samconfig.py index 92ccbd9315..ad3c10adc8 100644 --- a/tests/unit/commands/samconfig/test_samconfig.py +++ b/tests/unit/commands/samconfig/test_samconfig.py @@ -162,6 +162,182 @@ def test_build(self, do_cli_mock): "READ", ) + @patch("samcli.commands.build.command.do_cli") + def test_build_with_no_use_container(self, do_cli_mock): + config_values = { + "resource_logical_id": "foo", + "template_file": "mytemplate.yaml", + "base_dir": "basedir", + "build_dir": "builddir", + "cache_dir": "cachedir", + "cache": True, + "use_container": False, + "manifest": "requirements.txt", + "docker_network": "mynetwork", + "skip_pull_image": True, + "parameter_overrides": "ParameterKey=Key,ParameterValue=Value ParameterKey=Key2,ParameterValue=Value2", + "container_env_var": [("")], + "container_env_var_file": "file", + "build_image": [("")], + "exclude": [("")], + "mount_with": "read", + } + + with samconfig_parameters(["build"], self.scratch_dir, **config_values) as config_path: + from samcli.commands.build.command import cli + + LOG.debug(Path(config_path).read_text()) + runner = CliRunner() + result = runner.invoke(cli, []) + + LOG.info(result.output) + LOG.info(result.exception) + if result.exception: + LOG.exception("Command failed", exc_info=result.exc_info) + self.assertIsNone(result.exception) + + do_cli_mock.assert_called_with( + ANY, + "foo", + str(Path(os.getcwd(), "mytemplate.yaml")), + "basedir", + "builddir", + "cachedir", + True, + False, + False, + False, + "requirements.txt", + "mynetwork", + True, + {"Key": "Value", "Key2": "Value2"}, + None, + ("",), + "file", + ("",), + ("",), + None, + False, + "READ", + ) + + @patch("samcli.commands.build.command.do_cli") + def test_build_with_no_use_container_option(self, do_cli_mock): + config_values = { + "resource_logical_id": "foo", + "template_file": "mytemplate.yaml", + "base_dir": "basedir", + "build_dir": "builddir", + "cache_dir": "cachedir", + "cache": True, + "manifest": "requirements.txt", + "docker_network": "mynetwork", + "skip_pull_image": True, + "parameter_overrides": "ParameterKey=Key,ParameterValue=Value ParameterKey=Key2,ParameterValue=Value2", + "container_env_var": [("")], + "container_env_var_file": "file", + "build_image": [("")], + "exclude": [("")], + "mount_with": "read", + } + + with samconfig_parameters(["build"], self.scratch_dir, **config_values) as config_path: + from samcli.commands.build.command import cli + + LOG.debug(Path(config_path).read_text()) + runner = CliRunner() + result = runner.invoke(cli, ["--no-use-container"]) + + LOG.info(result.output) + LOG.info(result.exception) + if result.exception: + LOG.exception("Command failed", exc_info=result.exc_info) + self.assertIsNone(result.exception) + + do_cli_mock.assert_called_with( + ANY, + "foo", + str(Path(os.getcwd(), "mytemplate.yaml")), + "basedir", + "builddir", + "cachedir", + True, + False, + False, + False, + "requirements.txt", + "mynetwork", + True, + {"Key": "Value", "Key2": "Value2"}, + None, + ("",), + "file", + ("",), + ("",), + None, + False, + "READ", + ) + + @patch("samcli.commands.build.command.do_cli") + def test_build_with_no_use_container_override(self, do_cli_mock): + config_values = { + "resource_logical_id": "foo", + "template_file": "mytemplate.yaml", + "base_dir": "basedir", + "build_dir": "builddir", + "cache_dir": "cachedir", + "cache": True, + "use_container": True, + "manifest": "requirements.txt", + "docker_network": "mynetwork", + "skip_pull_image": True, + "parameter_overrides": "ParameterKey=Key,ParameterValue=Value ParameterKey=Key2,ParameterValue=Value2", + "container_env_var": [("")], + "container_env_var_file": "file", + "build_image": [("")], + "exclude": [("")], + "mount_with": "read", + } + + with samconfig_parameters(["build"], self.scratch_dir, **config_values) as config_path: + from samcli.commands.build.command import cli + + LOG.debug(Path(config_path).read_text()) + runner = CliRunner() + result = runner.invoke(cli, ["--no-use-container"]) + + LOG.info(result.output) + LOG.info(result.exception) + if result.exception: + LOG.exception("Command failed", exc_info=result.exc_info) + self.assertIsNone(result.exception) + + do_cli_mock.assert_called_with( + ANY, + "foo", + str(Path(os.getcwd(), "mytemplate.yaml")), + "basedir", + "builddir", + "cachedir", + True, + False, + False, + False, + "requirements.txt", + "mynetwork", + True, + {"Key": "Value", "Key2": "Value2"}, + None, + ("",), + "file", + ("",), + ("",), + None, + False, + "READ", + ) + @patch("samcli.commands.build.command.do_cli") def test_build_with_no_cached_override(self, do_cli_mock): config_values = { @@ -1027,6 +1203,278 @@ def test_sync( {"HelloWorld": ["file.txt", "other.txt"], "HelloMars": ["single.file"]}, ) + @patch("samcli.commands._utils.experimental.is_experimental_enabled") + @patch("samcli.lib.cli_validation.image_repository_validation._is_all_image_funcs_provided") + @patch("samcli.lib.cli_validation.image_repository_validation.get_template_artifacts_format") + @patch("samcli.commands._utils.template.get_template_artifacts_format") + @patch("samcli.commands._utils.options.get_template_artifacts_format") + @patch("samcli.commands.sync.command.do_cli") + def test_sync_with_no_use_container( + self, + do_cli_mock, + template_artifacts_mock1, + template_artifacts_mock2, + template_artifacts_mock3, + is_all_image_funcs_provided_mock, + experimental_mock, + ): + template_artifacts_mock1.return_value = [ZIP] + template_artifacts_mock2.return_value = [ZIP] + template_artifacts_mock3.return_value = [ZIP] + is_all_image_funcs_provided_mock.return_value = True + experimental_mock.return_value = True + + config_values = { + "template_file": "mytemplate.yaml", + "stack_name": "mystack", + "image_repository": "123456789012.dkr.ecr.us-east-1.amazonaws.com/test1", + "base_dir": "path", + "use_container": False, + "s3_bucket": "mybucket", + "s3_prefix": "myprefix", + "kms_key_id": "mykms", + "parameter_overrides": 'Key1=Value1 Key2="Multiple spaces in the value"', + "capabilities": "cap1 cap2", + "no_execute_changeset": True, + "role_arn": "arn", + "notification_arns": "notify1 notify2", + "tags": 'a=tag1 b="tag with spaces"', + "metadata": '{"m1": "value1", "m2": "value2"}', + "container_env_var_file": "file", + "guided": True, + "confirm_changeset": True, + "region": "myregion", + "signing_profiles": "function=profile:owner", + "watch_exclude": {"HelloWorld": ["file.txt", "other.txt"], "HelloMars": ["single.file"]}, + } + + with samconfig_parameters(["sync"], self.scratch_dir, **config_values) as config_path: + from samcli.commands.sync.command import cli + + LOG.debug(Path(config_path).read_text()) + runner = CliRunner() + result = runner.invoke(cli, []) + + LOG.info(result.output) + LOG.info(result.exception) + if result.exception: + LOG.exception("Command failed", exc_info=result.exc_info) + self.assertIsNone(result.exception) + + do_cli_mock.assert_called_with( + str(Path(os.getcwd(), "mytemplate.yaml")), + False, + False, + (), + (), + True, + True, + "mystack", + "myregion", + None, + "path", + {"Key1": "Value1", "Key2": "Multiple spaces in the value"}, + None, + "123456789012.dkr.ecr.us-east-1.amazonaws.com/test1", + None, + "mybucket", + "myprefix", + "mykms", + ["cap1", "cap2"], + "arn", + ["notify1", "notify2"], + {"a": "tag1", "b": "tag with spaces"}, + {"m1": "value1", "m2": "value2"}, + False, + "file", + (), + "samconfig.toml", + "default", + False, + {"HelloWorld": ["file.txt", "other.txt"], "HelloMars": ["single.file"]}, + ) + + @patch("samcli.commands._utils.experimental.is_experimental_enabled") + @patch("samcli.lib.cli_validation.image_repository_validation._is_all_image_funcs_provided") + @patch("samcli.lib.cli_validation.image_repository_validation.get_template_artifacts_format") + @patch("samcli.commands._utils.template.get_template_artifacts_format") + @patch("samcli.commands._utils.options.get_template_artifacts_format") + @patch("samcli.commands.sync.command.do_cli") + def test_sync_with_no_use_container_options( + self, + do_cli_mock, + template_artifacts_mock1, + template_artifacts_mock2, + template_artifacts_mock3, + is_all_image_funcs_provided_mock, + experimental_mock, + ): + template_artifacts_mock1.return_value = [ZIP] + template_artifacts_mock2.return_value = [ZIP] + template_artifacts_mock3.return_value = [ZIP] + is_all_image_funcs_provided_mock.return_value = True + experimental_mock.return_value = True + + config_values = { + "template_file": "mytemplate.yaml", + "stack_name": "mystack", + "image_repository": "123456789012.dkr.ecr.us-east-1.amazonaws.com/test1", + "base_dir": "path", + "s3_bucket": "mybucket", + "s3_prefix": "myprefix", + "kms_key_id": "mykms", + "parameter_overrides": 'Key1=Value1 Key2="Multiple spaces in the value"', + "capabilities": "cap1 cap2", + "no_execute_changeset": True, + "role_arn": "arn", + "notification_arns": "notify1 notify2", + "tags": 'a=tag1 b="tag with spaces"', + "metadata": '{"m1": "value1", "m2": "value2"}', + "container_env_var_file": "file", + "guided": True, + "confirm_changeset": True, + "region": "myregion", + "signing_profiles": "function=profile:owner", + "watch_exclude": {"HelloWorld": ["file.txt", "other.txt"], "HelloMars": ["single.file"]}, + } + + with samconfig_parameters(["sync"], self.scratch_dir, **config_values) as config_path: + from samcli.commands.sync.command import cli + + LOG.debug(Path(config_path).read_text()) + runner = CliRunner() + result = runner.invoke(cli, ["--no-use-container"]) + + LOG.info(result.output) + LOG.info(result.exception) + if result.exception: + LOG.exception("Command failed", exc_info=result.exc_info) + self.assertIsNone(result.exception) + + do_cli_mock.assert_called_with( + str(Path(os.getcwd(), "mytemplate.yaml")), + False, + False, + (), + (), + True, + True, + "mystack", + "myregion", + None, + "path", + {"Key1": "Value1", "Key2": "Multiple spaces in the value"}, + None, + "123456789012.dkr.ecr.us-east-1.amazonaws.com/test1", + None, + "mybucket", + "myprefix", + "mykms", + ["cap1", "cap2"], + "arn", + ["notify1", "notify2"], + {"a": "tag1", "b": "tag with spaces"}, + {"m1": "value1", "m2": "value2"}, + False, + "file", + (), + "samconfig.toml", + "default", + False, + {"HelloWorld": ["file.txt", "other.txt"], "HelloMars": ["single.file"]}, + ) + + @patch("samcli.commands._utils.experimental.is_experimental_enabled") + @patch("samcli.lib.cli_validation.image_repository_validation._is_all_image_funcs_provided") + @patch("samcli.lib.cli_validation.image_repository_validation.get_template_artifacts_format") + @patch("samcli.commands._utils.template.get_template_artifacts_format") + @patch("samcli.commands._utils.options.get_template_artifacts_format") + @patch("samcli.commands.sync.command.do_cli") + def test_sync_with_no_use_container_override( + self, + do_cli_mock, + template_artifacts_mock1, + template_artifacts_mock2, + template_artifacts_mock3, + is_all_image_funcs_provided_mock, + experimental_mock, + ): + template_artifacts_mock1.return_value = [ZIP] + template_artifacts_mock2.return_value = [ZIP] + template_artifacts_mock3.return_value = [ZIP] + is_all_image_funcs_provided_mock.return_value = True + experimental_mock.return_value = True + + config_values = { + "template_file": "mytemplate.yaml", + "stack_name": "mystack", + "image_repository": "123456789012.dkr.ecr.us-east-1.amazonaws.com/test1", + "base_dir": "path", + "use_container": True, + "s3_bucket": "mybucket", + "s3_prefix": "myprefix", + "kms_key_id": "mykms", + "parameter_overrides": 'Key1=Value1 Key2="Multiple spaces in the value"', + "capabilities": "cap1 cap2", + "no_execute_changeset": True, + "role_arn": "arn", + "notification_arns": "notify1 notify2", + "tags": 'a=tag1 b="tag with spaces"', + "metadata": '{"m1": "value1", "m2": "value2"}', + "container_env_var_file": "file", + "guided": True, + "confirm_changeset": True, + "region": "myregion", + "signing_profiles": "function=profile:owner", + "watch_exclude": {"HelloWorld": ["file.txt", "other.txt"], "HelloMars": ["single.file"]}, + } + + with samconfig_parameters(["sync"], self.scratch_dir, **config_values) as config_path: + from samcli.commands.sync.command import cli + + LOG.debug(Path(config_path).read_text()) + runner = CliRunner() + result = runner.invoke(cli, ["--no-use-container"]) + + LOG.info(result.output) + LOG.info(result.exception) + if result.exception: + LOG.exception("Command failed", exc_info=result.exc_info) + self.assertIsNone(result.exception) + + do_cli_mock.assert_called_with( + str(Path(os.getcwd(), "mytemplate.yaml")), + False, + False, + (), + (), + True, + True, + "mystack", + "myregion", + None, + "path", + {"Key1": "Value1", "Key2": "Multiple spaces in the value"}, + None, + "123456789012.dkr.ecr.us-east-1.amazonaws.com/test1", + None, + "mybucket", + "myprefix", + "mykms", + ["cap1", "cap2"], + "arn", + ["notify1", "notify2"], + {"a": "tag1", "b": "tag with spaces"}, + {"m1": "value1", "m2": "value2"}, + False, + "file", + (), + "samconfig.toml", + "default", + False, + {"HelloWorld": ["file.txt", "other.txt"], "HelloMars": ["single.file"]}, + ) + class TestSamConfigWithOverrides(TestCase): def setUp(self):