gotsunami / gitlab-copy

Batch copy issues between GitLab instances, with some cool features
MIT License
128 stars 20 forks source link

panic: runtime error: invalid memory address during copy #36

Closed alexxcons closed 6 years ago

alexxcons commented 6 years ago

Compiled master from source to have support for API v4 Testrun was fine, but with -y I got the following runtime error:

Any help would be welcome !

schwinn@belpc077:~/git/src/github.com/gotsunami/gitlab-copy/bin$ ./gitlab-copy -y gitlab.yml
source: aschwinn/silecs at https://gitlab.cern.ch/api/v4
target: al.schwinn/silecs at https://gitlab.com/api/v4
--
source: finding issues ... OK
source: 46 issues (26 opened, 20 closed)
source: 3 milestone(s): 3.0.0, 2.1.2, 2.1.0
source: 7 label(s): mergeWithCERN, silecs-cli-client, silecs-codegen, silecs-communication-cpp, silecs-diagnostic-cpp, silecs-model, virtual-controller
source: 237 notes                                                  
--
Copying labels ...
Copying issues ...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x729b45]

goroutine 1 [running]:
main.(*migration).migrateIssue(0xc4200892f0, 0x1, 0x866901, 0xc42022d560)
    /home/schwinn/git/src/github.com/gotsunami/gitlab-copy/cmd/gitlab-copy/migration.go:138 +0x3c5
main.(*migration).migrate(0xc4200892f0, 0x1, 0x1)
    /home/schwinn/git/src/github.com/gotsunami/gitlab-copy/cmd/gitlab-copy/migration.go:375 +0xf22
main.main()
    /home/schwinn/git/src/github.com/gotsunami/gitlab-copy/cmd/gitlab-copy/main.go:156 +0x933
alexxcons commented 6 years ago

Just took another try 0.7-rc2, but same result.

Labels got copied successfully, but there are no issues or milestones in the target repo. Here my "gitlab.yml":

from:
  url: https://gitlab.cern.ch
  token: <removed>
  project: aschwinn/silecs
to:
  url: https://gitlab.com
  token: <removed>
  project: al.schwinn/silecs
aboutofpluto commented 6 years ago

Hi Alex, We'll have a look as soon as possible.

matm commented 6 years ago

Thanks for reporting @alexxcons. I take it.

matm commented 6 years ago

Hi @alexxcons, please pull from master and try again. Now it works. Thank you.

This patch will be part of the upcoming RC3.

Thanks for reporting!

alexxcons commented 6 years ago

This was quick, thanks alot ! I will have a try for it next week, currently I cannot test it.

alexxcons commented 6 years ago

Thanks again, master runs almost fine now, just seems to have some remaining trouble with closing bugs ... but already did a great job for me!! Opened another issue for it: https://github.com/gotsunami/gitlab-copy/issues/38