Skip to content

Commit 7473bd7

Browse files
authored
Merge pull request #3495 from aws/release-v1.83.0
Release 1.83.0 (to main)
2 parents 770a7ea + 715256b commit 7473bd7

File tree

96 files changed

+31128
-6383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+31128
-6383
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
os:
2121
- ubuntu-latest
2222
python:
23-
- "3.7"
2423
- "3.8"
2524
- "3.9"
2625
- "3.10"

DEVELOPMENT_GUIDE.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Environment setup
2626
-----------------
2727
### 1. Install Python versions
2828

29-
Our officially supported Python versions are 3.7, 3.8, 3.9 and 3.10.
29+
Our officially supported Python versions are 3.8, 3.9 and 3.10.
3030
Our CI/CD pipeline is setup to run unit tests against Python 3 versions. Make sure you test it before sending a Pull Request.
3131
See [Unit testing with multiple Python versions](#unit-testing-with-multiple-python-versions).
3232

@@ -40,12 +40,11 @@ easily setup multiple Python versions. For
4040
1. Install PyEnv -
4141
`curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash`
4242
1. Restart shell so the path changes take effect - `exec $SHELL`
43-
1. `pyenv install 3.7.16`
4443
1. `pyenv install 3.8.16`
4544
1. `pyenv install 3.9.16`
4645
1. `pyenv install 3.10.9`
4746
3. Make Python versions available in the project:
48-
`pyenv local 3.7.16 3.8.16 3.9.16 3.10.9`
47+
`pyenv local 3.8.16 3.9.16 3.10.9`
4948

5049
Note: also make sure the following lines were written into your `.bashrc` (or `.zshrc`, depending on which shell you are using):
5150
```
@@ -66,7 +65,7 @@ can be found [here](https://black.readthedocs.io/en/stable/editor_integration.ht
6665
Since black is installed in virtualenv, when you follow [this instruction](https://black.readthedocs.io/en/stable/editor_integration.html), `which black` might give you this
6766

6867
```bash
69-
(sam37) $ where black
68+
(sam38) $ where black
7069
/Users/<username>/.pyenv/shims/black
7170
```
7271

@@ -77,11 +76,11 @@ and this will happen:
7776
pyenv: black: command not found
7877
7978
The `black' command exists in these Python versions:
80-
3.7.9/envs/sam37
81-
sam37
79+
3.8.16/envs/sam38
80+
sam38
8281
```
8382

84-
A simple workaround is to use `/Users/<username>/.pyenv/versions/sam37/bin/black`
83+
A simple workaround is to use `/Users/<username>/.pyenv/versions/sam38/bin/black`
8584
instead of `/Users/<username>/.pyenv/shims/black`.
8685

8786
#### Pre-commit
@@ -99,15 +98,15 @@ handy plugin that can create virtualenv.
9998
Depending on the python version, the following commands would change to
10099
be the appropriate python version.
101100

102-
1. Create Virtualenv `sam37` for Python3.7: `pyenv virtualenv 3.7.9 sam37`
103-
1. Activate Virtualenv: `pyenv activate sam37`
101+
1. Create Virtualenv `sam38` for Python3.8: `pyenv virtualenv 3.8.16 sam38`
102+
1. Activate Virtualenv: `pyenv activate sam38`
104103

105104
### 4. Install dev version of SAM transform
106105

107106
We will install a development version of SAM transform from source into the
108107
virtualenv.
109108

110-
1. Activate Virtualenv: `pyenv activate sam37`
109+
1. Activate Virtualenv: `pyenv activate sam38`
111110
1. Install dev version of SAM transform: `make init`
112111

113112
Running tests
@@ -121,8 +120,8 @@ Run `make test` or `make test-fast`. Once all tests pass make sure to run
121120

122121
### Unit testing with multiple Python versions
123122

124-
Currently, our officially supported Python versions are 3.7, 3.8, 3.9 and 3.10. For the most
125-
part, code that works in Python3.7 will work in Pythons 3.8, 3.9 and 3.10. You only run into problems if you are
123+
Currently, our officially supported Python versions are 3.8, 3.9 and 3.10. For the most
124+
part, code that works in Python3.8 will work in Pythons 3.9 and 3.10. You only run into problems if you are
126125
trying to use features released in a higher version (for example features introduced into Python3.10
127126
will not work in Python3.9). If you want to test in many versions, you can create a virtualenv for
128127
each version and flip between them (sourcing the activate script). Typically, we run all tests in

HOWTO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Check out the [latest specification](versions/2016-10-31.md) for details on how
2121
You could also use the [aws-sam-cli](https://github.com/awslabs/aws-sam-cli) to get started
2222

2323
```shell
24-
$ sam init --runtime python3.7
24+
$ sam init --runtime python3.8
2525
```
2626
## Packing Artifacts
2727
Before you can deploy a SAM template, you should first upload your Lambda

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ prepare-companion-stack:
6565
fetch-schema-data:
6666
mkdir -p .tmp
6767

68-
curl -o .tmp/cfn-docs.json https://raw.githubusercontent.com/aws/aws-cdk/main/packages/%40aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json
68+
# aws-cdk updated where they store the cfn doc json files. See https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cfnspec/README.md
69+
bin/git_lfs_download.sh "https://raw.githubusercontent.com/cdklabs/awscdk-service-spec/main/sources/CloudFormationDocumentation/CloudFormationDocumentation.json"
6970

7071
curl -o .tmp/cloudformation.schema.json https://raw.githubusercontent.com/awslabs/goformation/master/schema/cloudformation.schema.json
7172

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ For a more thorough introduction, see the [this tutorial](https://docs.aws.amazo
8585
8686
### Setting up development environment
8787
88-
You'll need to have Python 3.7+ installed.
88+
You'll need to have Python 3.8+ installed.
8989
9090
Create a [virtual environment](https://docs.python.org/3/library/venv.html):
9191

bin/git_lfs_download.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
set -eux
3+
4+
# Here is the reference I found on how to download Git LFS file
5+
# https://gist.github.com/fkraeutli/66fa741d9a8c2a6a238a01d17ed0edc5#retrieving-lfs-files
6+
7+
# Check if a URL parameter is provided
8+
if [ $# -eq 0 ]; then
9+
echo "Script Usage: $0 <URL>"
10+
exit 1
11+
fi
12+
13+
# Get the URL from the first command-line parameter
14+
url="$1"
15+
16+
# Fetch the metadata from the URL
17+
response=$(curl -s "$url")
18+
19+
# Extract oid and size from the metadata
20+
oid=$(echo "$response" | grep '^oid' | cut -d: -f2)
21+
size=$(echo "$response" | grep 'size' | cut -d ' ' -f 2)
22+
23+
# String interpolation to create the request JSON content
24+
request_json=$(jq -nc --arg oid "$oid" --argjson size "$size" '{"operation":"download","objects":[{"oid":$oid,"size":$size}],"transfers":["basic"]}')
25+
26+
# Send a POST request to Git LFS with the retrieved metadata JSON content
27+
response=$(curl \
28+
-X POST \
29+
-H "Accept: application/vnd.git-lfs+json" \
30+
-H "Content-type: application/json" \
31+
-d "$request_json" \
32+
https://github.com/cdklabs/awscdk-service-spec.git/info/lfs/objects/batch)
33+
34+
# The above command should return a JSON object that tells you where the file is stored
35+
href=$(echo "$response" | jq -r '.objects[0].actions.download.href')
36+
37+
# Download the file and store it in .tmp/cfn-docs.json
38+
curl -o .tmp/cfn-docs.json $href

bin/run_cfn_lint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ if [ ! -d "${VENV}" ]; then
1010
fi
1111

1212
"${VENV}/bin/python" -m pip install cfn-lint==0.75.0 --upgrade --quiet
13+
# update cfn schema
14+
"${VENV}/bin/cfn-lint" -u
1315
"${VENV}/bin/cfn-lint" --format parseable

bin/transform-test-error-json-format.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
import sys
99
from pathlib import Path
1010

11-
from typing_extensions import Final
12-
1311
# To allow this script to be executed from other directories
1412
sys.path.insert(0, str(Path(__file__).absolute().parent.parent))
1513

1614
import json
17-
from typing import Type
15+
from typing import Final, Type
1816

1917
from bin._file_formatter import FileFormatter
2018

integration/combination/test_function_with_cwe_dlq_generated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_function_with_cwe(self):
3636

3737
# checking policy action
3838
actions = dlq_policy_statement["Action"]
39-
action_list = actions if type(actions) == list else [actions]
39+
action_list = actions if isinstance(actions, list) == list else [actions]
4040
self.assertEqual(len(action_list), 1, "Only one action must be in dead-letter queue policy")
4141
self.assertEqual(
4242
action_list[0], "sqs:SendMessage", "Action referenced in dead-letter queue policy must be 'sqs:SendMessage'"

integration/combination/test_function_with_msk.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
from integration.helpers.resource import current_region_does_not_support, generate_suffix
88

99

10+
# Mark this test suite as nonblocking tests since MSK Cluster creation can take
11+
# up to 30 minutes according to https://docs.aws.amazon.com/msk/latest/developerguide/troubleshooting.html#troubleshooting-cluster-stuck
12+
# This would cause the test to fail due to MSK Cluster did not stablize.
13+
# We should investigate any other cause of failures.
1014
@skipIf(current_region_does_not_support([MSK]), "MSK is not supported in this testing region")
1115
@nonblocking
1216
class TestFunctionWithMsk(BaseTest):

0 commit comments

Comments
 (0)