From 40dabff773a2b4adef4221292b9e955bc921545d Mon Sep 17 00:00:00 2001 From: Daniel Mil <84205762+mildaniel@users.noreply.github.com> Date: Fri, 4 Aug 2023 14:13:08 -0700 Subject: [PATCH] Test/binary canaries (#5718) * chore: Update CFN Lint version to support python 3.11 (#5651) * Update CFN Lint version to support python 3.11 * Run make update-reproducible-reqs --------- Co-authored-by: Mohamed Elasmar <71043312+moelasmar@users.noreply.github.com> * fix: Require file label to run before maintainers (#5656) * Require file label to run before maintainers * Run maintainer label job even if previous job fails * Add Windows config * Fix formatting * Update config * test * Update config * Update config * Update config * Update config * chore: update aws_lambda_builders to 1.36.0 (#5655) Co-authored-by: GitHub Action Co-authored-by: Mohamed Elasmar <71043312+moelasmar@users.noreply.github.com> * Update config * Update config * fix(invoke): Write in UTF-8 string instead of bytes (#5642) * Revert "fix: Revert UTF-8 fixes #5485 and #5427 (#5512)" This reverts commit 36f8bf970df7a8072eef58ca76405c40e1cc1c90. * Enforce utf8 on stdout/stderr/logfile --------- Co-authored-by: Jacob Fuss * chore(deps): bump cryptography from 41.0.2 to 41.0.3 in /requirements (#5675) Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.2 to 41.0.3. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/41.0.2...41.0.3) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add linux config * fix(test): Force reading file with utf8 in tests for windows (#5679) Co-authored-by: Jacob Fuss * fix(test): Increase max execution time for timeout tests (#5680) Co-authored-by: Jacob Fuss * Update install links * Update linux config * Update linux config * Update linux config * Update linux config * Update linux config * Update linux config * Update linux config * Update linux config * Update linux config * Update linux config * Update linux config * chore: auto update reproducible requirements when there is a dependency change (#5677) * chore: add reproducible gha * format * formatting v2 * format v3 * use win make target * update windows job * update win paths * why windows why * remove if stmt for now * test with direct paths * update windows paths again * bring back activate * add dummy win file and push changes * update base.txt for testing * Update reproducibles * run jobs sequentially * print changed flag * check changes again * run git status before moving forward * refresh index before checking any changed files * Update reproducibles * commit or skip * Update reproducibles * rerun build & pyinstaller jobs once update reproducible finishes * add more details to commit message * nuke all reproducibles to trigger the CI * Update reproducibles: update-reproducible-linux-reqs * Update reproducibles: update-reproducible-mac-reqs * Update reproducibles: update-reproducible-win-reqs * change lb version for testing * update permissions and limit only for aws/aws-sam-cli * Update reproducibles: update-reproducible-linux-reqs * Update reproducibles: update-reproducible-mac-reqs * Update reproducibles: update-reproducible-win-reqs * update other jobs as well * run without file filter * Update reproducibles: update-reproducible-linux-reqs * Update reproducibles: update-reproducible-mac-reqs * Update reproducibles: update-reproducible-win-reqs * put the file filter back --------- Co-authored-by: GitHub Action * fix: Repair failing integration test (#5698) * Fix failing integration test * Be more specific with error message --------- Co-authored-by: Leonardo Gama * Update Windows config * fix: link the API gateway resource parent to either rest api or another gateway resource (#5697) * Update Windows config * Update Windows config * Update Windows config * Update Windows config * Update Windows config * Update Windows config * Update Windows config * Update Windows config * Revert "Test/binary canaries (#5706)" This reverts commit 8a9e0c92f2f0f250316babc36312d523c23dced4. * Update Windows config * Update Windows config --------- Signed-off-by: dependabot[bot] Co-authored-by: Connor Kirkpatrick Co-authored-by: Mohamed Elasmar <71043312+moelasmar@users.noreply.github.com> Co-authored-by: Lucas <12496191+lucashuy@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: GitHub Action Co-authored-by: Jacob Fuss <32497805+jfuss@users.noreply.github.com> Co-authored-by: Jacob Fuss Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com> Co-authored-by: Leonardo Gama <51037424+Leo10Gama@users.noreply.github.com> Co-authored-by: Leonardo Gama --- appveyor-windows-binary.yml | 5 +++-- tests/testing_utils.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/appveyor-windows-binary.yml b/appveyor-windows-binary.yml index 3e8e25772d..4cd5221819 100644 --- a/appveyor-windows-binary.yml +++ b/appveyor-windows-binary.yml @@ -41,6 +41,8 @@ environment: AWS_ECR: "AWS_ECR_TESTING" APPVEYOR_CONSOLE_DISABLE_PTY: true + SAM_WINDOWS_BINARY_PATH: "C:\\Program Files\\Amazon\\AWSSAMCLI_NIGHTLY\\bin\\sam-nightly.cmd" + init: # Uncomment this for RDP # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) @@ -137,10 +139,9 @@ install: - ps: " Invoke-WebRequest -Uri https://github.com/aws/aws-sam-cli/releases/download/sam-cli-nightly/AWS_SAM_CLI_64_PY3.msi -OutFile aws-sam-cli-installer.msi; Start-Process 'C:\\Windows\\System32\\msiexec.exe' -ArgumentList '/i aws-sam-cli-installer.msi /qn /norestart' -wait -PassThru; - Rename-Item -Path 'C:\\Program Files\\Amazon\\AWSSAMCLI_NIGHTLY\\bin\\sam-nightly.cmd' -NewName 'C:\\Program Files\\Amazon\\AWSSAMCLI_NIGHTLY\\bin\\sam.cmd' " - 'set PATH=C:\Program Files\Amazon\AWSSAMCLI_NIGHTLY\bin\;%PATH%' - - 'sam --version' + - 'sam-nightly --version' # Echo final Path - "echo %PATH%" diff --git a/tests/testing_utils.py b/tests/testing_utils.py index 06e666ed4a..aa281091cf 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -46,8 +46,9 @@ def get_sam_command(): - if os.getenv("SAM_WINDOWS_BINARY_PATH"): - return os.getenv("SAM_WINDOWS_BINARY_PATH") + windows_bin_path = os.getenv("SAM_WINDOWS_BINARY_PATH") + if windows_bin_path: + return windows_bin_path return "samdev" if os.getenv("SAM_CLI_DEV") else "sam"