Skip to content

Commit 86705d6

Browse files
Fix libcurl download url (#74)
* Fix libcurl download url * Fix indentation * Reformat code * Fix 'test_log_error_invokeId_line_framed_log_sink' test
1 parent 675d1fd commit 86705d6

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ generated.docker-compose.*.yml
22

33
tests/integration/resources/init
44

5+
.idea
6+
57
node_modules/
68
*.tsbuildinfo
79

awslambdaric/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class FramedTelemetryLogSink(object):
324324

325325
def __init__(self, fd):
326326
self.fd = int(fd)
327-
self.frame_type = 0xA55A0001 .to_bytes(4, "big")
327+
self.frame_type = 0xA55A0001.to_bytes(4, "big")
328328

329329
def __enter__(self):
330330
self.file = os.fdopen(self.fd, "wb", 0)

deps/versions

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
AWS_LAMBDA_CPP_RELEASE=0.2.6
2-
CURL_VERSION=7.83.0
2+
CURL_MAJOR_VERSION=7
3+
CURL_MINOR_VERSION=83
4+
CURL_PATCH_VERSION=0

scripts/preinstall.sh

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ else
1919
cd deps
2020
. ./versions
2121

22+
CURL_VERSION="${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}"
23+
2224
rm -rf ./curl-$CURL_VERSION
2325
rm -rf ./aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE
2426

scripts/update_deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ source versions
99
rm -f aws-lambda-cpp-*.tar.gz && rm -f curl-*.tar.gz
1010

1111
# Grab Curl
12-
wget -c https://github.com/curl/curl/archive/curl-$CURL_VERSION.tar.gz
12+
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"
1313

1414
# Grab aws-lambda-cpp
1515
wget -c https://github.com/awslabs/aws-lambda-cpp/archive/v$AWS_LAMBDA_CPP_RELEASE.tar.gz -O - | tar -xz

tests/test_bootstrap.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,9 @@ def test_log_error_empty_stacktrace_line_framed_log_sink(self):
10161016
# Just to ensure we are not logging the requestId from error response, just sending in the response
10171017
def test_log_error_invokeId_line_framed_log_sink(self):
10181018
with NamedTemporaryFile() as temp_file:
1019-
with bootstrap.FramedTelemetryLogSink(temp_file.name) as log_sink:
1019+
with bootstrap.FramedTelemetryLogSink(
1020+
os.open(temp_file.name, os.O_CREAT | os.O_RDWR)
1021+
) as log_sink:
10201022
err_to_log = bootstrap.make_error(
10211023
"Error message",
10221024
"ErrorType",

0 commit comments

Comments
 (0)