-
-
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
Storage paths must be unique #26380
Storage paths must be unique #26380
Conversation
Signed-off-by: jolheiser <[email protected]>
Signed-off-by: jolheiser <[email protected]>
Signed-off-by: jolheiser <[email protected]>
Signed-off-by: jolheiser <[email protected]>
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 agree to make sure every path to be unique, and #26318 is not ideal. While I do not see why #26318 needs to be replaced by a single fatal message, I do not know how the "fatal" message would help end users. Imagine a real case (this example is from #26264)A user set The user's
Then What's the problem?IMO the only missing thing is to teach the poor users how to separate these files into different folders, if the files could be separated, then #26318 is good enough. ps: Every path should be unique (and they shouldn't overlap in most cases). The |
Signed-off-by: jolheiser <[email protected]>
The purpose of reverting the other PR is to avoid silent data loss. With the other PR in place, the derivation naturally fixes this noise, which is good in future (unreleased) versions, but less good in this (released) version because affected users may suddenly be missing data rather than a noisy message telling them something is wrong. It's my opinion that a noisy failure to start is better than the potential for data to be lost in a patch upgrade. (Although neither is ideal) |
Yup, see the real example #26380 (comment), if Gitea "fails" to start, then what should be done (how to "fix" the fatal)? That's the same question as #26318 . If the question can be answered, I think #26318 can be kept by a "detection" |
ps: I approved #26318/#26271 because I guess it could be a rare case for users who set |
The difference is the breaking version is silent and this one is not. I would maybe be convinced to change this to error in this version, but future versions should still likely retain fatal. I agree that mixed data isn't going to be simple to extricate, but at least affected admins should be made aware of it, not just silently start experiencing bugs. |
IMO the difference is that:
If it needs to keep 1.20 using legacy behavior, there could be a more strict change:
|
I think this PR could work well with #26318 but not without it. Maybe it should also be sent to main branch? |
Yes. The path |
So, what do we do with this PR? |
I would like to merge but not revert #26318 and if we can include other storages into the map(git storage path and etc.), that's better. |
Yes, I've canceled the revert: #26381 |
@jolheiser please fix the merge conflicts. 🍵 |
Should this be closed now that the other PR was merged? |
I think this could be replaced by #26484 |
I propose reverting #26318 in 1.20 and implementing this PR as-is, and also frontporting this enhancement for future versions.
#26318 would need to be reverted, otherwise the derivation would be "fixed" and this PR wouldn't have the intended effect.
This PR aims to help mitigate the bug being fixed by #26318 in a way that doesn't lead to silent data loss for existing users affected, while also being a valuable sanity check in the future.
/cc @go-gitea/technical-oversight-committee
Also /cc @earl-warren for the initial idea implemented here
For anyone directed here because of the log message
You'll want to follow the message and explicitly set your storage paths. Be aware that this will mean Gitea looks in new paths, so for any data that still lives in the old path, you will need to move it to the correct spot, such as repositories, LFS, attachments, etc.
Feel free to stop by any of our support avenues if you need further assistance.