Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sidhujus authored Oct 8, 2024
2 parents 6eb3291 + 8d6eab0 commit 3495f4a
Show file tree
Hide file tree
Showing 14 changed files with 552 additions and 543 deletions.
2 changes: 1 addition & 1 deletion installer/pyinstaller/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ "$python_version" = "" ]; then
fi

if [ "$openssl_version" = "" ]; then
openssl_version="3.0.14";
openssl_version="3.0.15";
fi

if [ "$zlib_version" = "" ]; then
Expand Down
2 changes: 1 addition & 1 deletion installer/pyinstaller/build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ "$python_library_zip_filename" = "" ]; then
fi

if [ "$openssl_version" = "" ]; then
openssl_version="3.0.14";
openssl_version="3.0.15";
fi

if [ "$python_version" = "" ]; then
Expand Down
10 changes: 6 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ dateparser~=1.2
requests~=2.32.3
aws_lambda_builders==1.50.0
tomlkit==0.13.2
watchdog==4.0.2
rich~=13.8.1
watchdog==5.0.3; python_version>"3.8"
watchdog==4.0.2; python_version<="3.8"

rich~=13.9.2
pyopenssl~=24.2.1
# Pin to <4.18 to until SAM-T no longer uses RefResolver
jsonschema<4.24
Expand All @@ -28,7 +30,7 @@ regex!=2021.10.8
tzlocal==5.2

#Adding cfn-lint dependency for SAM validate
cfn-lint~=1.12.4
cfn-lint~=1.16.0

# Type checking boto3 objects
boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.35.20
boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.35.32
10 changes: 5 additions & 5 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ pytest-cov==5.0.0
# here we fix its version and upgrade it manually in the future
mypy==1.11.2
types-pywin32==306.0.0.20240822
types-PyYAML==6.0.12.20240808
types-PyYAML==6.0.12.20240917
types-chevron==0.14.2.20240310
types-psutil==6.0.0.20240901
types-setuptools==74.1.0.20240907
types-setuptools==75.1.0.20240917
types-Pygments==2.18.0.20240506
types-colorama==0.4.15.20240311
types-dateparser==1.2.0.20240420
types-docutils==0.21.0.20240907
types-docutils==0.21.0.20241005
types-jsonschema==4.23.0.20240813
types-pyOpenSSL==24.1.0.20240722
# 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.20240907; python_version>="3.10"
types-requests==2.32.0.20240914; python_version>="3.10"
types-urllib3==1.26.25.14

# Test requirements
Expand All @@ -38,7 +38,7 @@ pytest-rerunfailures==14.0
pytest-metadata==3.1.1
# NOTE (lucashuy): `pytest-json-report` was updated to `pytest-json-report-wip` as the original repository does not seem to be maintained anymore, if `-wip` is updated, validate the changes
pytest-json-report-wip==1.5.1
filelock==3.16.0
filelock==3.16.1

# formatter
black==24.8.0
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.6.4
ruff==0.6.9
2 changes: 1 addition & 1 deletion requirements/pyinstaller-build.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Executable binary builder requirements
setuptools==70.3.0
setuptools==75.1.0
pyinstaller==6.10.0
355 changes: 175 additions & 180 deletions requirements/reproducible-linux.txt

Large diffs are not rendered by default.

296 changes: 148 additions & 148 deletions requirements/reproducible-mac.txt

Large diffs are not rendered by default.

