Skip to content

Commit

Permalink
Merge from aws/aws-sam-cli/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-sam-cli-bot authored Feb 8, 2023
2 parents 3748f12 + 6caefc9 commit da6e906
Show file tree
Hide file tree
Showing 128 changed files with 1,481 additions and 379 deletions.
7 changes: 0 additions & 7 deletions appveyor-iac-integration-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@ environment:
- PYTHON_VERSION: '3.7'
PYTHON_ARCH: '64'
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_38_PIP: 1
INSTALL_PY_39_PIP: 1
APPVEYOR_CONSOLE_DISABLE_PTY: true

- PYTHON_VERSION: '3.8'
PYTHON_ARCH: '64'
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_37_PIP: 1
INSTALL_PY_39_PIP: 1
APPVEYOR_CONSOLE_DISABLE_PTY: true

- PYTHON_VERSION: '3.9'
PYTHON_ARCH: '64'
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_37_PIP: 1
INSTALL_PY_38_PIP: 1
APPVEYOR_CONSOLE_DISABLE_PTY: true
Expand Down Expand Up @@ -61,26 +58,22 @@ install:
- sh: "sudo apt install maven"
- sh: "mvn --version"

- sh: "sudo apt-get -y install python3.6"
- sh: "sudo apt-get -y install python3.7"
- sh: "sudo apt-get -y install python3.8"
- sh: "sudo apt-get -y install python3.9 python3.9-venv"

- sh: "which python3.8"
- sh: "which python3.7"
- sh: "which python3.6"
- sh: "which python3.9"

- sh: "PATH=$PATH:/usr/bin/python3.9:/usr/bin/python3.8:/usr/bin/python3.7"
- sh: "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py"
- sh: "curl https://bootstrap.pypa.io/pip/3.6/get-pip.py -o get-pip-36.py"

- sh: "sudo apt-get -y install python3-distutils"
- sh: "sudo apt-get -y install python3.9-distutils"
- ps: "If ($env:INSTALL_PY_39_PIP) {python3.9 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_38_PIP) {python3.8 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_37_PIP) {python3.7 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_36_PIP) {python3.6 get-pip-36.py --user}"

# get testing env vars
- sh: "sudo apt install -y jq"
Expand Down
8 changes: 0 additions & 8 deletions appveyor-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ environment:
PYTHON_ARCH: '64'
RUN_SMOKE: 1
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_38_PIP: 1
INSTALL_PY_39_PIP: 1
APPVEYOR_CONSOLE_DISABLE_PTY: true
Expand All @@ -41,7 +40,6 @@ environment:
PYTHON_ARCH: '64'
RUN_SMOKE: 1
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_37_PIP: 1
INSTALL_PY_39_PIP: 1
APPVEYOR_CONSOLE_DISABLE_PTY: true
Expand All @@ -51,7 +49,6 @@ environment:
PYTHON_ARCH: '64'
RUN_SMOKE: 1
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_37_PIP: 1
INSTALL_PY_38_PIP: 1
APPVEYOR_CONSOLE_DISABLE_PTY: true
Expand Down Expand Up @@ -85,17 +82,13 @@ install:
- sh: "./aws_cli/bin/python -m pip install awscli"
- sh: "PATH=$(echo $PWD'/aws_cli/bin'):$PATH"

- sh: "sudo apt-get -y install python3.6"
- sh: "sudo apt-get -y install python2.7"
- sh: "sudo apt-get -y install python3.7"
- sh: "sudo apt-get -y install python3.8"
- sh: "sudo apt-get -y install python3.9 python3.9-dev python3.9-venv"

- sh: "which python3.8"
- sh: "which python3.7"
- sh: "which python3.6"
- sh: "which python3.9"
- sh: "which python2.7"

- sh: "PATH=$PATH:/usr/bin/python3.9:/usr/bin/python3.8:/usr/bin/python3.7"
- sh: "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py"
Expand All @@ -106,7 +99,6 @@ install:
- ps: "If ($env:INSTALL_PY_39_PIP) {python3.9 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_38_PIP) {python3.8 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_37_PIP) {python3.7 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_36_PIP) {python3.6 get-pip-36.py --user}"

