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: validate that the app limit has not been reached (issue #10063) #10158

Merged

Conversation

SebasRod23
Copy link
Contributor

Description of changes

Validate that the app limit has not been reached by checking the meta file and print a warning it it
has been reached

Issue #, if available

Closes #10063

Description of how you validated changes

Reached the app limit and got the expected warning. Then, deleted an app in the cloud and created a new project, the warning was not printed as expected.

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.

Validate that the app limit has not been reached by checking the meta file and print a warning it it
has been reached

Closes aws-amplify#10063
@SebasRod23 SebasRod23 requested a review from a team as a code owner April 7, 2022 20:54
@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2022

Codecov Report

Merging #10158 (091667f) into master (7f9f072) will increase coverage by 0.08%.
The diff coverage is 60.60%.

@@            Coverage Diff             @@
##           master   #10158      +/-   ##
==========================================
+ Coverage   54.08%   54.17%   +0.08%     
==========================================
  Files         837      840       +3     
  Lines       46340    46420      +80     
  Branches     9885     9897      +12     
==========================================
+ Hits        25065    25150      +85     
+ Misses      19281    19272       -9     
- Partials     1994     1998       +4     
Impacted Files Coverage Δ
...tils/awscloudformation/secrets/ssmClientWrapper.ts 10.52% <0.00%> (-0.91%) ⬇️
packages/amplify-cli-core/src/deploymentState.ts 100.00% <ø> (ø)
packages/amplify-cli-core/src/index.ts 100.00% <ø> (ø)
...fy-cli/src/domain/amplify-usageData/NoUsageData.ts 7.69% <0.00%> (ø)
...chable-transformer/src/cdk/create-cfnParameters.ts 100.00% <ø> (ø)
...ider-awscloudformation/src/aws-utils/aws-lambda.ts 15.78% <0.00%> (-1.86%) ⬇️
...provider-awscloudformation/src/aws-utils/aws-s3.ts 14.96% <12.12%> (-1.46%) ⬇️
...ansformer-core/src/cdk-compat/stack-synthesizer.ts 8.33% <12.50%> (-4.17%) ⬇️
...mation/service-walkthroughs/appSync-walkthrough.ts 15.30% <20.00%> (-0.10%) ⬇️
packages/amplify-cli/src/index.ts 37.94% <24.07%> (+1.08%) ⬆️
... and 33 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@jhockett jhockett left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @SebasRod23. One minor comment, but otherwise LGTM pending the API review outcome.

packages/amplify-cli/src/init-steps/s9-onSuccess.ts Outdated Show resolved Hide resolved
const appId = currentAmplifyMeta?.providers?.awscloudformation?.AmplifyAppId;

if (!appId) {
printer.warn('You have reached your app limit:');
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be Amplify App limit

@akshbhu
Copy link
Contributor

akshbhu commented May 4, 2022

This PR will be merged after API Review

const appId = currentAmplifyMeta?.providers?.awscloudformation?.AmplifyAppId;

if (!appId) {
printer.warn('You have reached your Amplify App limit:');
Copy link
Contributor

Choose a reason for hiding this comment

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

The maximum number of apps that you can create with Amplify in this region has likely been reached:
For more information on Amplify Service Quotas, see:
https://docs.aws.amazon.com/general/latest/gr/amplify.html#service-quotas-amplify

@akshbhu akshbhu changed the title fix: validate that the app limit has not been reached fix: validate that the app limit has not been reached (issue #10063) May 5, 2022
@akshbhu akshbhu merged commit 6669996 into aws-amplify:master May 5, 2022
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.

poor error handling when reaching Amplify app limit
6 participants