Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-sam-cli-bot committed Aug 30, 2023
2 parents ae14250 + c90c9bc commit e973ec2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion aws_lambda_builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

# Changing version will trigger a new release!
# Please make the version change as the last step of your development.
__version__ = "1.36.0"
__version__ = "1.37.0"
RPC_PROTOCOL_VERSION = "0.3"
6 changes: 4 additions & 2 deletions aws_lambda_builders/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,10 @@ def run(self):

for action in self.actions:
action_info = "{}:{}".format(self.NAME, action.NAME)

LOG.info("Running %s", action_info)
function_name = ""
if self.options and "build_logical_id" in self.options:
function_name = "{}:".format(self.options["build_logical_id"])
LOG.info("%s Running %s", function_name, action_info)

try:
action.execute()
Expand Down
2 changes: 1 addition & 1 deletion aws_lambda_builders/workflows/custom_make/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def execute(self):

try:
current_env = self.osutils.environ()
LOG.info("Current Artifacts Directory : %s", self.artifact_dir_path)
LOG.info("%s: Current Artifacts Directory : %s", self.build_logical_id, self.artifact_dir_path)
current_env.update({"ARTIFACTS_DIR": self.artifact_dir_path})
# Export environmental variables that might be needed by other binaries used
# within the Makefile and also specify the makefile to be used as well.
Expand Down
13 changes: 11 additions & 2 deletions aws_lambda_builders/workflows/custom_make/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io
import logging
import shutil
import sys
import threading

LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -92,9 +93,17 @@ def run(self, args, env=None, cwd=None):

# Log every stdout line by iterating
for line in p.stdout:
decoded_line = line.decode("utf-8").strip()
LOG.info(decoded_line)
# Writing to stderr instead of using LOG.info
# since the logger library does not include ANSI
# formatting characters in the output
#
# stderr is used since stdout appears to be reserved
# for command responses
sys.stderr.buffer.write(line)
sys.stderr.flush()

# Gather total stdout
decoded_line = line.decode("utf-8").strip()
stdout += decoded_line

# Wait for the process to exit and stderr thread to end.
Expand Down
2 changes: 1 addition & 1 deletion aws_lambda_builders/workflows/python_pip/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def _is_compatible_wheel_filename(self, filename):
# Deploying python 3 function which means we need cp37m abi
# We can also accept abi3 which is the CPython 3 Stable ABI and
# will work on any version of python 3.
if abi == lambda_runtime_abi or abi == "abi3":
if abi in (lambda_runtime_abi, "abi3"):
return True
# Don't know what we have but it didn't pass compatibility tests.
return False
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ pyelftools~=0.29 # Used to verify the generated Go binary architecture in integr

# formatter
black==23.3.0
ruff==0.0.278
ruff==0.0.284

0 comments on commit e973ec2

Please sign in to comment.