# update ca-certificates which causes failures with newest golang library
- sh: "sudo apt-get install --reinstall ca-certificates"
Expand Down
4 changes: 1 addition & 3 deletions appveyor-windows-build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ install:
- "C:\\Python39\\python.exe -m pip freeze"
- "refreshenv"
- ps: "mkdir -Force C:\\tmp"
- "SET PATH=%PYTHON_HOME%;%PATH%;C:\\Python36-x64;C:\\Python27-x64;C:\\Python38;C:\\Python39"
- "SET PATH=%PYTHON_HOME%;%PATH%;C:\\Python38;C:\\Python39"
- "echo %PYTHON_HOME%"
- "echo %PATH%"
- "python --version"
Expand All @@ -52,8 +52,6 @@ install:
- "python -m pip install --upgrade setuptools wheel virtualenv"

# Upgrade pip in each python
- "C:\\Python27\\python.exe -m pip install --upgrade pip"
- "C:\\Python36-x64\\python.exe -m pip install --upgrade pip"
# python is python3.7
- "python -m pip install --upgrade pip"
- "C:\\Python38\\python.exe -m pip install --upgrade pip"
Expand Down
9 changes: 0 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ environment:
PYTHON_ARCH: '64'
RUN_SMOKE: 1
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_38_PIP: 1
INSTALL_PY_39_PIP: 1
AWS_S3: 'AWS_S3_37'
Expand All @@ -27,7 +26,6 @@ environment:
PYTHON_ARCH: '64'
RUN_SMOKE: 1
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_37_PIP: 1
INSTALL_PY_39_PIP: 1
AWS_S3: 'AWS_S3_38'
Expand All @@ -39,7 +37,6 @@ environment:
PYTHON_ARCH: '64'
RUN_SMOKE: 1
NOSE_PARAMETERIZED_NO_WARN: 1
INSTALL_PY_36_PIP: 1
INSTALL_PY_37_PIP: 1
INSTALL_PY_38_PIP: 1
AWS_S3: 'AWS_S3_39'
Expand Down Expand Up @@ -158,28 +155,22 @@ for:
- sh: "./aws_cli/bin/python -m pip install awscli"
- sh: "PATH=$(echo $PWD'/aws_cli/bin'):$PATH"

- sh: "sudo apt-get -y install python3.6"
- sh: "sudo apt-get -y install python2.7"
- sh: "sudo apt-get -y install python3.7"
- sh: "sudo apt-get -y install python3.8"
- sh: "sudo apt-get -y install python3.9"

- sh: "which python3.8"
- sh: "which python3.7"
- sh: "which python3.6"
- sh: "which python3.9"
- sh: "which python2.7"

- sh: "PATH=$PATH:/usr/bin/python3.9:/usr/bin/python3.8:/usr/bin/python3.7"
- sh: "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py"
- sh: "curl https://bootstrap.pypa.io/pip/3.6/get-pip.py -o get-pip-36.py"

- sh: "sudo apt-get -y install python3-distutils"
- sh: "sudo apt-get -y install python3.9-distutils"
- ps: "If ($env:INSTALL_PY_39_PIP) {python3.9 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_38_PIP) {python3.8 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_37_PIP) {python3.7 get-pip.py --user}"
- ps: "If ($env:INSTALL_PY_36_PIP) {python3.6 get-pip-36.py --user}"

# update ca-certificates which causes failures with newest golang library
- sh: "sudo apt-get install --reinstall ca-certificates"
Expand Down
6 changes: 3 additions & 3 deletions designs/_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ Design
of your implementation, relationships* *between components, constraints,
etc.*

`.samrc` Changes
``samconfig.toml`` Changes
----------------

*Explain the new configuration entries, if any, you want to add to
.samrc*
`samconfig.toml`*

Security
--------
Expand All @@ -78,7 +78,7 @@ connection secured**
**Are you reading/writing to a temporary folder? If so, what is this
used for and when do you clean up?**

**How do you validate new .samrc configuration?**
**How do you validate new `samconfig.toml` configuration?**

What is your Testing Plan (QA)?
===============================
Expand Down
203 changes: 203 additions & 0 deletions designs/root_help_text_design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
AWS SAM CLI: Root command help test Design
==========================================

What is the problem?
--------------------

Currently AWS SAM CLI's root command help text does not showcase a coherent story on how to develop a serverless application.

