Skip to content

Commit 5a5ab3c

Browse files
authoredMar 7, 2024
Merge pull request #3560 from aws/release-v1.86.0
Release 1.86.0 (to main)
2 parents cf74322 + 62df231 commit 5a5ab3c

22 files changed

+1076
-627
lines changed
 

‎.github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
commit-message:
9+
prefix: chore
10+
include: scope
11+
reviewers:
12+
- aws/sae-enterprise
13+
open-pull-requests-limit: 10

‎.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
- "3.10"
2626
- "3.11"
2727
steps:
28-
- uses: actions/checkout@v3
29-
- uses: actions/setup-python@v4
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-python@v5
3030
with:
3131
python-version: ${{ matrix.python }}
3232
- run: make init

‎.github/workflows/check_compatibility.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111

1212
steps:
1313
- name: Checkout the PR
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

16-
- uses: actions/setup-python@v4
16+
- uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.10"
1919

@@ -29,7 +29,7 @@ jobs:
2929
cp bin/public_interface.py "${{ runner.temp }}"/public_interface.py
3030
3131
- name: Checkout the base
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
with:
3434
ref: "${{ github.base_ref }}"
3535

‎.github/workflows/close_issue_message.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@ jobs:
1414
# These inputs are both required
1515
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1616
message: |
17-
### ⚠️COMMENT VISIBILITY WARNING⚠️
18-
Comments on closed issues are hard for our team to see.
19-
If you need more assistance, please either tag a team member or open a new issue that references this one.
20-
If you wish to keep having a conversation with other community members under this issue feel free to do so.
17+
This issue is now closed. Comments on closed issues are hard for our team to see.
18+
If you need more assistance, please either tag a team member or open a new issue that references this one.

‎.github/workflows/codeql.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
47+
uses: github/codeql-action/init@v3
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v2
61+
uses: github/codeql-action/autobuild@v3
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -71,6 +71,6 @@ jobs:
7171
# ./location_of_script_within_repo/buildscript.sh
7272

7373
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v2
74+
uses: github/codeql-action/analyze@v3
7575
with:
7676
category: "/language:${{matrix.language}}"

‎.github/workflows/schema.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
pull-requests: write
1616

1717
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-python@v4
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
2020
with:
2121
python-version: "3.10"
2222

‎integration/helpers/deployer/deployer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import sys
3030
import time
3131
from collections import OrderedDict
32-
from datetime import datetime
32+
from datetime import datetime, timezone
3333

3434
import botocore
3535

@@ -140,7 +140,7 @@ def create_changeset(
140140
"ChangeSetType": changeset_type,
141141
"Parameters": parameter_values,
142142
"Capabilities": capabilities,
143-
"Description": f"Created by SAM CLI at {datetime.utcnow().isoformat()} UTC",
143+
"Description": f"Created by SAM CLI at {datetime.now(timezone.utc).isoformat()} UTC",
144144
"Tags": tags,
145145
}
146146

‎integration/helpers/deployer/utils/time_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def parse_date(date_string):
122122
# will use current local time as the base for subtraction, but falsely assume it is a UTC time. Therefore
123123
# the time that dateparser returns will be a `datetime` object that did not have any timezone information.
124124
# So be explicit to set the time to UTC.
125-
"RELATIVE_BASE": datetime.datetime.utcnow()
125+
"RELATIVE_BASE": datetime.datetime.now(datetime.timezone.utc)
126126
}
127127

128128
return dateparser.parse(date_string, settings=parser_settings)

‎samtranslator/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.85.0"
1+
__version__ = "1.86.0"

‎samtranslator/internal/data/aws_managed_policies.json

+133
Large diffs are not rendered by default.

‎samtranslator/metrics/metrics.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
22
Helper classes to publish metrics
33
"""
4+
45
import logging
56
from abc import ABC, abstractmethod
6-
from datetime import datetime
7+
from datetime import datetime, timezone
78
from typing import Any, Dict, List, Optional, TypedDict, Union
89

910
from samtranslator.internal.deprecation_control import deprecated
@@ -114,7 +115,7 @@ def __init__(
114115
self.value = value
115116
self.unit = unit
116117
self.dimensions = dimensions if dimensions else []
117-
self.timestamp = timestamp if timestamp else datetime.utcnow()
118+
self.timestamp = timestamp if timestamp else datetime.now(timezone.utc)
118119

119120
def get_metric_data(self) -> Dict[str, Any]:
120121
return {

‎samtranslator/model/eventsources/pull.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def _link_policy(self, role, destination_config_policy=None): # type: ignore[no
233233
if role.Policies and destination_config_policy not in role.Policies:
234234
policy_document = destination_config_policy.get("PolicyDocument")
235235
# do not add the policy if the same policy document is already present
236-
if policy_document not in [d["PolicyDocument"] for d in role.Policies]:
236+
if policy_document not in [d.get("PolicyDocument", {}) for d in role.Policies]:
237237
role.Policies.append(destination_config_policy)
238238

239239
def _validate_filter_criteria(self) -> None:

‎samtranslator/model/s3_utils/uri_parser.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def construct_s3_location_object(
8585

8686
s3_pointer = location_uri
8787

88-
else:
88+
elif isinstance(location_uri, str):
8989
# SSM Pattern found here https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html
9090
ssm_pattern = r"{{resolve:(ssm|ssm-secure|secretsmanager):[a-zA-Z0-9_.\-/]+(:\d+)?}}"
9191
match = search(ssm_pattern, location_uri)
@@ -107,6 +107,8 @@ def construct_s3_location_object(
107107
"parameter.",
108108
)
109109
s3_pointer = _s3_pointer
110+
else:
111+
raise InvalidResourceException(logical_id, f"'{property_name}' must be of type dict or string.")
110112

111113
code = {"S3Bucket": s3_pointer["Bucket"], "S3Key": s3_pointer["Key"]}
112114
if "Version" in s3_pointer:

0 commit comments

Comments
 (0)
Failed to load comments.