From c664a14e5a5e490c793bd00d67c8e8e5096b0a06 Mon Sep 17 00:00:00 2001 From: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:07:47 -0500 Subject: [PATCH 1/2] chore: improve bug report template (#7773) --- .github/ISSUE_TEMPLATE/bug_report.md | 7 +++- .github/workflows/bug-report-helper.yml | 50 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/bug-report-helper.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 55cf76a8d5e..24bac3fa35c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -87,4 +87,9 @@ npx envinfo --system --binaries --browsers --npmPackages --npmGlobalPackages **Additional context** Add any other context about the problem here. -**_You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app._** +**Is this a production issue?** +Are you experiencing this issue with a production application where end users are affected? + +- [ ] (check box if yes) + +**_You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app._** \ No newline at end of file diff --git a/.github/workflows/bug-report-helper.yml b/.github/workflows/bug-report-helper.yml new file mode 100644 index 00000000000..3dcc60f7120 --- /dev/null +++ b/.github/workflows/bug-report-helper.yml @@ -0,0 +1,50 @@ +name: Issue Test + +on: issues + +jobs: + test: + name: Test + runs-on: ubuntu-latest + if: | + (github.event.action == 'edited' || github.event.action == 'opened') && + !contains(github.event.issue.labels.*.name, 'production-issue') && + (contains(github.event.issue.body, '- [x] (check box if yes)') || + contains(github.event.issue.body, '- [ x] (check box if yes)') || + contains(github.event.issue.body, '- [x ] (check box if yes)') || + contains(github.event.issue.body, '- [ x ] (check box if yes)')) + + steps: + - name: Add production-issue label + # Apache License - https://github.com/actions-ecosystem/action-add-labels + uses: actions-ecosystem/action-add-labels@v1 + with: + # Create scoped-down token + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: production-issue + + - name: Respond with suggestion + # MIT License - https://github.com/peter-evans/create-or-update-comment + uses: peter-evans/create-or-update-comment@v1 + with: + issue-number: ${{ github.event.issue.number }} + body: | + Thanks for reporting this issue! The team has been alerted and someone will respond shortly. + In the mean time, please try installing a previous version of Amplify + ```bash + rm -rf node_modules yarn.lock package-lock.json + npm i aws-amplify + ``` + + - name: Sanitize Issue Title + run: | + export sanitized_issue_title=`echo "${{ github.event.issue.title }}" | sed 's/[^a-zA-Z0-9 ]//g'` + echo "sanitized_issue_title=$sanitized_issue_title" >> $GITHUB_ENV + + - name: Execute Slack Workflow + # MIT License - https://github.com/fjogeleit/http-request-action + uses: fjogeleit/http-request-action@master + with: + url: ${{ secrets.SLACK_WEBHOOK_URL }} + method: POST + data: '{ "issue_url": "${{ github.event.issue.html_url }}", "issue_title": "${{ env.sanitized_issue_title }}" }' From ad2dd864ffbe3bc5c620c3078f82805a4ed83439 Mon Sep 17 00:00:00 2001 From: Sebastien Schwartz Date: Mon, 1 Mar 2021 23:59:42 +0100 Subject: [PATCH 2/2] fix(@aws-amplify/predictions): Missing return in AmazonAIConvertPredictionsProvider.ts (#7803) Without this return, user will also get 'Source types other than byte source are not supported.' error. Co-authored-by: William Lee <43682783+wlee221@users.noreply.github.com> --- .../src/Providers/AmazonAIConvertPredictionsProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/predictions/src/Providers/AmazonAIConvertPredictionsProvider.ts b/packages/predictions/src/Providers/AmazonAIConvertPredictionsProvider.ts index afe5a31305c..f4ef5f803e8 100644 --- a/packages/predictions/src/Providers/AmazonAIConvertPredictionsProvider.ts +++ b/packages/predictions/src/Providers/AmazonAIConvertPredictionsProvider.ts @@ -189,7 +189,7 @@ export class AmazonAIConvertPredictionsProvider extends AbstractConvertPredictio }, }; } catch (err) { - Promise.reject(err); + return Promise.reject(err); } }