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

Optimize the push image processing logic when the quota is full #17390

Closed
lengrongfu opened this issue Aug 12, 2022 · 4 comments · Fixed by #17392
Closed

Optimize the push image processing logic when the quota is full #17390

lengrongfu opened this issue Aug 12, 2022 · 4 comments · Fixed by #17392
Assignees
Labels
kind/requirement New feature or idea on top of harbor

Comments

@lengrongfu
Copy link
Contributor

What can we help you?

The current image push logic is to post first and then put the image push. When the project quota is full, it will not return whether the quota has been exceeded until the put push is completed.
Hope to optimize to fail-fast logic and perform quota verification when executing post init interface requests.

@Vad1mo Vad1mo added the kind/requirement New feature or idea on top of harbor label Aug 12, 2022
@lengrongfu
Copy link
Contributor Author

  • The following is the effect of the push after my modification
[root@localhost ~]# docker push test.harbor.com/library/ubuntu
The push refers to repository [test.harbor.com/library/ubuntu]
629d9dbab5ed: Preparing
denied: subtracting 0 B of storage resource, which when updated to current usage of 187.5 MiB will exceed the configured upper limit of 10.0 MiB.
  • The following is the effect of the push before I modified
[root@localhost ~]# docker push test.harbor.com/library/ubuntu
The push refers to repository [test.harbor.com/library/ubuntu]
629d9dbab5ed: Pushing  80.35MB
denied: adding 29.0 MiB of storage resource, which when updated to current usage of 152.4 MiB will exceed the configured upper limit of 10.0 MiB.

It fails on calling the first interface, so there is no data transfer.

@lengrongfu
Copy link
Contributor Author

Hi, Is there anything to discuss this issue and PR?
@Vad1mo

@lengrongfu
Copy link
Contributor Author

Hi, feel free to post any thoughts on this issuer, please let me know what the community thinks.
@wy65701436

@lengrongfu
Copy link
Contributor Author

@zyyw @wy65701436 Do you have any questions about this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/requirement New feature or idea on top of harbor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants