-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Disallow duplicate storage paths #26484
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.
Wait, we haven't merged this PR yet?
I was unable to create a backport for 1.21. @lunny, please send one manually. 🍵
|
Since it's not a bug, I will not send backport to 1.21. |
|
I would strongly suggest to revert this PR, if you really would like to check, you could check it in the "self check" page. If you'd like to show "fatal" message, I think you should only do it if the directory is empty (say, an empty instance) |
Or maybe we can use a warning instead of fatal here? |
@wxiaoguang the problem I can see with that is that this misconfiguration can have dire consequences: In this case, I'd say the negative outcomes of allowing this bug to "silently" occur far outweigh the negative outcomes of giving new instance admins a fatal error to notice they need to fix it when updating. |
Suppose I am an unlucky user:
1. I misconfigured my storage
2. I have data in the storage
3. I updated to a new Gitea
4. Then gitea shows the fatal message and won't start
5. My team are waiting for the git server to work
Now, what's your suggestion about what I should do next?
delvh ***@***.***>
… @wxiaoguang <https://github.com/wxiaoguang> the problem I can see with
that is that this misconfiguration can have dire consequences:
It can lead to end user data being irreversibly corrupted without knowing
why.
I don't think it is right that Gitea lets users shoot themselves in the
foot.
If it is only a warning for something this critical, it might be missed
for a long time leading to more corrupted data.
In this case, I'd say the negative outcomes of allowing this bug to
"silently" occur far outweigh the negative outcomes of giving new instance
admins a fatal error to notice they need to fix it when updating.
As such, I'm in favor of keeping the fatal over a warning.
If the bug had a reversible effect, I'd agree with you
|
I know, it is not the nicest option, but as I said, allowing broken Giteas only leads to more problems down the line instead of once when updating. |
Additionally, as I just noticed, there is an easy workaround that does not lose any data: |
The root issue is # #26264 : incorrect config removes user files. About the proposals for "helping unlucky users to fix the problem":
IIRC that's the same conclusion as the old discussion in discord and #26380 (comment) :
Beside the documentation problem, there are more problems in this PR (why I suggested to revert, or improve):
|
By using a docker image, you will see
So, WorkPath is CustomPath in docker. But why the nightly doesn't fail? Because the code |
Yep, you've got a point there. |
* giteaofficial/main: (38 commits) Document how the TOC election process works (go-gitea#29135) Runner tokens are multi use (go-gitea#29153) Fix Gitpod logic of setting ROOT_URL (go-gitea#29162) Remove jQuery from the user search form in admin page (go-gitea#29151) Dont load Review if Comment is CommentTypeReviewRequest (go-gitea#28551) Show `View at this point in history` for every commit (go-gitea#29122) [skip ci] Updated translations via Crowdin Add merge style `fast-forward-only` (go-gitea#28954) Use Markdown alert syntax for notes in README (go-gitea#29150) Refactor issue template parsing and fix API endpoint (go-gitea#29069) [skip ci] Updated translations via Crowdin Update some translations and fix markdown formatting (go-gitea#29099) Show more settings for empty repositories (go-gitea#29130) Update JS and PY dependencies (go-gitea#29127) Add alert blocks in markdown (go-gitea#29121) Remove obsolete border-radius on comment content (go-gitea#29128) Make blockquote border size less aggressive (go-gitea#29124) Drop "@" from email sender to avoid spam filters (go-gitea#29109) [skip ci] Updated translations via Crowdin Disallow duplicate storage paths (go-gitea#26484) ...
This reverts commit 92fda9c.
Automatically locked because of our CONTRIBUTING guidelines |
Replace #26380