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

Check image pushability based on image/tag count limits prior to push #8980

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

abhay-krishna
Copy link
Member

@abhay-krishna abhay-krishna commented Nov 6, 2024

We have noticed that the image copy through Skopeo errors out when the destination repo has already hit the 10000 images mark or the 1000 tags per image mark, since these are the default limits set by ECR Public. In these cases, we should fail fast instead of retrying the image copy.
This PR adds logic to perform the check for images-per-repo and tags-per-repo on the destination ECR and fail early.

I tested this by building a small program with the actual ECR public bits (with credentials provided by my local AWS config file) and the checker method that returns the error. I created a repository and pushed 10000 images to it and tested the code against it.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 6, 2024
@abhay-krishna
Copy link
Member Author

/retest

@abhay-krishna abhay-krishna force-pushed the check-image-pushability branch from 67b5afe to 7b1ad07 Compare November 8, 2024 04:19
@abhay-krishna
Copy link
Member Author

/hold

@abhay-krishna abhay-krishna force-pushed the check-image-pushability branch 2 times, most recently from d2b4e8a to 2e40442 Compare November 11, 2024 22:57
@abhay-krishna
Copy link
Member Author

/retest

@abhay-krishna abhay-krishna force-pushed the check-image-pushability branch from 2e40442 to 74318e8 Compare November 12, 2024 06:51
@sp1999
Copy link
Member

sp1999 commented Nov 12, 2024

/lgtm

@abhay-krishna
Copy link
Member Author

/cherrypick release-0.21

@eks-distro-pr-bot
Copy link
Contributor

@abhay-krishna: once the present PR merges, I will cherry-pick it on top of release-0.21 in a new PR and assign it to you.

In response to this:

/cherrypick release-0.21

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@abhay-krishna
Copy link
Member Author

/cherrypick release-0.20

@eks-distro-pr-bot
Copy link
Contributor

@abhay-krishna: once the present PR merges, I will cherry-pick it on top of release-0.20 in a new PR and assign it to you.

In response to this:

/cherrypick release-0.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@abhay-krishna
Copy link
Member Author

/unhold

@abhay-krishna
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhay-krishna

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot merged commit 6898d3e into aws:main Nov 12, 2024
8 checks passed
@eks-distro-pr-bot
Copy link
Contributor

@abhay-krishna: new pull request created: #8998

In response to this:

/cherrypick release-0.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@eks-distro-pr-bot
Copy link
Contributor

@abhay-krishna: new pull request created: #8999

In response to this:

/cherrypick release-0.21

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants