From 5dc0da0e30fe8cd0e00cb197020f5ef3711b7ba4 Mon Sep 17 00:00:00 2001 From: Adolfo Date: Wed, 22 Feb 2023 18:48:30 +0100 Subject: [PATCH 1/3] Archive plugin documentation (#287) Improve archive command documentation * Show the options that the new `archive` plugin provides to customize the operation behavior. * Provide an example with the `archive` command taking two parameters --- readme.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/readme.md b/readme.md index 7aac6068..d1c8f3fc 100644 --- a/readme.md +++ b/readme.md @@ -185,8 +185,33 @@ To build and package your Lambda, run the following command: swift package archive ``` +The `archive` command can be customized using the following parameters + +* `--output-path` A valid file system path where a folder with the archive operation result will be placed. This folder will contains the following elements: + * A file link named `bootstrap` + * An executable file + * A **Zip** file ready to be upload to AWS +* `--verbose` A number that sets the command output detail level between the following values: + * `0` (Silent) + * `1` (Output) + * `2` (Debug) +* `--swift-version` Swift language version used to define the Amazon Linux 2 Docker image. For example "5.7.3" +* `--base-docker-image` An Amazon Linux 2 docker image name available in your system. + +Both `--swift-version` and `--base-docker-image` are mutually exclusive + +Here's an example + +```zsh +swift package archive --output-path /Users/JohnAppleseed/Desktop --verbose 2 +``` + +This command execution will generate a folder at `/Users/JohnAppleseed/Desktop` with the lambda zipped and ready to upload it and set the command detail output level to `2` (debug) + on macOS, the archiving plugin uses docker to build the Lambda for Amazon Linux 2, and as such requires to communicate with Docker over the localhost network. At the moment, SwiftPM does not allow plugin communication over network, and as such the invocation requires breaking from the SwiftPM plugin sandbox. This limitation would be removed in the future. + + ```shell swift package --disable-sandbox archive From de518004e7367e4eeb5bfe1df40c2cb9ec469897 Mon Sep 17 00:00:00 2001 From: Adolfo Date: Thu, 23 Feb 2023 16:18:25 +0100 Subject: [PATCH 2/3] Issue Report v2 Issue template using the GitHub Forms syntax. --- .github/ISSUE_TEMPLATE/issue-report.yml | 74 +++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/issue-report.yml diff --git a/.github/ISSUE_TEMPLATE/issue-report.yml b/.github/ISSUE_TEMPLATE/issue-report.yml new file mode 100644 index 00000000..1a95ddad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-report.yml @@ -0,0 +1,74 @@ +name: Swift AWS Lambda SDK issue +description: File an issue report with the usage of the Swift AWS Lambda Runtime +body: + - type: markdown + attributes: + value: "Thanks for taking the time to fill out this issue report" + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: What you expected to happen? + placeholder: Describe with your own words the expected result + validations: + required: true + - type: textarea + id: what-happend + attributes: + label: Actual behavior + description: What actually happened + placeholder: Describe + validations: + required: true + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to reproduce + description: List the steps followed to reproduce the behaviour you are reporting + placeholder: | + 1. First I... + 2. Then... + 3. Finally... + validations: + required: true + - type: textarea + id: code-snippet + attributes: + label: If possible, minimal yet complete reproducer code (or URL to code) + description: List the steps followed to reproduce the behaviour you are reporting + placeholder: | + You can add any relevant code snippet that you consider or an URL to code. + + URL could be a link to a GitHub Gist, for example + validations: + required: false + - type: input + id: swift-aws-lambda-runtime-version + attributes: + label: What version of this project (`swift-aws-lambda-runtime`) are you using? + description: The release, branch or commit hash related with this issue. + placeholder: 1.0.0-alpha.1 + render: shell + validations: + required: true + - type: input + id: swift-version + attributes: + label: Swift version + description: Swift environment version. + placeholder: | + Open a Terminal and execute the following command + + swift --version && uname -a + render: shell + validations: + required: true + - type: input + id: amazon-linux-2-version + attributes: + label: Amazon Linux 2 docker image version + description: The docker image tag used to archive the lambda, if available. + placeholder: 5.7.3-amazonlinux2 + render: shell + validations: + required: false From 935755b79d9ebae6ca48349d03ccc88f089df7a2 Mon Sep 17 00:00:00 2001 From: Adolfo Date: Thu, 23 Feb 2023 16:21:05 +0100 Subject: [PATCH 3/3] Delete ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 1c2f5167..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,20 +0,0 @@ -### Expected behavior -_[what you expected to happen]_ - -### Actual behavior -_[what actually happened]_ - -### Steps to reproduce - -1. ... -2. ... - -### If possible, minimal yet complete reproducer code (or URL to code) - -_[anything to help us reproducing the issue]_ - -### SwiftAWSLambdaRuntime version/commit hash - -_[the SwiftAWSLambdaRuntime tag/commit hash]_ - -### Swift & OS version (output of `swift --version && uname -a`)