Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/aws/aws-sam-cli into al2…
Browse files Browse the repository at this point in the history
…023-test-changes-1
  • Loading branch information
jysheng123 committed Jul 16, 2024
2 parents e7fb19b + 2548a62 commit 196307a
Show file tree
Hide file tree
Showing 9 changed files with 674 additions and 657 deletions.
4 changes: 2 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ watchdog==4.0.1
rich~=13.7.1
pyopenssl~=24.1.0
# Pin to <4.18 to until SAM-T no longer uses RefResolver
jsonschema<4.23
jsonschema<4.24

# Needed for supporting Protocol in Python 3.7, Protocol class became public with python3.8
typing_extensions>=4.4.0,<5
Expand All @@ -31,4 +31,4 @@ tzlocal==5.2
cfn-lint~=0.87.7

# Type checking boto3 objects
boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.34.139
boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.34.143
8 changes: 4 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ types-pywin32==306.0.0.20240408
types-PyYAML==6.0.12.20240311
types-chevron==0.14.2.20240310
types-psutil==6.0.0.20240621
types-setuptools==70.2.0.20240704
types-setuptools==70.3.0.20240710
types-Pygments==2.18.0.20240506
types-colorama==0.4.15.20240311
types-dateparser==1.2.0.20240420
types-docutils==0.21.0.20240704
types-jsonschema==4.22.0.20240610
types-docutils==0.21.0.20240711
types-jsonschema==4.23.0.20240712
types-pyOpenSSL==24.1.0.20240425
# lucashuy: pin `types-request` based on the Python version since newer versions of
# the types require a newer version of requests, which is only installed in newer versions of Python
types-requests==2.31.0.6; python_version<"3.10"
types-requests==2.32.0.20240622; python_version>="3.10"
types-requests==2.32.0.20240712; python_version>="3.10"
types-urllib3==1.26.25.14

# Test requirements
Expand Down
2 changes: 1 addition & 1 deletion requirements/pre-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruff==0.5.0
ruff==0.5.1
4 changes: 2 additions & 2 deletions requirements/pyinstaller-build.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Executable binary builder requirements
setuptools==70.2.0
pyinstaller==6.8.0
setuptools==70.3.0
pyinstaller==6.9.0
433 changes: 217 additions & 216 deletions requirements/reproducible-linux.txt

Large diffs are not rendered by default.

433 changes: 217 additions & 216 deletions requirements/reproducible-mac.txt

Large diffs are not rendered by default.

433 changes: 217 additions & 216 deletions requirements/reproducible-win.txt

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions samcli/lib/sync/watch_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from samcli.lib.utils.colors import Colored, Colors
from samcli.lib.utils.path_observer import HandlerObserver
from samcli.lib.utils.resource_trigger import OnChangeCallback, TemplateTrigger
from samcli.local.lambdafn.exceptions import ResourceNotFound

if TYPE_CHECKING: # pragma: no cover
from samcli.commands.build.build_context import BuildContext
Expand Down Expand Up @@ -151,6 +152,16 @@ def _add_code_triggers(self) -> None:
extra=dict(markup=True),
)
continue
except ResourceNotFound:
LOG.warning(
self._color.color_log(
msg="CodeTrigger not created as %s is not found or is with a S3 Location.",
color=Colors.WARNING,
),
str(resource_id),
extra=dict(markup=True),
)
continue

if not trigger:
continue
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/lib/sync/test_watch_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from samcli.lib.sync.exceptions import MissingPhysicalResourceError, SyncFlowException
from parameterized import parameterized

from samcli.local.lambdafn.exceptions import ResourceNotFound


class TestWatchManager(TestCase):
def setUp(self) -> None:
Expand Down Expand Up @@ -84,6 +86,7 @@ def test_add_code_triggers(self, get_all_resource_ids_mock, patched_log):
MissingCodeUri(),
trigger_2,
MissingLocalDefinition(MagicMock(), MagicMock()),
ResourceNotFound(),
]
self.watch_manager._stacks = [MagicMock()]
self.watch_manager._trigger_factory = trigger_factory
Expand Down

0 comments on commit 196307a

Please sign in to comment.