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

Check LFS/Packages settings in dump and doctor command #23631

Merged
merged 3 commits into from Mar 23, 2023

Conversation

Zettat123
Copy link
Contributor

Close #23622

As described in the issue, disabling the LFS/Package settings will cause errors when running gitea dump or gitea doctor. We need to check the settings and the related operations should be skipped if the settings are disabled.

@sillyguodong
Copy link
Contributor

If there were already existing LFS files before LFS was disabled, do we need to pack them in when executing dump?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 22, 2023
@Zettat123
Copy link
Contributor Author

If there were already existing LFS files before LFS was disabled, do we need to pack them in when executing dump?

Yes, this is a question should be discussed. IMO, all the LFS objects should be handled properly before switching the LFS_START_SERVER setting to false. And the operator runs gitea dump also need to check the configuration file before running the command to confirm that all necessary data will be dumped.

@wxiaoguang
Copy link
Contributor

I am just curious, why not just copy the whole data directories? That would be much easier.

Maybe there might be some junk files (eg: lost reference in database), but I think storage is cheap, whole copying is the best choice in my mind.

@lunny
Copy link
Member

lunny commented Mar 22, 2023

I am just curious, why not just copy the whole data directories? That would be much easier.

Maybe there might be some junk files (eg: lost reference in database), but I think storage is cheap, whole copying is the best choice in my mind.

Because configuration allow some data don't store into /data.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 22, 2023
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Mar 22, 2023

Because configuration allow some data don't store into /data.

I know, I mean : copy whole data directories (by the config settings)


Hmm, some data are not even stored on file-system, maybe in ObjectStorage.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 22, 2023
@wolfogre wolfogre added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2023
@lunny lunny merged commit df41181 into go-gitea:main Mar 23, 2023
1 check passed
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 24, 2023
* upstream/main:
  Fix incorrect `HookEventType` of pull request review comments (go-gitea#23650)
  [skip ci] Updated translations via Crowdin
  Fix codeblocks in the cheat sheet (go-gitea#23664)
  Drop migration for ForeignReference (go-gitea#23605)
  Fix new issue/pull request btn margin when it is next to sort (go-gitea#23647)
  A tool to help to backport locales, changes source strings to fix other broken translations (go-gitea#23633)
  Fix incorrect `show-modal` and `show-panel` class (go-gitea#23660)
  Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (go-gitea#23629)
  Check LFS/Packages settings in dump and doctor command (go-gitea#23631)
  Use a general approach to show tooltip, fix temporary tooltip bug (go-gitea#23574)
  Improve workflow event triggers (go-gitea#23613)
  Improve `<SvgIcon>` to make it output `svg` node and optimize performance (go-gitea#23570)
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 24, 2023
@lunny lunny added this to the 1.20.0 milestone Mar 26, 2023
@lunny lunny added the outdated/backport/v1.19 This PR should be backported to Gitea 1.19 label Mar 26, 2023
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.19, please send one manually. 🍵

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Mar 26, 2023
Zettat123 added a commit to Zettat123/gitea that referenced this pull request Mar 27, 2023
Close go-gitea#23622

As described in the issue, disabling the LFS/Package settings will cause
errors when running `gitea dump` or `gitea doctor`. We need to check the
settings and the related operations should be skipped if the settings
are disabled.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@lunny lunny added the backport/done All backports for this PR have been created label Mar 27, 2023
@Zettat123 Zettat123 deleted the bugfix/issue-23622 branch March 27, 2023 03:46
lunny pushed a commit that referenced this pull request Mar 27, 2023
Backport #23631 
Close #23622

As described in the issue, disabling the LFS/Package settings will cause
errors when running `gitea dump` or `gitea doctor`. We need to check the
settings and the related operations should be skipped if the settings
are disabled.
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When LFS/packages are disabled, gitea dump exits with error and gitea doctor --all logs errors
7 participants