Current state of the world as of v1.71.0

```
Usage: sam [OPTIONS] COMMAND [ARGS]...
AWS Serverless Application Model (SAM) CLI
The AWS Serverless Application Model extends AWS CloudFormation to provide a
simplified way of defining the Amazon API Gateway APIs, AWS Lambda
functions, and Amazon DynamoDB tables needed by your serverless application.
You can find more in-depth guide about the SAM specification here:
https://github.com/awslabs/serverless-application-model.
Options:
--debug Turn on debug logging to print debug message generated by SAM
CLI and display timestamps.
--version Show the version and exit.
--info
-h, --help Show this message and exit.
Commands:
init Init an AWS SAM application.
validate Validate an AWS SAM template.
build Build your Lambda function code
local Run your Serverless application locally for quick development...
package Package an AWS SAM application.
deploy Deploy an AWS SAM application.
delete Delete an AWS SAM application and the artifacts created by sam
deploy.
logs Fetch logs for a function
publish Publish a packaged AWS SAM template to the AWS Serverless
Application Repository.
traces Fetch AWS X-Ray traces
sync Sync a project to AWS
pipeline Manage the continuous delivery of the application
```

What will be changed?
---------------------

The help text should showcase the stages in the lifecycle of development in a serverless application.

```
Usage: sam [OPTIONS] COMMAND [ARGS]...
AWS Serverless Application Model (SAM) CLI
The AWS Serverless Application Model extends AWS CloudFormation to provide a
simplified way of defining the Amazon API Gateway APIs, AWS Lambda
functions, and Amazon DynamoDB tables needed by your serverless application.
You can find more in-depth guide about the SAM specification here:
https://github.com/awslabs/serverless-application-model.
Commands:
*Create an App!*
init Init an AWS SAM application
*Develop your app!*
build Build your Lambda Function code
local Run your serverless function locally
validate Validate an AWS SAM template
sync (NEW) Sync a project to AWS
*Deploy your app!*
package Package an AWS SAM application
deploy Deploy an AWS SAM application
*Monitor your app!*
logs Fetch logs for a function
traces Fetch AWS X-Ray traces
*And More!*
delete Delete an AWS SAM application and the artifacts created by sam deploy.
list (NEW) Get local and deployed state of serverless application.
pipeline Manage the continuous delivery of the application
publish Publish a packaged AWS SAM template to AWS Serverless Application Repository for sharing.
Global Options:
--debug Turn on debug logging to print debug message generated by SAM
CLI and display timestamps.
--version Show the version and exit.
--info
-h, --help Show this message and exit.
```


Success criteria for the change
-------------------------------

* The success criteria for the change is less time spent on the help text to understand which part of the lifecycle a particular command operates in.
* Increased confidence that the tool will help the user move in the right direction for their application.

Out-of-Scope
------------
* Changes in the sub-command help text.


User Experience Walkthrough
---------------------------

Implementation
==============

CLI Changes
-----------

CLI interface will remain the same.

### Breaking Change

N/A

Design
------

There will be a separate implementation PR to showcase the changes, but it will use `click` to override commands options and help text.

`samconfig.toml` Changes
----------------

N/A

Security
--------

**What new dependencies (libraries/cli) does this change require?**

* No new dependencies

**What other Docker container images are you using?**

N/A

**Are you creating a new HTTP endpoint? If so explain how it will be
created & used**

N/A

**Are you connecting to a remote API? If so explain how is this
connection secured**

N/A

**Are you reading/writing to a temporary folder? If so, what is this
used for and when do you clean up?**

N/A

**How do you validate new samconfig.toml configuration?**

N/A

What is your Testing Plan (QA)?
===============================

Goal
----

Pre-requesites
--------------

Test Scenarios/Cases
--------------------

Expected Results
----------------

Pass/Fail
---------

Documentation Changes
=====================

Open Issues
============

Task Breakdown
==============

- \[x\] Send a Pull Request with this design document
- \[ \] Build the command line interface
- \[ \] Build the underlying library
- \[ \] Unit tests
- \[ \] Functional Tests
- \[ \] Integration tests
- \[ \] Run all tests on Windows
- \[ \] Update documentation
Loading

0 comments on commit da6e906

Please sign in to comment.