-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Limit repository size #7833
Limit repository size #7833
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7833 +/- ##
=========================================
Coverage ? 41.41%
=========================================
Files ? 479
Lines ? 63960
Branches ? 0
=========================================
Hits ? 26490
Misses ? 34019
Partials ? 3451 Continue to review full report at Codecov.
|
Nice, this will be a good function. 👍 |
This PR is near ready it just miss the tests. You can give it a try. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Is this dead? |
@oscarlofwenhamn I haevn't really time go into it to fix the few nits. I will maybe split this PR in two: display (done), and enforce (need more work). |
@sapk Fully understandable and relatable. Splitting it into two would be brilliant, that way we could get the finished functionality going and maybe someone could more easily help out on the enforce-PR to iron out the last creases without risking the finished stuff. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
@sapk ping |
@6543 I worked first on splitting up a PR related to attachement security. I will do this one when the two last part of the first are merged. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Yes stale bot I should refresh this one. 😄 |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
I rebased and cleaned this PR. It still need work and will try to finish it in the next days. |
And should we also include releases binaries? And attachments of issues/comments? |
We should split lfs size to different column before this as lfs size is calculated into size now :( |
9156e13
to
7c31cfc
Compare
Codecov Report
@@ Coverage Diff @@
## master #7833 +/- ##
==========================================
- Coverage 42.19% 41.41% -0.79%
==========================================
Files 697 479 -218
Lines 76563 63960 -12603
==========================================
- Hits 32309 26490 -5819
+ Misses 38956 34019 -4937
+ Partials 5298 3451 -1847
Continue to review full report at Codecov.
|
CI failed and conflicted. |
This comment has been minimized.
This comment has been minimized.
@sapk Hi is this one still alive? |
Ok guys, I am planning to hire a developer to get this resolved hopefully I can get enough money, I estimate about 20h max on at 50$. Whatever remains would be allocated to another fix. Here is where I am trying to get the needed money: |
Thanks @DmitryFrolovTri, I emailed you, but I will also say here I'm having trouble backing this collective, but once resolved there will be some additional funds in that bounty. cc: @kdumontnu who has supported bounties in the past who may also find this beneficial. Should this bounty be funded I will also set aside some funds for @sapk for his work on this PR so far. |
Yeah, I can probably come up with something. Just not sure about using Open Collective for bounties. I've used bountysource in the past (which I don't love...). My question is just if this doesn't hit the funding amount in OC and/or sits for years where the funds go. Once I figure that out consider me in for $250. |
@kdumontnu well I think this conversation is not for this thread :) But my plan to use them on other gitea / opencollective items there is also some admin costs which might be needed - OC keeps track of all this. |
@kdumontnu hi, seems some bank details were incorrect I fixed that. My plan (worst case) if we don't reach the goal donate back to gitea minus some processing/keeping costs |
Feel free to take over. |
Hi all, working on this here: |
@sapk please give access to your PR to contribute or add as contributor to the sapk fork so I could push to limit-repo-size branch. |
closing in favour of #21820 |
The goal of this PR is to define a repo limit size. I think org and user level restriction could come later.
TODO:
Validate LFSLFS object are not calculated in .Size repo attr so I will skip LFS checks.Screenshots:
TOFIX :
Deletion of file from UI trigger 500 when repo is over. -> TODO catch this specific error.
2019/08/16 05:23:58 ...uters/repo/editor.go:432:DeleteFilePost() [E] DeleteRepoFile: git push: remote: Gitea: new repo size is over limitation 10000 To /home/sapk/go/src/code.gitea.io/gitea/data/repositories/sapk/test.git ! [remote rejected] d9629b41f9c58da756cf806aabf5811b1ff45b50 -> master (pre-receive hook declined) error: impossible de pousser des références vers '/home/sapk/go/src/code.gitea.io/gitea/data/repositories/sapk/test.git'Creation of branch from UI trigger 500 when repo is over. -> TODO catch this specific error.
2019/08/16 05:28:42 ...uters/repo/branch.go:287:CreateBranch() [E] CreateNewBranch: Push: exit status 1 - remote: Gitea: new repo size is over limitation 10000 To /home/sapk/go/src/code.gitea.io/gitea/data/repositories/sapk/test.git ! [remote rejected] test -> test (pre-receive hook declined) error: impossible de pousser des références vers '/home/sapk/go/src/code.gitea.io/gitea/data/repositories/sapk/test.git'Related: #3658