jeffwidman / bitbucket-issue-migration

A small script for migrating repo issues from Bitbucket to GitHub
GNU General Public License v3.0
316 stars 95 forks source link

Repeated failures verifying github issue import #105

Closed MattLewin closed 6 years ago

MattLewin commented 6 years ago

I'm trying to migrate my 159 issues from BB to GH. Everything is trucking along for about 90 issues, and then this happens:

Completed 97 of 159 issues
Imported Issue: https://api.github.com/repos/MattLewin/GasMaster/issues/98
Completed 98 of 159 issues
Traceback (most recent call last):
  File "migrate.py", line 690, in <module>
    sys.exit(main(options))
  File "migrate.py", line 220, in main
    status_url, options.gh_auth, headers)
  File "migrate.py", line 677, in verify_github_issue_import_finished
    .format(respo.json())
RuntimeError: Failed to import GitHub issue due to the following errors:
{'id': 1762356, 'status': 'failed', 'url': 'https://api.github.com/repos/MattLewin/GasMaster/import/issues/1762356', 'import_issues_url': 'https://api.github.com/repos/MattLewin/GasMaster/import/issues', 'repository_url': 'https://api.github.com/repos/MattLewin/GasMaster', 'created_at': '2018-06-23T09:08:10.000-04:00', 'updated_at': '2018-06-23T09:08:10.000-04:00', 'errors': [{'location': '/issue/labels[2]', 'resource': 'Label', 'field': 'name', 'value': 'released - 1.3 - docs & code consistency (initial App Store release)', 'code': 'invalid'}]}

I've gone through this process three times, and each time the migration has choked on a different in-the-90s issue. (Because GH doesn't allow issue deletion, I have to nuke and then reimport the repo each time. Can you say, "PITA?" I knew you could.)

My first thought was that I'd used a character in one of the Bitbucket fields that GitHub considers illegal. I could find no evidence of that, though. My second thought was that computers hate me. While I could find plenty of evidence of that, I just don't believe in my heart that that is the issue here.

Could it be I'm hitting a rate limiting issue on GH? I would think so, except that it I'm not seeing any of the errors migrate.py throws when it detects that issue.

Thoughts? Pointers?

jeffwidman commented 6 years ago

Afraid I have no idea... you're saying it's non-deterministic which issue it chokes on?

Try adding a sleep call to slow down the import and see if it always brings on the same one...

MattLewin commented 6 years ago

Thanks, Jeff. I'll take that advice and let you know what, if anything, I find.

MattLewin commented 6 years ago

@jeffwidman, it turns out GitHub was choking on labels longer than 50 characters. (I have rather verbose version labels.) Unfortunately, even if I shorten the version label, the old version label remains in the Bitbucket issue comments. The only way to remedy that is to nuke the issue itself. /sigh

Re the "non-deterministic" claim, yeah, that was just pilot error: I deleted some issues from BitBucket that were triggering the problem.

As far as I can tell, this was all an issue of my own. Closing this now.

jeffwidman commented 6 years ago

Perhaps it would be useful to document this limitation in this project's readme, since bitbucket allows longer and GitHub doesn't?

On Mon, Jul 2, 2018, 7:17 AM Matt Lewin notifications@github.com wrote:

@jeffwidman https://github.com/jeffwidman, it turns out GitHub was choking on labels longer than 50 characters. (I have rather verbose version labels.) Unfortunately, even if I shorten the version label, the old version label remains in the Bitbucket issue comments. The only way to remedy that is to nuke the issue itself. /sigh

Re the "non-deterministic" claim, yeah, that was just pilot error: I deleted some issues from BitBucket that were triggering the problem.

As far as I can tell, this was all an issue of my own. Closing this now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffwidman/bitbucket-issue-migration/issues/105#issuecomment-401820406, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdf8jIJ8aPWvyTDloUDNmzIbvBrZrJ1ks5uCit_gaJpZM4U0yy4 .

MattLewin commented 6 years ago

Sure. I can’t do so now, but I can when I return home.

What do you think, though, of truncating the labels at 50 characters when moving to GitHub?

On Jul 2, 2018, at 11:10 AM, Jeff Widman notifications@github.com wrote:

Perhaps it would be useful to document this limitation in this project's readme, since bitbucket allows longer and GitHub doesn't?

On Mon, Jul 2, 2018, 7:17 AM Matt Lewin notifications@github.com wrote:

@jeffwidman https://github.com/jeffwidman, it turns out GitHub was choking on labels longer than 50 characters. (I have rather verbose version labels.) Unfortunately, even if I shorten the version label, the old version label remains in the Bitbucket issue comments. The only way to remedy that is to nuke the issue itself. /sigh

Re the "non-deterministic" claim, yeah, that was just pilot error: I deleted some issues from BitBucket that were triggering the problem.

As far as I can tell, this was all an issue of my own. Closing this now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffwidman/bitbucket-issue-migration/issues/105#issuecomment-401820406, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdf8jIJ8aPWvyTDloUDNmzIbvBrZrJ1ks5uCit_gaJpZM4U0yy4 .

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

MattLewin commented 6 years ago

Jeff-

I created an issue for this proposal, and then submitted a PR implementing it. If you’d rather take a different approach, just ignore the PR, or let me know what you’d like changed.

I also picked up some already incorporated commits. Sorry about the detritus that created.

-Matt

On Jul 2, 2018, at 11:53 AM, Matt Lewin matt@lewin.us wrote:

Sure. I can’t do so now, but I can when I return home.

What do you think, though, of truncating the labels at 50 characters when moving to GitHub?

On Jul 2, 2018, at 11:10 AM, Jeff Widman <notifications@github.com mailto:notifications@github.com> wrote:

Perhaps it would be useful to document this limitation in this project's readme, since bitbucket allows longer and GitHub doesn't?

On Mon, Jul 2, 2018, 7:17 AM Matt Lewin <notifications@github.com mailto:notifications@github.com> wrote:

@jeffwidman <https://github.com/jeffwidman https://github.com/jeffwidman>, it turns out GitHub was choking on labels longer than 50 characters. (I have rather verbose version labels.) Unfortunately, even if I shorten the version label, the old version label remains in the Bitbucket issue comments. The only way to remedy that is to nuke the issue itself. /sigh

Re the "non-deterministic" claim, yeah, that was just pilot error: I deleted some issues from BitBucket that were triggering the problem.

As far as I can tell, this was all an issue of my own. Closing this now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/jeffwidman/bitbucket-issue-migration/issues/105#issuecomment-401820406 https://github.com/jeffwidman/bitbucket-issue-migration/issues/105#issuecomment-401820406>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAdf8jIJ8aPWvyTDloUDNmzIbvBrZrJ1ks5uCit_gaJpZM4U0yy4 https://github.com/notifications/unsubscribe-auth/AAdf8jIJ8aPWvyTDloUDNmzIbvBrZrJ1ks5uCit_gaJpZM4U0yy4> .

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jeffwidman/bitbucket-issue-migration/issues/105#issuecomment-401837592, or mute the thread https://github.com/notifications/unsubscribe-auth/AGwZwQVRCuNbBifVnSns_uSbNLT7sZS6ks5uCjfTgaJpZM4U0yy4.