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

chore(app-staging-synthesizer): tool to test maximum ecr repository allowance #26173

Merged
merged 5 commits into from
Jul 3, 2023

Conversation

kaizencc
Copy link
Contributor

@kaizencc kaizencc commented Jun 29, 2023

And that maximum allowance right now is 20 (it's actually 21 but we are rounding down for safety).

repos: 2, size: 24820 bytes
repos: 3, size: 26189 bytes
repos: 4, size: 27558 bytes
repos: 5, size: 28927 bytes
repos: 6, size: 30296 bytes
repos: 7, size: 31665 bytes
repos: 8, size: 33034 bytes
repos: 9, size: 34403 bytes
repos: 10, size: 35772 bytes
repos: 11, size: 37148 bytes
repos: 12, size: 38524 bytes
repos: 13, size: 39900 bytes
repos: 14, size: 41276 bytes
repos: 15, size: 42652 bytes
repos: 16, size: 44028 bytes
repos: 17, size: 45404 bytes
repos: 18, size: 46780 bytes
repos: 19, size: 48156 bytes
repos: 20, size: 49532 bytes
repos: 21, size: 50908 bytes

Consistently, each additional repo adds 1369 bytes to the template. Before adding the inline functions, each additional repo was roughly 1200 bytes.

Current rough breakdown of size in the integ test (1 s3 bucket and 2 ecr repos):

25KB

~ 2KB for node version mapping
~ 6KB for auto delete images (4KB is the inline function)
~ 6KB for auto delete objects (4KB is the inline function)

Based on these calculations, it is semi reasonable that the repo allowance has gone from 38 to 21.


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

@gitpod-io
Copy link

gitpod-io bot commented Jun 29, 2023

@github-actions github-actions bot added the p2 label Jun 29, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team June 29, 2023 22:37
@kaizencc kaizencc marked this pull request as ready for review June 29, 2023 22:37
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 29, 2023
@rix0rrr
Copy link
Contributor

rix0rrr commented Jun 30, 2023

One final thing that just occurred to me: whatever the number is at any one point, we can never lower it. Can you add a test that creates 14 different images and synths, to check that we can successfully add at least 14 images?

Name the test and/or put a comment next to it so that it's very obvious why it's testing that, so that a person in the future doesn't go "well let me lower that number to 12 to make the test pass again".

@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Jul 3, 2023
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

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

Looks good. Let's fix it at 20 and then ship it!

@kaizencc kaizencc removed the pr/do-not-merge This PR should not be merged at this time. label Jul 3, 2023
@mergify
Copy link
Contributor

mergify bot commented Jul 3, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: b80fcb5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit f525e5a into main Jul 3, 2023
5 checks passed
@mergify mergify bot deleted the conroy/ecr-repos branch July 3, 2023 20:38
@mergify
Copy link
Contributor

mergify bot commented Jul 3, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants