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

fix(amplify-provider-awscloudformation): add if/else for warning message in sandbox mode #8545

Merged

Conversation

danielleadams
Copy link
Member

@danielleadams danielleadams commented Oct 25, 2021

Description of changes

Adds the sandbox mode warning to an if/else statement.

  • If the sandbox mode is enabled in the GraphQL schema AND the user has an API Key configured, the sandbox mode warning message is displayed on amplify api gql-compile.
  • Otherwise, the CLI will recommend adding auth to models if it is missing on any types.

Description of how you validated changes

Tested locally with amplify-dev local binary.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies

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

@danielleadams danielleadams requested a review from a team as a code owner October 25, 2021 20:48
@codecov-commenter
Copy link

Codecov Report

Merging #8545 (2e1e54e) into master (bd435e2) will increase coverage by 1.22%.
The diff coverage is 75.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8545      +/-   ##
==========================================
+ Coverage   55.92%   57.14%   +1.22%     
==========================================
  Files         695      724      +29     
  Lines       38881    40849    +1968     
  Branches     7871     8364     +493     
==========================================
+ Hits        21743    23343    +1600     
- Misses      16343    16696     +353     
- Partials      795      810      +15     
Impacted Files Coverage Δ
...egory-api/src/provider-utils/supported-services.ts 100.00% <ø> (ø)
packages/amplify-category-auth/src/index.js 15.74% <0.00%> (ø)
...auth/src/provider-utils/awscloudformation/index.js 3.90% <0.00%> (ø)
...s/amplify-category-geo/src/commands/geo/console.ts 53.84% <0.00%> (+3.84%) ⬆️
...amplify-cli-core/src/feature-flags/featureFlags.ts 83.62% <ø> (ø)
packages/amplify-cli/src/domain/amplify-toolkit.ts 2.39% <0.00%> (+<0.01%) ⬆️
...index-transformer/src/graphql-index-transformer.ts 100.00% <ø> (ø)
...amplify-graphql-index-transformer/src/resolvers.ts 99.57% <ø> (+<0.01%) ⬆️
...es/amplify-graphql-index-transformer/src/schema.ts 98.19% <ø> (+0.05%) ⬆️
...transformer/src/graphql-predictions-transformer.ts 97.80% <ø> (-1.62%) ⬇️
... and 86 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 59117c2...2e1e54e. Read the comment docs.

@ammarkarachi ammarkarachi merged commit 1da86c2 into aws-amplify:master Oct 26, 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.

None yet

4 participants