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

merged with Main #7978

Merged
merged 126 commits into from
Aug 20, 2021
Merged

merged with Main #7978

merged 126 commits into from
Aug 20, 2021

Conversation

akshbhu
Copy link
Contributor

@akshbhu akshbhu commented Aug 17, 2021

Description of changes

Merging main branch into ext

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

letsbelopez and others added 30 commits July 7, 2021 09:19
…plify#7678)

Need to check for siwa params because privateKey is not returned from Cognito, so it may not always
be available. Worst case the user will need to re-configure SIWA in a new environment for amplify
init.

Co-authored-by: David Lopez <lopezbnd@amazon.com>
 - amplify-app@3.0.3
 - amplify-appsync-simulator@1.27.2
 - amplify-category-api@2.31.14
 - amplify-category-auth@2.35.0
 - @aws-amplify/cli@5.1.1
 - amplify-console-integration-tests@1.8.0
 - amplify-container-hosting@1.3.14
 - amplify-e2e-core@1.23.0
 - amplify-e2e-tests@2.45.0
 - amplify-frontend-javascript@2.23.0
 - amplify-go-function-runtime-provider@1.8.6
 - @aws-amplify/graphql-function-transformer@0.3.5
 - @aws-amplify/graphql-http-transformer@0.4.1
 - @aws-amplify/graphql-model-transformer@0.4.4
 - @aws-amplify/graphql-predictions-transformer@0.2.0
 - @aws-amplify/graphql-searchable-transformer@0.3.0
 - @aws-amplify/graphql-transformer-core@0.7.0
 - @aws-amplify/graphql-transformer-interfaces@1.7.0
 - amplify-headless-interface@1.8.0
 - amplify-migration-tests@3.1.0
 - amplify-provider-awscloudformation@4.55.0
 - amplify-util-headless-input@1.5.1
 - amplify-util-mock@3.33.4