395 changes: 197 additions & 198 deletions requirements/reproducible-win.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
SAM CLI version
"""

__version__ = "1.124.0"
__version__ = "1.125.0"
2 changes: 1 addition & 1 deletion samcli/lib/sync/watch_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def on_code_change(event: Optional[FileSystemEvent] = None) -> None:
#
# It looks like the other way a folder modified event can happen
# is if the permissions of the folder were changed
LOG.debug(f"Ignoring file system MODIFIED event for folder {event.src_path}")
LOG.debug(f"Ignoring file system MODIFIED event for folder {event.src_path!r}")
return

# sync flow factory should always exist, but guarding just incase
Expand Down
5 changes: 3 additions & 2 deletions samcli/lib/utils/file_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,15 @@ def on_change(self, event: FileSystemEvent) -> None:

LOG.debug("a %s change got detected in path %s", event.event_type, event.src_path)
for group, _observed_paths in self._observed_paths_per_group.items():
observed_paths = None
if event.event_type == EVENT_TYPE_DELETED:
observed_paths = [
path
for path in _observed_paths
if path == event.src_path
or path in self._watch_dog_observed_paths.get(f"{event.src_path}_False", [])
or path in self._watch_dog_observed_paths.get(f"{event.src_path!r}_False", [])
]
else:
elif isinstance(event.src_path, str):
observed_paths = [path for path in _observed_paths if event.src_path.startswith(path)]

if not observed_paths:
Expand Down
1 change: 1 addition & 0 deletions samcli/local/lambdafn/env_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def _get_aws_variables(self):
"AWS_ACCESS_KEY_ID": self.aws_creds.get("key", self._DEFAULT_AWS_CREDS["key"]),
"AWS_SECRET_ACCESS_KEY": self.aws_creds.get("secret", self._DEFAULT_AWS_CREDS["secret"]),
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
}

# Session Token should be added **only** if the input creds have a token and the value is not empty.
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/local/lambdafn/test_env_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def test_with_no_additional_variables(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
"AWS_REGION": "some region",
"AWS_DEFAULT_REGION": "some region",
"AWS_ACCESS_KEY_ID": "some key",
Expand Down Expand Up @@ -151,6 +152,7 @@ def test_with_only_default_values_for_variables(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
"AWS_REGION": "us-east-1",
"AWS_ACCESS_KEY_ID": "defaultkey",
"AWS_SECRET_ACCESS_KEY": "defaultsecret",
Expand Down Expand Up @@ -184,6 +186,7 @@ def test_with_shell_env_value(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
"AWS_REGION": "us-east-1",
"AWS_ACCESS_KEY_ID": "defaultkey",
"AWS_SECRET_ACCESS_KEY": "defaultsecret",
Expand Down Expand Up @@ -225,6 +228,7 @@ def test_with_overrides_value(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
"AWS_REGION": "us-east-1",
"AWS_ACCESS_KEY_ID": "defaultkey",
"AWS_SECRET_ACCESS_KEY": "defaultsecret",
Expand Down Expand Up @@ -282,6 +286,7 @@ def test_must_work_with_overridden_aws_creds(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
"AWS_SESSION_TOKEN": "some other token",
}

Expand All @@ -300,6 +305,7 @@ def test_must_work_without_any_aws_creds(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
# Default values assigned to these variables
"AWS_REGION": "us-east-1",
"AWS_DEFAULT_REGION": "us-east-1",
Expand All @@ -323,6 +329,7 @@ def test_must_work_with_partial_aws_creds(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
# Values from the input creds
"AWS_REGION": "some other region",
"AWS_DEFAULT_REGION": "some other region",
Expand All @@ -346,6 +353,7 @@ def test_must_work_with_text_logformat(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
# Default values assigned to these variables
"AWS_REGION": "us-east-1",
"AWS_DEFAULT_REGION": "us-east-1",
Expand All @@ -369,6 +377,7 @@ def test_must_work_with_default_json_logging_config(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
# Default values assigned to these variables
"AWS_REGION": "us-east-1",
"AWS_DEFAULT_REGION": "us-east-1",
Expand All @@ -393,6 +402,7 @@ def test_must_work_with_set_application_log_level(self):
"AWS_LAMBDA_LOG_GROUP_NAME": f"aws/lambda/{self.name}",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
# Default values assigned to these variables
"AWS_REGION": "us-east-1",
"AWS_DEFAULT_REGION": "us-east-1",
Expand All @@ -417,6 +427,7 @@ def test_must_work_with_custom_log_group_name(self):
"AWS_LAMBDA_LOG_GROUP_NAME": "myCustomLogGroup",
"AWS_LAMBDA_LOG_STREAM_NAME": "$LATEST",
"AWS_ACCOUNT_ID": "123456789012",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
# Default values assigned to these variables
"AWS_REGION": "us-east-1",
"AWS_DEFAULT_REGION": "us-east-1",
Expand Down

0 comments on commit 3495f4a

Please sign in to comment.