Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
f12e425
Added ecr_bootstrap
CoshUS Feb 8, 2021
650fe2c
Added companion_stack_manager
CoshUS Feb 11, 2021
5397803
Added Companion Stack Manager
CoshUS Feb 16, 2021
6751928
Added update_companion_stack
CoshUS Feb 17, 2021
6c034ec
Updated companion_stack_builder File Name
CoshUS Feb 18, 2021
f6204af
Formatted with Black
CoshUS Feb 18, 2021
13b425f
Updated get_unreferenced_repos
CoshUS Mar 1, 2021
25d2dad
Updated guided_context to Use Companion Stack
CoshUS Mar 1, 2021
fbe5a66
Added Delete Auto Create ECR Repo Prompt
CoshUS Mar 1, 2021
0b9a881
Updated prompt_image_repository Flow
CoshUS Mar 1, 2021
676fa01
Added --resolve-image-repos
CoshUS Mar 4, 2021
2e16290
Addressed Some of Pylint Issues
CoshUS Mar 4, 2021
739b550
Updated Helper Text
CoshUS Apr 14, 2021
c48e07d
Merge branch 'develop' into feat/auto-ecr
CoshUS Apr 14, 2021
701932c
Updated Comments
CoshUS Apr 14, 2021
f1f9f45
Fixed Typing
CoshUS Apr 14, 2021
b82d544
Removed Unused Imports
CoshUS Apr 14, 2021
2d2cf5b
Updated Unit Tests
CoshUS Apr 15, 2021
9fb143e
Updated UX and Fixed Windows ANSI
CoshUS Apr 15, 2021
f015829
Updated Unit Tests
CoshUS Apr 16, 2021
cdef3a6
Fixed Import Order
CoshUS Apr 16, 2021
23576c3
Merge branch 'develop' into feat/auto-ecr
CoshUS Apr 16, 2021
6dd8c67
Added Ignore Import Check
CoshUS Apr 16, 2021
addd5a1
Added Integration Tests
CoshUS Apr 16, 2021
92002d4
Merge branch 'develop' into feat/auto-ecr
CoshUS Apr 16, 2021
edf778d
Updated help text.
CoshUS Apr 16, 2021
f8244a4
Added Comments for Name Generation
CoshUS Apr 16, 2021
0214950
Updated Image Option Validator
CoshUS Apr 19, 2021
7b5a46c
Updated CompanionStackBuilder to Use Dict instead of String
CoshUS Apr 19, 2021
c6f2698
Merge branch 'develop' into feat/auto-ecr
CoshUS Apr 19, 2021
5edd495
Fixed Argument Ordering
CoshUS Apr 23, 2021
7b3572e
Merge branch 'develop' into feat/auto-ecr
CoshUS Apr 23, 2021
9ffd4bd
Added Mapping Information to Help Text
CoshUS Apr 26, 2021
a83f7fc
Merge branch 'feat/auto-ecr' of https://github.com/CoshUS/aws-sam-cli…
CoshUS Apr 26, 2021
79ef739
Updated delete_unreferenced_repos Doc String
CoshUS Apr 26, 2021
90b5b4c
Updated sync_repos Doc String
CoshUS Apr 26, 2021
4157cb9
Added Justification for ECR Repo Physical ID
CoshUS Apr 26, 2021
5d84813
Refactored to be Less Coupled
CoshUS Apr 26, 2021
ce355cf
Refactored for prompt_specify_repos
CoshUS Apr 26, 2021
366b7f7
Fixed Unit Test
CoshUS Apr 26, 2021
c653dff
Moved WaiterConfig Out of Methods
CoshUS Apr 26, 2021
4be0e11
Updated Typing
CoshUS Apr 26, 2021
c18ad41
Updated Managed S3 Template to be Dict
CoshUS Apr 26, 2021
191309a
Fixed Typo
CoshUS Apr 26, 2021
bfdf4a7
Added Comments for _save_image_repositories
CoshUS Apr 26, 2021
e03c48a
Fixed Pylint Issue
CoshUS Apr 26, 2021
b016b14
Merge branch 'develop' into feat/auto-ecr
CoshUS Apr 26, 2021
85ced27
Added Missing Check for unreferenced_repo_uris
CoshUS Apr 27, 2021
6c3f54a
Merge branch 'feat/auto-ecr' of https://github.com/CoshUS/aws-sam-cli…
CoshUS Apr 27, 2021
1946945
Merge branch 'develop' into feat/auto-ecr
mgrandis May 3, 2021
7693d9a
Updated Variable Name
CoshUS May 4, 2021
6393418
Fixed Typo
CoshUS May 4, 2021
7411f9f
Updated Windows Check to Use platform.system()
CoshUS May 4, 2021
f3b5bcb
Updated update_companion_stack Logic
CoshUS May 4, 2021
3039f18
Merge branch 'feat/auto-ecr' of https://github.com/CoshUS/aws-sam-cli…
CoshUS May 4, 2021
3575581
Fixed Comment Typo
CoshUS May 4, 2021
17a7a41
Fixed Typos
CoshUS May 4, 2021
8a1c458
Fixed Test Name
CoshUS May 4, 2021
1263735
Added methods for cf and s3 files and init UI
hnnasit Jun 21, 2021
ba47369
Added unit tests for utils methods and s3_uploader
hnnasit Jun 23, 2021
d77f7c4
Removed s3_bucket and s3_prefix click options
hnnasit Jun 24, 2021
d506648
chore: Increase awareness of same file warning during package (#2946)
mndeveci Jun 24, 2021
698de67
fix: Allow the base64Encoded field in REST Api, skip validation of un…
moelasmar Jun 24, 2021
3f6f070
Fixed lint errors and added few unit tests
hnnasit Jun 25, 2021
af2f929
Make black happy
hnnasit Jun 25, 2021
481ef8a
Merge pull request #1 from hnnasit/delete-cf-s3-methods
hnnasit Jun 28, 2021
1d70155
Added methods for deleting template artifacts
hnnasit Jun 28, 2021
e3f7872
Wait method added for delete cf api
hnnasit Jun 28, 2021
3b2cdf1
fix: pass copy of environment variables for keeping cache valid (#2943)
mndeveci Jun 29, 2021
99f7db4
Added LOG statements
hnnasit Jun 29, 2021
e7304ec
Added and updated changes based on CR
hnnasit Jun 29, 2021
c2e43db
Fixed the unit tests in artifact_exporter.py
hnnasit Jun 29, 2021
dd35d53
Update HELP_TEXT in delete/command.py
hnnasit Jun 29, 2021
6fc1b99
fix: Skip build of Docker image if ImageUri is a valid ECR URL (#2934…
alexisfacques Jun 29, 2021
f43e763
Updated code based on Chris' comments
hnnasit Jun 30, 2021
5779cd3
Added condition for resources that have deletionpolicy specified
hnnasit Jun 30, 2021
bc9db14
Small changes and fixes based on the comments
hnnasit Jun 30, 2021
0d58f89
Add condition to managed bucket policy (#2999)
qingchm Jun 30, 2021
401a950
Removed region prompt
hnnasit Jun 30, 2021
50ac3cb
Update appveyor.yml to do docker login on both dockerhub and Public E…
qingchm Jul 1, 2021
f1e0569
chore: bump version to 1.25.0 (#3007)
qingchm Jul 1, 2021
2241563
temp: reduce python testing matrix (#3008)
sriram-mv Jul 1, 2021
fe83218
temp: disable testing against python 3.8, and enabled 3.7 (#3009)
moelasmar Jul 1, 2021
cc806a2
fix: enable all runtimes in python testing matrix (#3011)
qingchm Jul 1, 2021
0a38340
Added unit tests for ecr delete method and typing for methods
hnnasit Jul 3, 2021
8977c6a
Merge branch 'delete-template-artifacts' into delete-cf-s3-methods
hnnasit Jul 3, 2021
99c80e1
Merge pull request #2 from hnnasit/delete-cf-s3-methods
hnnasit Jul 3, 2021
aaa1b05
Reformatted delete_context and added option to skip user prompts
hnnasit Jul 5, 2021
e2e85a9
Removed return type from artifact_exporter for delete method
hnnasit Jul 5, 2021
c98e6ee
Added unit tests for artifact_exporter and delete_context
hnnasit Jul 5, 2021
17a427a
Added more unit tests for delete_context and artifact_exporter
hnnasit Jul 5, 2021
ac4e485
chore: update to aws-sam-translator 1.37.0 (#3019)
mgrandis Jul 6, 2021
a1e5c92
chore: bump version to 1.26.0 (#3020)
mgrandis Jul 6, 2021
e577d7f
Added more unit tests for delete_context and artifact_exporter
hnnasit Jul 6, 2021
70eac98
Merged feat/sam_delete changes into delete_template_artifacts repo
hnnasit Jul 6, 2021
58ead71
Added docs and comments for artifact_exporter and ecr_uploader
hnnasit Jul 6, 2021
45ee66f
Added log statements in delete_context and some updates in unit tests
hnnasit Jul 7, 2021
d151b01
Changed force to no-prompts and updated ecr delete method error hand…
hnnasit Jul 8, 2021
59c8576
chore: Improved --resolve-s3 option documentation and deployment with…
qingchm Jul 8, 2021
6f54240
Created a separate function for parsing ecr url in ecr_uploader
hnnasit Jul 9, 2021
30e3c02
Reformatted Template class init to pass template_str and init templat…
hnnasit Jul 9, 2021
b8a2591
Changed how s3 url is obtained for resource_zip edge-case: aws:glue:job
hnnasit Jul 9, 2021
7292353
Fixed edge case where resource artifact points to a path style url
hnnasit Jul 9, 2021
6ff2e22
run Make black
hnnasit Jul 9, 2021
6c9a060
Made the parse s3 url funcs protected and defined a parent method and…
hnnasit Jul 10, 2021
1675b7e
Changed parse_ecr_url function name to parse_image_url
hnnasit Jul 12, 2021
c4e9632
Merge branch 'develop' into feat/auto-ecr
CoshUS Jul 12, 2021
0e159c2
Merge remote-tracking branch 'wiltons-repo/feat/auto-ecr' into auto-e…
hnnasit Jul 13, 2021
5355028
Defined UI for auto ecr deleton and method calls from companion_stack…
hnnasit Jul 13, 2021
b160efc
Added code for deleting repos from companion stack
hnnasit Jul 13, 2021
4267e82
Handle json templates deployed to cf
hnnasit Jul 14, 2021
b172255
Changed the order of companion stack and ecr repos deletion
hnnasit Jul 14, 2021
7b5732d
Handle delete_failed status for ecr companion stack and changed delet…
hnnasit Jul 15, 2021
bbe7cec
Reformatted auto ecr deletion to handle deleting companion stack as i…
hnnasit Jul 15, 2021
8b0d979
Fixed and added more unit tests for delete_context
hnnasit Jul 15, 2021
189e383
When region is not provided, prompt user to enter profile and region
hnnasit Jul 16, 2021
a933202
Removed region prompt and reading it from current session or assign a…
hnnasit Jul 18, 2021
80f6561
Added ECR resource in packageable_resources and refactored ecr compan…
hnnasit Jul 19, 2021
8d19497
Added log statements and unit tests for ECRResource
hnnasit Jul 19, 2021
b7ffe45
Merged feat/sam_delete changes into auto-ecr-delete
hnnasit Jul 19, 2021
7bcd636
Better error handling for ecr delete_artifact
hnnasit Jul 19, 2021
9363b93
Revert "Merge remote-tracking branch 'wiltons-repo/feat/auto-ecr' int…
hnnasit Jul 20, 2021
203ea3a
Added unit test for delete ecr repository
hnnasit Jul 20, 2021
0b25fbb
Fixed small string nits and added docstring for ECRResource
hnnasit Jul 20, 2021
37a6510
Added some unit tests for s3_uploader, ecr_uploader and delete_context
hnnasit Jul 20, 2021
0626f94
feat: Add SAM Pipeline commands (#3085)
aahung Jul 20, 2021
ecd02bb
chore: bump aws-lambda-builder version to 1.5.0 (#3086)
wchengru Jul 20, 2021
3fda4c5
chore: update to aws-sam-translator 1.38.0 (#3073)
c2tarun Jul 20, 2021
d3e0782
Updated to context refresh only when region and profile have non None…
hnnasit Jul 20, 2021
80d5428
Added unit test for ResourceImageDict class methods
hnnasit Jul 20, 2021
6b7ec4f
ci: Update expected Jenkins file in pipeline integ test (#3090)
aahung Jul 20, 2021
ec467db
Merge remote-tracking branch 'upstream/feat/sam_delete' into revert-w…
hnnasit Jul 21, 2021
9206b47
chore: Refine pipeline help text and update unit test (#3091)
aahung Jul 21, 2021
aae1e97
Clearing pipeline integ test buckets with versioned objects. (#3094)
c2tarun Jul 21, 2021
8bbb7c5
Fixing bug in bucket cleanup. (#3096)
c2tarun Jul 21, 2021
172616c
Deleting bucket (#3097)
c2tarun Jul 21, 2021
1916bfa
Revert "temp: disable testing against python 3.8, and enabled 3.7 (#3…
c2tarun Jul 21, 2021
50ef124
chore: bump SAM CLI version to 1.27.0 (#3101)
wchengru Jul 21, 2021
1c42df3
Add pipeline to pyinstaller (#3103)
c2tarun Jul 21, 2021
5d25c25
Merge remote-tracking branch 'upstream/feat/sam_delete' into revert-w…
hnnasit Jul 22, 2021
9c417be
Merged develop commits
hnnasit Jul 22, 2021
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
40 changes: 20 additions & 20 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ environment:

matrix:

- PYTHON_HOME: "C:\\Python36-x64"
PYTHON_VERSION: '3.6'
PYTHON_ARCH: '64'
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_37_PIP: 1
INSTALL_PY_38_PIP: 1
AWS_S3: 'AWS_S3_36'
AWS_ECR: 'AWS_ECR_36'
APPVEYOR_CONSOLE_DISABLE_PTY: true

- PYTHON_HOME: "C:\\Python37-x64"
PYTHON_VERSION: '3.7'
PYTHON_ARCH: '64'
RUN_SMOKE: 1
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_38_PIP: 1
AWS_S3: 'AWS_S3_37'
AWS_ECR: 'AWS_ECR_37'
APPVEYOR_CONSOLE_DISABLE_PTY: true
# - PYTHON_HOME: "C:\\Python36-x64"
# PYTHON_VERSION: '3.6'
# PYTHON_ARCH: '64'
# NOSE_PARAMETERIZED_NO_WARN: 1
# INSTALL_PY_37_PIP: 1
# INSTALL_PY_38_PIP: 1
# AWS_S3: 'AWS_S3_36'
# AWS_ECR: 'AWS_ECR_36'
# APPVEYOR_CONSOLE_DISABLE_PTY: true

# - PYTHON_HOME: "C:\\Python37-x64"
# PYTHON_VERSION: '3.7'
# PYTHON_ARCH: '64'
# RUN_SMOKE: 1
# NOSE_PARAMETERIZED_NO_WARN: 1
# INSTALL_PY_36_PIP: 1
# INSTALL_PY_38_PIP: 1
# AWS_S3: 'AWS_S3_37'
# AWS_ECR: 'AWS_ECR_37'
# APPVEYOR_CONSOLE_DISABLE_PTY: true

- PYTHON_HOME: "C:\\Python38-x64"
PYTHON_VERSION: '3.8'
Expand Down
3 changes: 3 additions & 0 deletions installer/pyinstaller/hook-samcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"samcli.commands.deploy",
"samcli.commands.logs",
"samcli.commands.publish",
"samcli.commands.pipeline.pipeline",
"samcli.commands.pipeline.init",
"samcli.commands.pipeline.bootstrap",
# default hidden import 'pkg_resources.py2_warn' is added
# since pyInstaller 4.0.
"pkg_resources.py2_warn",
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ ignore_missing_imports=True
ignore_missing_imports=True

# progressive add typechecks and these modules already complete the process, let's keep them clean
[mypy-samcli.commands.build,samcli.lib.build.*,samcli.commands.local.cli_common.invoke_context,samcli.commands.local.lib.local_lambda,samcli.lib.providers.*,samcli.lib.utils.git_repo.py]
[mypy-samcli.commands.build,samcli.lib.build.*,samcli.commands.local.cli_common.invoke_context,samcli.commands.local.lib.local_lambda,samcli.lib.providers.*,samcli.lib.utils.git_repo.py,samcli.lib.cookiecutter.*,samcli.lib.pipeline.*,samcli.commands.pipeline.*]
disallow_untyped_defs=True
disallow_incomplete_defs=True
4 changes: 2 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ boto3~=1.14
jmespath~=0.10.0
PyYAML~=5.3
cookiecutter~=1.7.2
aws-sam-translator==1.36.0
aws-sam-translator==1.38.0
#docker minor version updates can include breaking changes. Auto update micro version only.
docker~=4.2.0
dateparser~=0.7
requests==2.25.1
serverlessrepo==0.1.10
aws_lambda_builders==1.4.0
aws_lambda_builders==1.5.0
tomlkit==0.7.2
watchdog==2.1.2
16 changes: 8 additions & 8 deletions requirements/reproducible-linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ attrs==20.3.0 \
--hash=sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6 \
--hash=sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700
# via jsonschema
aws-lambda-builders==1.4.0 \
--hash=sha256:3f885433bb71bae653b520e3cf4c31fe5f5b977cb770d42c631af155cd60fd2b \
--hash=sha256:5d4e4ecb3d3290f0eec1f62b7b0d9d6b91160ae71447d95899eede392d05f75f \
--hash=sha256:d32f79cf67b189a7598793f69797f284b2eb9a9fada562175b1e854187f95aed
aws-lambda-builders==1.5.0 \
--hash=sha256:0167b40da88c679e21341852faf59fae2aafe36c22a560de2e4aa75c7b9dd846 \
--hash=sha256:6fd7fddd50b7bbbb8668c44c638d685123a698bf1a866da2f34b440bca9958ad \
--hash=sha256:c9f2259656353f98e70c49ed52b6ea8891d1f6853c2b1a9ac891772768d1697e
# via aws-sam-cli (setup.py)
aws-sam-translator==1.36.0 \
--hash=sha256:4195ae8196f04803e7f0384a2b5ccd8c2b06ce0d8dc408aa1f1ce96c23bcf39d \
--hash=sha256:f7d51b661fe1f5613a882f4733d1c92eff4dac36a076eafd18031d209b178695 \
--hash=sha256:fa1b990d9329d19052e7b91cf0b19371ed9d31a529054b616005884cd662b584
aws-sam-translator==1.38.0 \
--hash=sha256:0ecadda9cf5ab2318f57f1253181a2151e4c53cd35d21717a923c075a5a65cb6 \
--hash=sha256:dc6b816bb5cfd9709299f9b263fc0cf5ae60aca4166d1c90413ece651f1556bb \
--hash=sha256:ee7c7c5e44ec67202622ca877140545496527ffcc45da3beeda966f007443a88
# via aws-sam-cli (setup.py)
binaryornot==0.4.4 \
--hash=sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061 \
Expand Down
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.24.1"
__version__ = "1.27.1"
1 change: 1 addition & 0 deletions samcli/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"samcli.commands.delete",
"samcli.commands.logs",
"samcli.commands.publish",
"samcli.commands.pipeline.pipeline",
# We intentionally do not expose the `bootstrap` command for now. We might open it up later
# "samcli.commands.bootstrap",
]
Expand Down
4 changes: 2 additions & 2 deletions samcli/cli/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import logging
import uuid
from typing import Optional, cast
from typing import Optional, cast, List

import boto3
import botocore
Expand Down Expand Up @@ -186,7 +186,7 @@ def _refresh_session(self):
raise CredentialsError(str(ex)) from ex


def get_cmd_names(cmd_name, ctx):
def get_cmd_names(cmd_name, ctx) -> List[str]:
"""
Given the click core context, return a list representing all the subcommands passed to the CLI

Expand Down
6 changes: 3 additions & 3 deletions samcli/commands/_utils/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
import yaml
from botocore.utils import set_value_from_jmespath

from samcli.commands.exceptions import UserException
from samcli.lib.utils.packagetype import ZIP
from samcli.yamlhelper import yaml_parse, yaml_dump
from samcli.commands._utils.resources import (
METADATA_WITH_LOCAL_PATHS,
RESOURCES_WITH_LOCAL_PATHS,
AWS_SERVERLESS_FUNCTION,
AWS_LAMBDA_FUNCTION,
get_packageable_resource_paths,
)
from samcli.commands.exceptions import UserException
from samcli.lib.utils.packagetype import ZIP
from samcli.yamlhelper import yaml_parse, yaml_dump


class TemplateNotFoundException(UserException):
Expand Down
4 changes: 2 additions & 2 deletions samcli/commands/deploy/guided_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from typing import Dict, Any, List

import click
from botocore.session import get_session
from click import confirm
from click import prompt
from click.types import FuncParamType
Expand Down Expand Up @@ -36,6 +35,7 @@
from samcli.lib.providers.sam_function_provider import SamFunctionProvider
from samcli.lib.providers.sam_stack_provider import SamLocalStackProvider
from samcli.lib.utils.colors import Colored
from samcli.lib.utils.defaults import get_default_aws_region
from samcli.lib.utils.packagetype import IMAGE

LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -110,7 +110,7 @@ def guided_prompts(self, parameter_override_keys):
The keys of parameters to override, for each key, customers will be asked to provide a value
"""
default_stack_name = self.stack_name or "sam-app"
default_region = self.region or get_session().get_config_variable("region") or "us-east-1"
default_region = self.region or get_default_aws_region()
default_capabilities = self.capabilities[0] or ("CAPABILITY_IAM",)
default_config_env = self.config_env or DEFAULT_ENV
default_config_file = self.config_file or DEFAULT_CONFIG_FILE_NAME
Expand Down
19 changes: 19 additions & 0 deletions samcli/commands/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,22 @@ class ContainersInitializationException(UserException):
"""
Exception class when SAM is not able to initialize any of the lambda functions containers
"""


class PipelineTemplateCloneException(UserException):
"""
Exception class when unable to download pipeline templates from a Git repository during `sam pipeline init`
"""


class AppPipelineTemplateManifestException(UserException):
"""
Exception class when SAM is not able to parse the "manifest.yaml" file located in the SAM pipeline templates
Git repo: "github.com/aws/aws-sam-cli-pipeline-init-templates.git
"""


class AppPipelineTemplateMetadataException(UserException):
"""
Exception class when SAM is not able to parse the "metadata.json" file located in the SAM pipeline templates
"""
Empty file.
Empty file.
Loading