…rs at runtime (aws-amplify#7219)

* fix: add-to-group PostConfirmation Lambda should not throw

Co-authored-by: Colin Ihrig <colihrig@amazon.com>
…ws-amplify#7456)

this commit prevents a copy/paste issue where an extra newline character comes along with an fcm
key.

fix aws-amplify#7440
…emplate load (aws-amplify#7518)

rebase code from latest updates and fixed yaml template load
…ons (aws-amplify#7594)

* fix: check for undefined permissions when removing dependent permissions
aws-amplify#7636)

* fix(amplify-appsync-simulator): string functions not called on items of JavaArray<string> in the resolvers

* feat(amplify-appsync-simulator): added toJavaString that accepts a string and returns a JavaString

* feat(amplify-appsync-simulator): map.keySet returns an a JavaArray with elements of type JavaString

* feat(amplify-appsync-simulator): using this.mapper in map.keySet
…arity (aws-amplify#7647)

change `Run 'amplify pull' to sync upstream changes.` -> `Run 'amplify pull' to sync future upstream
changes.` as desired in aws-amplify#5202

re aws-amplify#5202

Co-authored-by: Stuti Prasad <43947328+studpeps@users.noreply.github.com>
…lambda (aws-amplify#7651)

* fix: Move credential validation to the top function call

getProfileCredentials isn't always pulling from a file with an access key/secret key, so validation can error out in the case of source profiles. Moving this to the top function getProfiledAwsConfig and performing the validation on the AWS config instead means we can accommodate source profiles.

* Change: Make batch size parameterized on streaming

* Change: batch size and batching window duration are parameters

* Change: Decrease searchable streaming MaximumBatchingWindow to 1 second

Co-authored-by: Vandenberg <mvanden@88665a1e266e.ant.amazon.com>
…ify#7653)

* fix: show friendly error message when pull fails with EPERM
fix aws-amplify#7448

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
* style:removed extra whitespaces and standardized tabs in auth-templates

* fix(amplify-category-auth): fixed newline escape sequence to be os specific

fix aws-amplify#7662
…fy#7674)

* fix: add/update function when some LL are not yet migrated
Do an automatic tagged NPM release when a branch name is prefixed with tagged-release/
Co-authored-by: Colin Ihrig <colihrig@amazon.com>
* fix: checkout into existing env with new LL
 - amplify-app@3.0.4
 - amplify-appsync-simulator@1.27.3
 - amplify-category-analytics@2.21.13
 - amplify-category-api@2.31.15
 - amplify-category-auth@2.35.1
 - amplify-category-function@2.33.1
 - amplify-category-hosting@2.7.13
 - amplify-category-notifications@2.19.4
 - amplify-category-predictions@2.9.4
 - amplify-category-storage@2.12.1
 - amplify-category-xr@2.8.13
 - amplify-cli-core@1.24.1
 - @aws-amplify/cli@5.1.2
 - amplify-console-hosting@1.9.4
 - amplify-console-integration-tests@1.8.1
 - amplify-container-hosting@1.3.15
 - amplify-dotnet-function-template-provider@1.5.13
 - amplify-dynamodb-simulator@1.19.4
 - amplify-e2e-core@1.23.1
 - amplify-e2e-tests@2.45.1
 - amplify-frontend-ios@2.20.6
 - amplify-frontend-javascript@2.23.1
 - amplify-go-function-runtime-provider@1.8.7
 - @aws-amplify/graphql-function-transformer@0.3.6
 - @aws-amplify/graphql-http-transformer@0.4.2
 - @aws-amplify/graphql-model-transformer@0.4.5
 - @aws-amplify/graphql-predictions-transformer@0.2.1
 - @aws-amplify/graphql-searchable-transformer@0.3.1
 - @aws-amplify/graphql-transformer-core@0.7.1
 - amplify-java-function-runtime-provider@1.8.6
 - amplify-migration-tests@3.1.1
 - amplify-nodejs-function-runtime-provider@1.6.3
 - amplify-nodejs-function-template-provider@1.6.13
 - amplify-provider-awscloudformation@4.55.1
 - amplify-python-function-runtime-provider@1.9.3
 - amplify-util-import@1.5.4
 - amplify-util-mock@3.33.5
 - graphql-auth-transformer@6.24.14
 - graphql-connection-transformer@4.21.14
 - graphql-dynamodb-transformer@6.22.14
 - graphql-elasticsearch-transformer@4.11.14
 - graphql-function-transformer@2.5.13
 - graphql-http-transformer@4.18.1
 - graphql-key-transformer@2.23.14
 - graphql-predictions-transformer@2.5.13
 - graphql-relational-schema-transformer@2.18.2
 - graphql-transformer-common@4.19.5
 - graphql-transformer-core@6.28.13
 - graphql-transformers-e2e-tests@6.24.4
 - graphql-versioned-transformer@4.17.14
…aws-amplify#7740)

`amplify delete` now deletes the local `amplify` folder even if the project has been deleted in the
cloud.

close aws-amplify#7631
…ify#7712)

* bug(amplify-cli):resource-test file location issue resolved

* Changed  to '' for standard practice

* style(amplify-cli): Moved path import to top of the file
* fix: upgrade node runtime to 14

As we approach the EOL for node 12 security updates new
lambdas should be ideally be on node 14

* test: set nodejs14 as the detault
* feat(cli): searchable enum generates string filterinput

* feat(cli): searchable enum generates string filterinput

* remove unwanted imports

* remove unwanted imports

* set improvePluralization default value to true
* ci: add support for e2e token rotation

Currently we use long-lived, manually generated access tokens to set up AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables allowing our tests to run. This is a bad practice - authorization tokens should be automatically rotated to minimize risk of the tokens landing in the wrong hands.

This PR sets up the Amplify CLI codebase to use temporary credentials during CI. Temporary STS credentials use an additional parameter, AWS_SESSION_TOKEN, to authorize the requests.

This has been tested in CI on my fork and all tests pass:

https://app.circleci.com/pipelines/github/johnpc/amplify-cli/144/workflows/fb12f075-d881-4c92-8cf7-f8647afb909e

The token rotator itself is a lambda that runs every hour:

https://github.com/johnpc/amplify-e2e-token-rotation-lambda

* chore: use ini lib instead of manually updating file

* chore: update injectSessionToken calls
* fix(amplify-appsync-simulator): string functions not called on items of JavaArray<string> in the resolvers

* feat(amplify-appsync-simulator): add support for rdsUtils.toJsonString

* feat(amplify-appsync-simulator): added toJavaString that accepts a string and returns a JavaString

* feat(amplify-appsync-simulator): map.keySet returns an a JavaArray with elements of type JavaString

* feat(amplify-appsync-simulator): map.keySet returns an a JavaArray with elements of type JavaString

* feat(amplify-appsync-simulator): using this.mapper in map.keySet

* feat(amplify-appsync-simulator): cleanup
danielleadams and others added 13 commits August 6, 2021 11:58
…ws-amplify#7775)

* refactor(graphql-searchable-transformer): change Elasticsearch refs to @searchable and OpenSearch

* refactor(graphql-transformer-core): change Elasticsearch refs to @searchable and OpenSearch

* refactor(graphql-transformer-interfaces): change Elasticsearch refs to @searchable and OpenSearch

* refactor(graphql-model-transformer): change Elasticsearch refs to @searchable and OpenSearch

* refactor(graphql-mapping-template): add OpenSearch template that extends from Elasticsearch

* refactor(graphql-mapping-template): create Searchable template and extend for Elasticsearch template

* refactor(graphql-searchable-transformer): use Searchable mapping template

* refactor(graphql-searchable-transformer): update additional refs to Elasticsearch in python script

* refactor(graphql-transformer-common): add OpenSearch to resource constants file

* refactor(graphql-searchable-transformer): swap out Elasticsearch constants with OpenSearch

* refactor(graphql-transformer-core): fix typo

* refactor(graphql-transformer-core): change AMAZON_OPENSEARCH back to AMAZON_ELASTICSEARCH

* refactor(graphql-searchable-transformer): change AMAZON_OPENSEARCH back to AMAZON_ELASTICSEARCH

* refactor(graphql-transformer-interfaces): change AMAZON_OPENSEARCH back to AMAZON_ELASTICSEARCH

* Update packages/amplify-graphql-searchable-transformer/streaming-lambda/python_streaming_function.py

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>

* refactor(graphql-transformer-core): fix rebase

* refactor(graphql-searchable-transformer): change ES_ env vars to OPENSEARCH_

* refactor(graphql-transformer-core): rename elastic search to searchble in code comments

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v4.4.13...v4.4.15)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: mark context print deprecated

* chore: remove test prompts from demo
… variable (aws-amplify#7917)

cloudformation-template.json file has the env variable in camel case format, so env variable
deletion should look for camel case version of the variable name

fix aws-amplify#7777
@akshbhu akshbhu requested a review from a team as a code owner August 17, 2021 18:56
ammarkarachi and others added 11 commits August 17, 2021 12:36
…amplify#7684)

* feat: amplify add override root command and skeleton generation

* feat: build and package overrides directory

* test: add unit tests

* fix: updates with PR comments

* test: fix unit tests

Co-authored-by: Ghosh <kaustavg@3c22fb229ff6.ant.amazon.com>

Co-authored-by: Ghosh <kaustavg@3c22fb229ff6.ant.amazon.com>
* feat: add helper util package for overrides

* fix: remove lib files

* fix: add overrides helper lib to gitignore

* fix: namespace overrides package

* fix: fix eslint errors in lib/ files

Co-authored-by: Ghosh <kaustavg@3c22fb229ff6.ant.amazon.com>
 - @aws-amplify/cli-overrides-helper@1.1.0-ext.0
* feat: initial commit

* feat: root stack creation on init with cdk

* feat: enable for push

* feat: added build command for root stack override

* fix: authrole and Unauthrole Names

* feat: added synthesizer and address comments

* feat: added hash for root stack

* feat: deploy root stack to disk

* feat: updated amplifyMeta after root override

* feat: update curren-cloud-backend

* feat: refractor Root transform and added unit tests

* fix: removes Template from Cloudform

* feat: added build step in overrides
@codecov-commenter
Copy link

Codecov Report

Merging #7978 (840c120) into ext (a509b8e) will increase coverage by 1.87%.
The diff coverage is 68.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##              ext    #7978      +/-   ##
==========================================
+ Coverage   50.93%   52.81%   +1.87%     
==========================================
  Files         581      598      +17     
  Lines       28773    29723     +950     
  Branches     5451     5653     +202     
==========================================
+ Hits        14656    15698    +1042     
+ Misses      13067    12969      -98     
- Partials     1050     1056       +6     
Impacted Files Coverage Δ
...utils/awscloudformation/assets/cognito-defaults.js 70.73% <ø> (ø)
...udformation/service-walkthroughs/auth-questions.js 3.00% <0.00%> (-0.04%) ⬇️
...gory-auth/src/provider-utils/supported-services.ts 100.00% <ø> (ø)
packages/amplify-cli/src/domain/amplify-toolkit.ts 2.94% <0.00%> (-0.05%) ⬇️
packages/amplify-cli/src/domain/constants.ts 100.00% <ø> (ø)
...i/src/extensions/amplify-helpers/confirm-prompt.ts 75.00% <ø> (ø)
...src/extensions/amplify-helpers/input-validation.ts 100.00% <ø> (ø)
...mplify-cli/src/extensions/amplify-helpers/print.ts 18.42% <ø> (ø)
...es/amplify-cli/src/init-steps/s0-analyzeProject.ts 40.25% <0.00%> (-1.08%) ⬇️
...mplify-frontend-ios/lib/frontend-config-creator.js 16.56% <0.00%> (-0.11%) ⬇️
... and 87 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9202e3b...840c120. Read the comment docs.

Copy link
Contributor

@kaustavghosh06 kaustavghosh06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at commit history. Rebase looks fine.

@akshbhu akshbhu merged commit a69662d into aws-amplify:ext Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.