Skip to content

[Proposal] Gitea repository storage abstract #25070

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

Open
2 tasks
lunny opened this issue Jun 4, 2023 · 5 comments
Open
2 tasks

[Proposal] Gitea repository storage abstract #25070

lunny opened this issue Jun 4, 2023 · 5 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first. type/refactoring Existing code has been cleaned up. There should be no new functionality. type/summary This issue aggregates a bunch of other issues

Comments

@lunny
Copy link
Member

lunny commented Jun 4, 2023

Current status

Gitea's repositories are stored in a single directory that is configured via app.ini.

#24783 would like hot/cold storage. i.e. repo archived repository will be stored in a HDD but the hot repository will be stored in SSD

#22532 would like to store the repository in different directories with a hash

#13791 request a distributed git storages like gitaly

The problems

  • setting.Repository.RepoRootPath has been used by many places which fixed the usage to visit the repository
  • modules/git.Command has an option Dir which fixed the git command run directory

Resolution

  • First step, build an abstract level to visit repositories and avoid visit setting.Repository.RepoRootPath directly
  • Most function will accept a relative repository path
  • Refactor git.Command to visit the abstract level

Others

Some ideas are storing git repositories with repository id but not username/reponame, how to handle it?

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jun 4, 2023
@6543
Copy link
Member

6543 commented Jul 7, 2023

to have nice proxy-pattern and can switch between different git backend's ...

TODO:

  • 1. move current implementation in subpackage
  • 2. move types into own subpackage
  • 3. define an engine
  • 4. migrate to engine in steps

@6543 6543 added type/refactoring Existing code has been cleaned up. There should be no new functionality. type/summary This issue aggregates a bunch of other issues labels Jul 7, 2023
@6543
Copy link
Member

6543 commented Jul 7, 2023

this also might enable to use https://gitlab.com/gitlab-org/gitaly for us ... or split gitea int microservices ... (as one option)

@6543
Copy link
Member

6543 commented Jul 7, 2023

  • instead of individual git version checks all over the code - save capabilitis and let it report the engine

@6543
Copy link
Member

6543 commented Jun 13, 2024

Sorry somebody else might pick it up befor me ... i still intent to pick it up again if not addressed later :)

@lunny
Copy link
Member Author

lunny commented Jun 13, 2024

I think this could be replaced by #29033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first. type/refactoring Existing code has been cleaned up. There should be no new functionality. type/summary This issue aggregates a bunch of other issues
Projects
None yet
Development

No branches or pull requests

2 participants