-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed #31035
base: main
Are you sure you want to change the base?
Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed #31035
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CreateRepositoryNotice has two same messages, maybe it is better to adjust them
I will try to have some tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read through it, and the overall logic looks good to me. But sorry, I've been away from Gitea development for too long to comment on the details. I think I wrote down everything I knew about the problem in the linked issue when I created it.
In the tests, timeout is set to 1ms. |
…unny/gitea into lunny/cleanup_failure_creation_of_repo
Fix #28144
To make the resources will be cleanup once failed. All repository operations now follow a consistent pattern:
The adopt operation is a special case — if it fails, the repository on disk should not be deleted.