diff --git a/.gitignore b/.gitignore index 116767e..bd5c9b7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ generated.docker-compose.*.yml tests/integration/resources/init +.idea + node_modules/ *.tsbuildinfo diff --git a/awslambdaric/bootstrap.py b/awslambdaric/bootstrap.py index 87bdbb6..3794e81 100644 --- a/awslambdaric/bootstrap.py +++ b/awslambdaric/bootstrap.py @@ -324,7 +324,7 @@ class FramedTelemetryLogSink(object): def __init__(self, fd): self.fd = int(fd) - self.frame_type = 0xA55A0001 .to_bytes(4, "big") + self.frame_type = 0xA55A0001.to_bytes(4, "big") def __enter__(self): self.file = os.fdopen(self.fd, "wb", 0) diff --git a/deps/versions b/deps/versions index 092d2c0..756a145 100644 --- a/deps/versions +++ b/deps/versions @@ -1,2 +1,4 @@ AWS_LAMBDA_CPP_RELEASE=0.2.6 -CURL_VERSION=7.83.0 \ No newline at end of file +CURL_MAJOR_VERSION=7 +CURL_MINOR_VERSION=83 +CURL_PATCH_VERSION=0 diff --git a/scripts/preinstall.sh b/scripts/preinstall.sh index b589061..b377228 100755 --- a/scripts/preinstall.sh +++ b/scripts/preinstall.sh @@ -19,6 +19,8 @@ else cd deps . ./versions + CURL_VERSION="${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}" + rm -rf ./curl-$CURL_VERSION rm -rf ./aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE diff --git a/scripts/update_deps.sh b/scripts/update_deps.sh index 853b296..4ec4ec1 100755 --- a/scripts/update_deps.sh +++ b/scripts/update_deps.sh @@ -9,7 +9,7 @@ source versions rm -f aws-lambda-cpp-*.tar.gz && rm -f curl-*.tar.gz # Grab Curl -wget -c https://github.com/curl/curl/archive/curl-$CURL_VERSION.tar.gz +wget -c "https://github.com/curl/curl/releases/download/curl-${CURL_MAJOR_VERSION}_${CURL_MINOR_VERSION}_${CURL_PATCH_VERSION}/curl-${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}.tar.gz" # Grab aws-lambda-cpp wget -c https://github.com/awslabs/aws-lambda-cpp/archive/v$AWS_LAMBDA_CPP_RELEASE.tar.gz -O - | tar -xz diff --git a/tests/test_bootstrap.py b/tests/test_bootstrap.py index af88924..777625e 100644 --- a/tests/test_bootstrap.py +++ b/tests/test_bootstrap.py @@ -1016,7 +1016,9 @@ def test_log_error_empty_stacktrace_line_framed_log_sink(self): # Just to ensure we are not logging the requestId from error response, just sending in the response def test_log_error_invokeId_line_framed_log_sink(self): with NamedTemporaryFile() as temp_file: - with bootstrap.FramedTelemetryLogSink(temp_file.name) as log_sink: + with bootstrap.FramedTelemetryLogSink( + os.open(temp_file.name, os.O_CREAT | os.O_RDWR) + ) as log_sink: err_to_log = bootstrap.make_error( "Error message", "ErrorType",