Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Version 0.14.0 #1077

Merged
merged 6 commits into from
Mar 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ dateparser~=0.7
python-dateutil~=2.6
pathlib2~=2.3.2; python_version<"3.4"
requests==2.20.1
aws_lambda_builders==0.2.0
aws_lambda_builders==0.2.1
serverlessrepo==0.1.8
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__ = '0.13.0'
__version__ = '0.14.0'
2 changes: 1 addition & 1 deletion samcli/local/common/runtime_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{
"runtimes": ["go1.x"],
"dependency_manager": None,
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-go"),
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-golang"),
"build": False
}
],
Expand Down
13 changes: 11 additions & 2 deletions samcli/local/docker/lambda_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Represents Lambda runtime containers.
"""
import logging
import json

from .container import Container
from .lambda_image import Runtime
Expand Down Expand Up @@ -157,7 +158,7 @@ def _get_image(image_builder, runtime, layers):
return image_builder.build(runtime, layers)

@staticmethod
def _get_entry_point(runtime, debug_options=None):
def _get_entry_point(runtime, debug_options=None): # pylint: disable=too-many-branches
"""
Returns the entry point for the container. The default value for the entry point is already configured in the
Dockerfile. We override this default specifically when enabling debugging. The overridden entry point includes
Expand Down Expand Up @@ -293,13 +294,21 @@ def _get_entry_point(runtime, debug_options=None):
"/var/runtime/awslambda/bootstrap.py"
]

elif runtime == Runtime.python37.value:
entrypoint = ["/var/rapid/init",
"--bootstrap",
"/var/lang/bin/python3.7",
"--bootstrap-args",
json.dumps(debug_args_list + ["/var/runtime/bootstrap"])
]

return entrypoint

@staticmethod
def _supported_runtimes():
return {Runtime.java8.value, Runtime.dotnetcore20.value, Runtime.dotnetcore21.value, Runtime.go1x.value,
Runtime.nodejs.value, Runtime.nodejs43.value, Runtime.nodejs610.value, Runtime.nodejs810.value,
Runtime.python27.value, Runtime.python36.value}
Runtime.python27.value, Runtime.python36.value, Runtime.python37.value}


class DebuggingNotSupported(Exception):
Expand Down
Binary file not shown.
7 changes: 5 additions & 2 deletions tests/integration/local/invoke/test_integrations_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import shutil
import os
import copy
from unittest import skipIf
import tempfile
from unittest import skipIf

from nose_parameterized import parameterized
from subprocess import Popen, PIPE
Expand All @@ -13,10 +13,11 @@

from tests.integration.local.invoke.layer_utils import LayerUtils
from .invoke_integ_base import InvokeIntegBase
from tests.testing_utils import IS_WINDOWS, RUNNING_ON_TRAVIS, RUNNING_TEST_FOR_MASTER_ON_TRAVIS

# Layers tests require credentials and Travis will only add credentials to the env if the PR is from the same repo.
# This is to restrict layers tests to run outside of Travis and when the branch is not master.
SKIP_LAYERS_TESTS = os.environ.get("TRAVIS", False) and os.environ.get("TRAVIS_BRANCH", "master") != "master"
SKIP_LAYERS_TESTS = RUNNING_ON_TRAVIS and RUNNING_TEST_FOR_MASTER_ON_TRAVIS

try:
from pathlib import Path
Expand Down Expand Up @@ -233,6 +234,8 @@ def test_invoke_with_docker_network_of_host(self):

self.assertEquals(return_code, 0)

@skipIf(IS_WINDOWS,
"The test hangs on Windows due to trying to attach to a non-existing network")
def test_invoke_with_docker_network_of_host_in_env_var(self):
command_list = self.get_command_list("HelloWorldServerlessFunction",
template_path=self.template_path,
Expand Down
6 changes: 6 additions & 0 deletions tests/testing_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import os
import platform

IS_WINDOWS = platform.system().lower() == 'windows'
RUNNING_ON_TRAVIS = os.environ.get("TRAVIS", False)
RUNNING_TEST_FOR_MASTER_ON_TRAVIS = os.environ.get("TRAVIS_BRANCH", "master") != "master"