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

Use public ecr registry instead of dockerhub - This will rate limit when you start scaling it #397

Open
slice-sarthakd opened this issue Oct 26, 2023 · 9 comments

Comments

@slice-sarthakd
Copy link

ERROR: failed to solve: codiumai/pr-agent:github_action: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/codiumai/pr-agent/manifests/sha256:ab7023d01dca17997084858158feb66f91ee77f56db08471fdba98d073dab055: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
Warning: Docker build failed with exit code 1, back off 1.809 seconds before retry.
/usr/bin/docker build -t f1ad72:2d931e7311a44a52a118e2a317f8deb8 -f "/home/runner/_work/_actions/Codium-ai/pr-agent/main/Dockerfile.github_action_dockerhub" "/home/runner/_work/_actions/Codium-ai/pr-agent/main"
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile.github_action_dockerhub
#1 transferring dockerfile: 158B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 170B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/codiumai/pr-agent:github_action
#3 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/codiumai/pr-agent/manifests/sha[25](https://github.com/Buddy-Git/application-svc/actions/runs/6650619964/job/18071095238?pr=958#step:2:25)6:ab7023d01dca17997084858158feb66f91ee77f56db08471fdba98d073dab055: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

[internal] load metadata for docker.io/codiumai/pr-agent:github_action:


Dockerfile.github_action_dockerhub:1

 1 | >>> FROM codiumai/pr-agent:github_action
 2 |     

ERROR: failed to solve: codiumai/pr-agent:github_action: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/codiumai/pr-agent/manifests/sha256:ab7023d01dca17997084858158feb66f91ee77f56db08471fdba98d073dab055: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
Warning: Docker build failed with exit code 1, back off 1.169 seconds before retry.
/usr/bin/docker build -t f1ad72:2d931e7311a44a52a118e2a317f8deb8 -f "/home/runner/_work/_actions/Codium-ai/pr-agent/main/Dockerfile.github_action_dockerhub" "/home/runner/_work/_actions/Codium-ai/pr-agent/main"
#0 building with "default" instance using docker driver

#1 [internal] load .dockerignore
#1 transferring context:
#1 transferring context: 170B done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile.github_action_dockerhub
#2 transferring dockerfile: 158B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/codiumai/pr-agent:github_action
#3 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/codiumai/pr-agent/manifests/sha256:ab7023d01dca17997084858158feb66f91ee77f56db08471fdba98d073dab055: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

[internal] load metadata for docker.io/codiumai/pr-agent:github_action:


Dockerfile.github_action_dockerhub:1

 1 | >>> FROM codiumai/pr-agent:github_action
 2 |     

ERROR: failed to solve: codiumai/pr-agent:github_action: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/codiumai/pr-agent/manifests/sha256:ab7023d01dca17997084858158feb66f91ee77f56db08471fdba98d073dab055: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
Error: Docker build failed with exit code 1

@mrT23
Copy link
Collaborator

mrT23 commented Oct 26, 2023

what ? is this a commercial? auto message?

@mrT23 mrT23 added the invalid This doesn't seem right label Oct 26, 2023
@slice-sarthakd
Copy link
Author

Nope no commercial. Default images are of dockerhub, dockerhub has limits - using public ecr would give better rate limits

@mrT23
Copy link
Collaborator

mrT23 commented Oct 26, 2023

ok. thanks. will consider

@slice-sarthakd
Copy link
Author

Can you please remove the invalid label?

@mrT23 mrT23 removed the invalid This doesn't seem right label Oct 27, 2023
@okotek
Copy link
Contributor

okotek commented Oct 29, 2023

@slice-sarthakd thanks, we'll look for ways to solve the rate limit issue, AWS or other solutions.

@okotek
Copy link
Contributor

okotek commented Oct 29, 2023

Can you share your usage pattern? (how many requests per hour)

As a workaround in the meanwhile:

  1. Does authenticating help? https://github.com/docker/login-action#dockerhub
  2. Also, for higher use rate it will probably benefit you to run your own instance and define a webhook (check the GitHub app section in the installation guide).
  3. (Easiest): You can fork the repository and modify action.yaml, change Dockerfile.github_action_dockerhub to Dockerfile.github_action. In your GitHub Actions workflow, modify the repository name to your fork. This way, instead of downloading from DockerHub, it will get built every time. Slower, but not prone to DockerHub rate limits.

@slice-sarthakd
Copy link
Author

slice-sarthakd commented Oct 30, 2023

@okotek yep I have done the third one only for now 3 days back - changed the base image in the fork and using it: main...TypicalDefender:pr-agent:feature-pragent-ecr

I am using the same base image from from public ecr. Let me know if there are any other steps performed while being the codium pr agent final docker image or is the the same build steps for which I have modified.

@okotek
Copy link
Contributor

okotek commented Oct 30, 2023

Your changes are totally equivalent to using the original action.

@okotek
Copy link
Contributor

okotek commented Oct 30, 2023

@slice-sarthakd Regarding public ECR repo,

https://aws.amazon.com/blogs/containers/understanding-data-transfer-costs-for-aws-container-services/
All data transfer into Amazon ECR Public incurs no charge from Amazon ECR. Data transfer out is subject to charges when more than 5 TB/month is transferred out to non-AWS destinations, and you have authenticated to Amazon ECR with an AWS account. Up to 500 GB/month can be transferred out to non-AWS destinations to clients that have not authenticated (that is, anonymously). After that limit is reached, no further anonymous data transfer is allowed.

It looks like it's impossible to use anonymously >500GB/month.

We'll look at other solutions.

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

No branches or pull requests

5 participants
@okotek @mrT23 @slice-sarthakd and others