-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
gitlab migrate mergerequests+issues fail #13884
Comments
This is rather unusual, does that mean Gitlab doesn't maintain that issues and PRs must have unique numbers? Edit: How would comments that reference an issue that has a a PR with the same ID index? |
@techknowlogick as far as I can tell, in GitLab issues and merge requests are completely separate, so they can easily have "clashing" IDs because they never share data (different tables in the DB I'm guessing). This is in contrast with GitHub which seems to make PRs and Issues the same thing. |
So we may have to change the id |
We would need ensure that we modify comments/issues that link to PR use updated ID |
Reproduced this. Slightly different log but same meaning. Running on Docker with version v1.15.7 with Postgres.
Repository used for this: https://gitlab.com/EchidnaHQ/Echidna |
Don't forget about MR and issue references in Git commits. Of course we can't change them, because it will cause the commit to lose its original hash and and thus making commit references in other commits problematic and it will unsign the signed commits, which is not nice because that's the only way to verify that a commit actually came from its author and not people spoofing the git author email and username. We will have to somehow keep references to the original GitLab issue or MR's ID and make a link for any references to them in Git commits. Perhaps display the original ID as well in the MR/issue page so that noone get confused. |
Reproduced on Docker running version v1.16.0+dev-692-gf58e687a8 with Postgres. Repository: https://gitlab.com/troyengel/archbuild
|
This comment has been minimized.
This comment has been minimized.
This is still a major issue when migrating from GitLab. I had to drop all merge requests to avoid this error and successfully import my repositories. |
This issue is fixed in Forgejo 1.21.2+0. |
I mean, this isn't forgejo, but yes, if it is fixed there, it most likely will be here too. |
@delvh as far as I am aware, this is not fixed in Gitea yet: I submitted the corresponding pull requests to Forgejo, and I don't think they got cherry-picked by Gitea. So I would keep this issue open. |
Can you link to the fix in forgejo? Anyway, I suppose if this is to be fixed then
This could be hardcoded but making it per-project configuration sounds more reasonable. |
The fix is here: https://codeberg.org/forgejo/forgejo/pulls/1790 |
Can you send a PR to Gitea too? |
That change doesn't seem ideal. For example, the |
…om GitLab (#28616) (#28618) Backport #28616 by wxiaoguang Fix #13884 Co-authored-by: wxiaoguang <[email protected]>
It's not ideal indeed. It's very explicit about inability to migrate more issues once any PRs are migrated. In particular mirroring a repository cannot work this way. Also it is not clear to me how the !1 reference to a PR in the commit message would be resolved with this solution. |
…om GitLab (go-gitea#28616) (go-gitea#28618) Backport go-gitea#28616 by wxiaoguang Fix go-gitea#13884 Co-authored-by: wxiaoguang <[email protected]> (cherry picked from commit bf98373)
gitea version: v1.13.0 - master
error message:
Migrate repository from https://gitlab.com/troyengel/archbuild failed: Error 1062: Duplicate entry '284-2' for key 'UQE_issue_repo_index'
to reporduce:
if you only migrate one of them it works. so the problem is related to the workaround for new pull indexes
The text was updated successfully, but these errors were encountered: