-
-
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
[Fix] Account Linking UpdateMigrationsByType #31428
Conversation
0a7bce1
to
0fd6466
Compare
0fd6466
to
7a7b458
Compare
Sorry but IMO it is not likely a complete fix.
IIRC, when using OAuth, the "UserID" can be any string, it doesn't need to be a number. So the root problem is that OAuth UserID shouldn't be used as original_author_id directly. |
I would suggest to do this, either:
|
Thank you for trying the "complete" fix, but it would be very complex and difficult.
Hmm, I see the related code, will review again. To fix the problem quickly, I think the "simple fix" could be good enough, only a few lines. |
I had tried adding ParseInt64 check but it didn't solve the purpose. need to make changes to a few more places will push after testing those |
I checkout the code, and I can see that there are still a lot of "OriginalAuthorID int64" in code ..... it is really a hard task .... To make it consistency, we should also make the default value to empty string
Why it doesn't resolve? I guess this should work?
|
Yes this should work, but it will prevent update operations from being performed, this is also an issue right will try to update all relevant code for utilizing string |
We could just leave a comment:
It would take a lot of time, if you really would like to try (and thank you for the brave!), the migration should refer to something like |
This reverts commit 8547ab5.
ps: (the last suggestion for the "choice" 😁 ) I would still suggest to have a quick/simple fix first since it is right to ignore non-numeric external IDs for the "update migration type" .... the complete fix indeed seems good but it is really difficult to implement&review ..... if it introduces regressions then it would need more time to follow up .... |
lets go with simple fix for now, have reverted other code |
* giteaofficial/main: Fix the link for .git-blame-ignore-revs bypass (go-gitea#31432) Bump htmx to 2.0.0 (go-gitea#31413) Fix the wrong line number in the diff view page when expanded twice. (go-gitea#31431) Fix labels and projects menu overflow on issue page (go-gitea#31435) [Fix] Account Linking UpdateMigrationsByType (go-gitea#31428)
* origin/main: (21 commits) Fix deprecated Dockerfile ENV format (go-gitea#31450) README Badge maintenance (go-gitea#31441) Improve markdown textarea for indentation and lists (go-gitea#31406) Split common-global.js into separate files (go-gitea#31438) Fix the link for .git-blame-ignore-revs bypass (go-gitea#31432) Bump htmx to 2.0.0 (go-gitea#31413) Fix the wrong line number in the diff view page when expanded twice. (go-gitea#31431) Fix labels and projects menu overflow on issue page (go-gitea#31435) [Fix] Account Linking UpdateMigrationsByType (go-gitea#31428) Fix markdown math brackets render problem (go-gitea#31420) Reduce `air` verbosity (go-gitea#31417) Fix new issue/pr avatar (go-gitea#31419) Increase max length of org team names from 30 to 255 characters (go-gitea#31410) [skip ci] Updated translations via Crowdin Refactor names (go-gitea#31405) Update JS dependencies, remove `eslint-plugin-jquery` (go-gitea#31402) Switch to upstream of `gorilla/feeds` (go-gitea#31400) Fix rendered wiki page link (go-gitea#31398) Refactor repo unit "disabled" check (go-gitea#31389) Refactor route path normalization (go-gitea#31381) ...
Changes
Related to: #31427