Rework repository archive #14723

Merged
lunny merged 27 commits from lunny/archive_storage into main 2021-06-23 21:12:38 +00:00
Owner

Currently, archives of repository will be stored on git directory's sub directory named archives. These files could be split from git original data directory so that they could be provided by other facilities i.e. minio. So that they can be cached or have better visit performance.

This PR creates a new table to save repositories' archive informations and use storage module to store archives files. And also have a queue to generate the archive files to allow to store lfs and submodule files into archive.

It should also fixes the race on old archive codes and also allow multiple Gitea instances

  • Save all archives' informations into database
  • Store repository archives via modules/storage but not put them into git repository
  • Add new doctor check item to find and delete old archive directories
  • Delete all related database records and storage files

I will leave these changes in other PRs for easier review:

  • Store LFS files into the archive packages, fix #4773
  • Store submodule files into the archive packages, fix #5265
Currently, archives of repository will be stored on git directory's sub directory named `archives`. These files could be split from git original data directory so that they could be provided by other facilities i.e. minio. So that they can be cached or have better visit performance. This PR creates a new table to save repositories' archive informations and use `storage` module to store archives files. And also have a queue to generate the archive files to allow to store lfs and submodule files into archive. It should also fixes the race on old archive codes and also allow multiple Gitea instances - [x] Save all archives' informations into database - [x] Store repository archives via `modules/storage` but not put them into git repository - [x] Add new doctor check item to find and delete old archive directories - [x] Delete all related database records and storage files I will leave these changes in other PRs for easier review: - [ ] Store LFS files into the archive packages, ~~fix~~ #4773 - [ ] Store submodule files into the archive packages, ~~fix~~ #5265
KN4CK3R (Migrated from github.com) requested changes 2021-05-31 06:32:51 +00:00
KN4CK3R (Migrated from github.com) commented 2021-05-31 06:32:39 +00:00
Author
Owner

Should not be LFSMetaObject but RepoArchiver.

Should not be `LFSMetaObject` but `RepoArchiver`.
lunny reviewed 2021-05-31 07:55:59 +00:00
Author
Owner

Resolved

Resolved
6543 (Migrated from github.com) reviewed 2021-06-01 19:31:33 +00:00
6543 (Migrated from github.com) commented 2021-06-01 19:31:32 +00:00
Author
Owner
	repoArchiveSec := Cfg.Section("repo-archive")
	storageType := repoArchiveSec.Key("STORAGE_TYPE").MustString("")
	RepoArchive.Storage = getStorage("repo-archive", storageType, repoArchiveSec)
```suggestion repoArchiveSec := Cfg.Section("repo-archive") storageType := repoArchiveSec.Key("STORAGE_TYPE").MustString("") RepoArchive.Storage = getStorage("repo-archive", storageType, repoArchiveSec) ```
6543 (Migrated from github.com) reviewed 2021-06-01 19:32:06 +00:00
6543 (Migrated from github.com) commented 2021-06-01 19:32:06 +00:00
Author
Owner

we may should mention it in the docs, at least a bit in Configuration Cheat Sheet

we may should mention it in the docs, at least a bit in `Configuration Cheat Sheet`
lunny reviewed 2021-06-02 00:59:14 +00:00
Author
Owner

Docs added.

Docs added.
6543 (Migrated from github.com) approved these changes 2021-06-02 03:14:50 +00:00
6543 (Migrated from github.com) approved these changes 2021-06-14 13:58:16 +00:00
zeripath approved these changes 2021-06-23 20:23:34 +00:00
This repo is archived. You cannot comment on pull requests.
No Milestone
No project
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#14723
No description provided.