-
-
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
Handle the error of a missing blob object fix #19530 #19552
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.
the error message is lacking in sufficient detail to investigate the problem further. Please add more context.
Oh, one more thing, the returned |
@zeripath I edited on this PR directly, now it should be nearly perfect. |
@zeripath Need your approval. |
Codecov Report
@@ Coverage Diff @@
## main #19552 +/- ##
=======================================
Coverage ? 47.39%
=======================================
Files ? 952
Lines ? 132660
Branches ? 0
=======================================
Hits ? 62878
Misses ? 62202
Partials ? 7580
Continue to review full report at Codecov.
|
* giteaofficial/main: Fix some slice problems (incorrect slice length) (go-gitea#19592) Fix sending empty notifications (go-gitea#19589) Handle the error of a missing blob object fix go-gitea#19530 (go-gitea#19552) Remove legacy `+build:` constraint (go-gitea#19582) Federation: return useful statistic information for nodeinfo (go-gitea#19561) Upgrade required git version to 2.0 (go-gitea#19577) add smtp password to install page (go-gitea#17564) ignore DNS error when doing migration allow/block check (go-gitea#19566) [skip ci] Updated translations via Crowdin Dont overwrite err with nil & rename PullCheckingFuncs to reflect there usage (go-gitea#19572) Improve UI on mobile (go-gitea#19546) Add API to check if team has repo access (go-gitea#19540)
…a#19552) * Handle the error of a missing blob object * Show error in logs * as per @zeripath * Add missing error check * Add missing error check * Update compare.go * Use formal code * Update compare.go Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: 6543 <[email protected]> Co-authored-by: techknowlogick <[email protected]>
@99rgosse it seems that what we did in this PR is incorrect, the CreateCsvDiff is intended to handle nil head or nil base commit. I have tried on my side without this PR's change (remove these err checks), then for added or deleted CSV files, the code works well. But this PR's change makes the diff for added/deleted CSV files report errors (see #21184). So the question is, what's the root case of the 500 error on your side? |
Now that I see in the new PR that the "nil" blob could be handled, it should work as intended. In any case, it's now fixed from our side ! thank you |
Fixes go-gitea#21184 Regression of go-gitea#19552 Instead of using `GetBlobByPath` I use the already existing instances. We need more information from go-gitea#19530 if that error is still present.
Following bug #19530
this is a small hack to avoid a 500 Error when PR on blob objects missing : the error was not handled if it was other than a CSV Too large.
For context there is a missing blob on my repository that render a 500 Error when trying to Pull Request between two branches. Restoring the CSV File avoid the Error.
I have the feeling that has somehow something to do with https://github.com/go-gitea/gitea/blob/main/modules/git/tree_blob_nogogit.go
but I am not enough proficient with git cat-file to ensure the handle of objects.