Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Rebase config project to develop #5406

Merged
merged 70 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
b55ed5e
fix: fix the hardcoded number of stages printed in logs. (#5210)
moelasmar May 26, 2023
b7557e9
feat: Linking Authorizers to Lambda functions using the invocation UR…
lucashuy May 27, 2023
22ebb02
chore(deps-dev): bump parameterized from 0.8.1 to 0.9.0 in /requireme…
dependabot[bot] May 29, 2023
4351748
chore(deps-dev): bump filelock from 3.10.7 to 3.12.0 in /requirements…
dependabot[bot] May 29, 2023
df1ea8e
chore(deps): bump attrs from 22.2.0 to 23.1.0 in /requirements (#5212)
dependabot[bot] May 29, 2023
d492512
feat: update SAM CLI with latest App Templates commit hash (#5211)
github-actions[bot] May 29, 2023
e080192
fix: fix failing Terraform integration test cases (#5218)
moelasmar May 30, 2023
39dda2e
chore: bump version to 1.85.0 (#5226)
moelasmar May 30, 2023
e80891d
chore: use the SAR Application created in testing accounts (#5221)
moelasmar May 30, 2023
4019581
chore: update aws_lambda_builders to 1.32.0 (#5215)
github-actions[bot] May 30, 2023
81d74e2
feat: Added linking Gateway Method to Lambda Authorizer (#5228)
lucashuy May 31, 2023
722f82b
feat: Return early during linking if no destination resources are fou…
lucashuy May 31, 2023
21c3d22
chore: Strengthen wording on "no Auth" during deploy (#5231)
jfuss May 31, 2023
6e4aeba
feat: Link Lambda Authorizer to Rest API (#5219)
lucashuy May 31, 2023
4ae77a8
feat: updating app templates repo hash with (9ee7db342025a42023882960…
github-actions[bot] Jun 1, 2023
aa7bf76
fix: handle edge cases with function sync flow in sam sync command (#…
mndeveci Jun 1, 2023
77832fa
chore: Upgrade Mac installer to Py3.11 (#5223)
jfuss Jun 2, 2023
39dd063
feat: updating app templates repo hash with (66f4a230d1c939a0c3f7b564…
github-actions[bot] Jun 2, 2023
9e4e2ec
Revert "chore: Upgrade Mac installer to Py3.11 (#5223)" (#5252)
hawflau Jun 2, 2023
ee5686a
fix: add 3.11 to classifiers and upgrade Docker (#5225)
sriram-mv Jun 2, 2023
9017599
fix: fix build and deploy SAR integration test cases (#5244)
moelasmar Jun 2, 2023
686a8de
chore(deps): bump markupsafe from 2.1.2 to 2.1.3 in /requirements (#5…
dependabot[bot] Jun 5, 2023
9970a30
chore(deps): bump pydantic from 1.10.7 to 1.10.8 in /requirements (#5…
dependabot[bot] Jun 5, 2023
c2dfd31
feat: Add click command for cloud invoke command (#5238)
hnnasit Jun 5, 2023
945bf7e
chore(deps-dev): bump boto3-stubs[apigateway,cloudformation,ecr,iam,l…
dependabot[bot] Jun 5, 2023
13e2c94
pin pytest-metadata to avoid its breaking change (#5261)
hawflau Jun 5, 2023
f99f169
chore: update aws_lambda_builders to 1.33.0 (#5262)
github-actions[bot] Jun 5, 2023
84a980f
chore: Add python3.11 to canaries (#5263)
mildaniel Jun 5, 2023
b68b5b2
Artifact export for GraphQLApi (#5250)
ssenchenko Jun 5, 2023
3f963bb
chore: bump version to 1.86.0 (#5266)
mndeveci Jun 5, 2023
3854434
fix: add constant str for enums to support deepcopy operation (#5265)
mndeveci Jun 6, 2023
915020d
update automated updates gha to force restart of status checks (#5269)
hawflau Jun 6, 2023
1cd24d4
integration tests for graphql resource package (#5271)
ssenchenko Jun 6, 2023
61b57f1
Revert "fix: add 3.11 to classifiers and upgrade Docker (#5225)"
mndeveci Jun 6, 2023
fee6d6a
chore: bump version to 1.86.1
mndeveci Jun 6, 2023
ec8f32e
chore: Upgrade Docker-py/ Support Py3.11 for running tests (#5279)
jfuss Jun 7, 2023
3f5b44a
test: GHA to Execute Test without Docker Running (#5290)
mildaniel Jun 8, 2023
2f9975b
fix: remove ruby3.2 from preview runtimes (#5296)
mndeveci Jun 8, 2023
22bee60
Fix: Force docker version to match 4.2's default version (#5305)
jfuss Jun 8, 2023
0081cba
chore: cleanup appveyor definitions for not running jobs which is alr…
mndeveci Jun 8, 2023
1256e91
fix: Fix failing tests on Python3.11 (#5317)
mildaniel Jun 9, 2023
87860b9
chore(deps): bump cryptography from 39.0.2 to 41.0.0 in /requirements…
dependabot[bot] Jun 9, 2023
4f23365
add sleep between close and reopen (#5320)
hawflau Jun 9, 2023
e187a53
GraphQLApi support for `sam deploy` (#5294)
ssenchenko Jun 9, 2023
76cc938
fix: Update Arn parsing logic and fix some edge cases/bug fixes for r…
hnnasit Jun 9, 2023
68ef0d9
chore: update aws_lambda_builders to 1.34.0 (#5343)
github-actions[bot] Jun 12, 2023
5f2e7de
test: test building npm and Typescript projects using external manife…
moelasmar Jun 12, 2023
dbd6f48
chore(deps-dev): bump ruff from 0.0.261 to 0.0.272 in /requirements (…
dependabot[bot] Jun 12, 2023
b4d4db2
chore(deps-dev): bump pytest-cov from 4.0.0 to 4.1.0 in /requirements…
dependabot[bot] Jun 12, 2023
f6cba8a
feat: add lambda streaming support for remote invoke (#5307)
mndeveci Jun 13, 2023
a3ec1bd
chore: bump version to 1.87.0
mndeveci Jun 13, 2023
7fef86d
Revert app templates gha (#5356)
hawflau Jun 13, 2023
0c5140a
refactor: make remote invoke reactive to display results as soon as t…
mndeveci Jun 14, 2023
6e0cb9c
refactor init_clients in sam delete (#5360)
hawflau Jun 14, 2023
2c8fab9
chore: update aws-sam-translator to 1.69.0 (#5370)
github-actions[bot] Jun 16, 2023
ad770e8
feat: sam remote invoke help text and UX fixes (#5366)
hnnasit Jun 16, 2023
eff3818
chore: temporary pin python version to 3.7.16 (#5384)
moelasmar Jun 19, 2023
e30e110
Updated cfn-lint to support ruby3.2 in validate (#5375)
lucashuy Jun 20, 2023
c72d51f
Remove unneeded test cases (#5374)
hawflau Jun 20, 2023
e96461a
feat: updating app templates repo hash with (67f28fd83477e0e15b394f99…
github-actions[bot] Jun 20, 2023
850215c
test: Integration tests for remote invoke on regular lambda functions…
hnnasit Jun 21, 2023
bcaa24a
feat: Make remote invoke command available (#5381)
hnnasit Jun 21, 2023
f348bb9
test: Remote invoke integration tests for response stream configured …
hnnasit Jun 21, 2023
16185b8
chore: bump version to 1.88.0 (#5393)
hnnasit Jun 21, 2023
1de499b
chore: fix issues with appveyor ubuntu setup #5395
mndeveci Jun 21, 2023
df0488d
chore: remove deprecated runtime dotnetcore3.1 (#5091)
moelasmar Jun 21, 2023
24d235e
fix(invoke): Write in UTF-8 string instead of bytes. (#5232)
jfuss Jun 21, 2023
cece0ff
Revert "fix(invoke): Write in UTF-8 string instead of bytes. (#5232)"…
jfuss Jun 22, 2023
984f337
Add sanity check script and use it in pyinstaller GHA (#5400)
hawflau Jun 22, 2023
b546ba0
Resolve changes
Jun 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 55 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ jobs:
- make-pr
- integration-tests
- smoke-and-functional-tests
- docker-disabled
steps:
- name: report-failure
if : |
needs.make-pr.result != 'success' ||
needs.integration-tests.result != 'success' ||
needs.smoke-and-functional-tests.result != 'success'
needs.smoke-and-functional-tests.result != 'success' ||
needs.docker-disabled.result != 'success'
run: exit 1
- name: report-success
run: exit 0
Expand All @@ -45,18 +47,27 @@ jobs:
fail-fast: false
matrix:
os:
# TODO: Add macos-latest; fails currently, see e.g. https://github.com/aws/aws-sam-cli/actions/runs/3596883449/jobs/6058055981
- macos-latest
- ubuntu-latest
- windows-latest
python:
- "3.7"
- "3.8"
- "3.9"
- "3.11"
steps:
- uses: actions/checkout@v3
# @melasmar
# TODO: Revert back to use 3.7 to all operating systems after the regression issue in Python
# https://github.com/actions/setup-python/issues/682 in github action got resolved
- uses: actions/setup-python@v4
if: matrix.os != 'macos-latest' || ( matrix.os == 'macos-latest' && matrix.python != '3.7' )
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-python@v4
if: matrix.os == 'macos-latest' && matrix.python == '3.7'
with:
python-version: "3.7.16"
- run: test -f "./.github/ISSUE_TEMPLATE/Bug_report.md" # prevent Bug_report.md from being renamed or deleted
- run: make init
- run: make pr
Expand Down Expand Up @@ -112,6 +123,7 @@ jobs:
3.8
3.9
3.10
3.11
${{ matrix.python }}
- uses: actions/setup-go@v4
with:
Expand Down Expand Up @@ -178,6 +190,7 @@ jobs:
- "3.7"
- "3.8"
- "3.9"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -187,3 +200,43 @@ jobs:
run: make init
- name: Run functional & smoke tests
run: pytest -vv -n 4 tests/functional tests/smoke

docker-disabled:
name: Docker-disabled Tests / ${{ matrix.os }}
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
env:
SAM_CLI_DEV: "1"
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
# These are the versions of Python that correspond to the supported Lambda runtimes
python-version: |
3.10
3.9
3.8
3.7
- name: Init samdev
run: make init
- name: Stop Docker Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo systemctl stop docker
- name: Stop Docker Windows
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: stop-service docker
- name: Check Docker not Running
run: docker info
id: run-docker-info
continue-on-error: true
- name: Report failure
if: steps.run-docker-info.outcome == 'success'
run: exit 1
- name: Run tests without Docker
run: pytest -vv tests/integration/buildcmd/test_build_cmd.py -k TestBuildCommand_PythonFunctions_WithoutDocker
17 changes: 15 additions & 2 deletions .github/workflows/validate_pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- develop

env:
CI_OVERRIDE: "1"

jobs:
build-for-linux:
name: build-pyinstaller-linux
Expand All @@ -15,15 +18,20 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Build PyInstaller
run: |
chmod +x ./installer/pyinstaller/build-linux.sh
CI_OVERRIDE=1 ./installer/pyinstaller/build-linux.sh aws-sam-cli-linux-x86_64.zip
./installer/pyinstaller/build-linux.sh aws-sam-cli-linux-x86_64.zip
- name: Basic tests for PyInstaller
run: |
unzip .build/output/aws-sam-cli-linux-x86_64.zip -d sam-installation
./sam-installation/install
sam-beta --version
./tests/sanity-check.sh
- uses: actions/upload-artifact@v3
with:
name: pyinstaller-linux-zip
Expand All @@ -41,15 +49,20 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Build PyInstaller
run: |
chmod +x ./installer/pyinstaller/build-mac.sh
CI_OVERRIDE=1 ./installer/pyinstaller/build-mac.sh aws-sam-cli-macos-x86_64.zip
./installer/pyinstaller/build-mac.sh aws-sam-cli-macos-x86_64.zip
- name: Basic tests for PyInstaller
run: |
unzip .build/output/aws-sam-cli-macos-x86_64.zip -d sam-installation
sudo ./sam-installation/install
sam-beta --version
./tests/sanity-check.sh
- uses: actions/upload-artifact@v3
with:
name: pyinstaller-macos-zip
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,6 @@ coverage.xml

# Temporary scratch directory used by the tests
tests/integration/buildcmd/scratch
tests/integration/testdata/buildcmd/Dotnetcore2.0/bin
tests/integration/testdata/buildcmd/Dotnetcore2.0/obj
tests/integration/testdata/buildcmd/Dotnetcore2.1/bin
tests/integration/testdata/buildcmd/Dotnetcore2.1/obj
tests/integration/testdata/buildcmd/Dotnetcore3.1/bin
tests/integration/testdata/buildcmd/Dotnetcore3.1/obj
tests/integration/testdata/buildcmd/Dotnet6/bin
tests/integration/testdata/buildcmd/Dotnet6/obj
tests/integration/testdata/buildcmd/Dotnet7/bin
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ lint:
# Linter performs static analysis to catch latent bugs
ruff samcli
# mypy performs type check
mypy --no-incremental setup.py samcli tests
mypy --exclude /testdata/ --exclude /init/templates/ --no-incremental setup.py samcli tests

# Command to run everytime you make changes to verify everything works
dev: lint test
Expand Down
61 changes: 8 additions & 53 deletions appveyor-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ environment:
- PYTHON_HOME: "$HOME/venv3.8/bin"
PYTHON_VERSION: '3.8'

- PYTHON_HOME: "$HOME/venv3.9/bin"
PYTHON_VERSION: '3.9'
- PYTHON_HOME: "$HOME/venv3.11/bin"
PYTHON_VERSION: '3.11'

install:
# AppVeyor's apt-get cache might be outdated, and the package could potentially be 404.
- sh: "sudo apt-get update"
- sh: "sudo apt-get update --allow-releaseinfo-change"

- sh: "gvm use go1.19"
- sh: "echo $PATH"
Expand All @@ -61,7 +61,8 @@ install:

- sh: "source ${HOME}/venv${PYTHON_VERSION}/bin/activate"
- sh: "rvm use 2.7.2"
- sh: "docker --version"
- sh: "docker info"
- sh: "docker version"
- sh: "nvm install ${NODE_VERSION}"
- sh: "npm install [email protected] -g"
- sh: "npm -v"
Expand All @@ -86,7 +87,7 @@ install:
- sh: "sudo apt install -y jq"

# install Terraform
- sh: "sudo apt update"
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
Expand Down Expand Up @@ -149,7 +150,8 @@ install:


build_script:
- "python -c \"import sys; print(sys.executable)\""
- "python -c \"import sys; print(sys.executable)\""
- "make init"

# Final clean up no matter success or failure
on_finish:
Expand All @@ -176,10 +178,6 @@ for:
- configuration: BuildIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/buildcmd --ignore=tests/integration/buildcmd/test_build_terraform_applications.py --ignore=tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Set JAVA_HOME to java11
Expand All @@ -193,10 +191,6 @@ for:
- configuration: LocalZipTerraformBuildIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Local ZIP Terraform Build In Container integ testing
Expand All @@ -206,10 +200,6 @@ for:
- configuration: LocalZipTerraformBuildInContainerIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# S3 ZIP Terraform Build integ testing
Expand All @@ -219,10 +209,6 @@ for:
- configuration: S3ZipTerraformBuildIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# S3 ZIP Terraform Build In Container integ testing
Expand All @@ -232,10 +218,6 @@ for:
- configuration: S3ZipTerraformBuildInContainerIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Other Terraform Build In Container integ testing
Expand All @@ -245,10 +227,6 @@ for:
- configuration: OtherTerraformBuildIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Integ testing deploy
Expand All @@ -258,7 +236,6 @@ for:
- configuration: DeployIntegTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/deploy -n 4 --reruns 4 --dist=loadgroup --json-report --json-report-file=TEST_REPORT-integration-deploy.json"

# Integ testing package
Expand All @@ -268,7 +245,6 @@ for:
- configuration: PackageIntegTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/package -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package.json"

# Integ testing delete
Expand All @@ -278,7 +254,6 @@ for:
- configuration: DeleteIntegTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/delete -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-delete.json"

# Integ testing sync
Expand All @@ -288,7 +263,6 @@ for:
- configuration: SyncIntegTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/sync -n 3 --reruns 3 --dist loadscope --json-report --json-report-file=TEST_REPORT-integration-sync.json"

# Integ testing local
Expand All @@ -298,11 +272,6 @@ for:
- configuration: LocalIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""
- "ruff samcli"

- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-local.json"

# End-to-end testing
Expand All @@ -312,7 +281,6 @@ for:
- configuration: EndToEndTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 --reruns 5 --dist loadscope tests/end_to_end --json-report --json-report-file=TEST_REPORT-end-to-end.json"

# Other testing
Expand All @@ -322,18 +290,5 @@ for:
- configuration: OtherTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""
- "ruff samcli"

# Dev Tests
- "pip install -e \".[dev]\""
- "pytest --cov samcli --cov-report term-missing --cov-fail-under 94 tests/unit --json-report --json-report-file=TEST_REPORT-unit.json"
- "ruff samcli"
- "mypy setup.py samcli tests"
- "pytest -n 4 tests/functional --json-report --json-report-file=TEST_REPORT-functional.json"

- sh: "pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others.json"
- sh: "pytest -vv tests/regression --json-report --json-report-file=TEST_REPORT-regression.json"
- sh: "black --check setup.py tests samcli"
- sh: "pytest -n 4 -vv tests/smoke --json-report --json-report-file=TEST_REPORT-smoke.json"
Loading