kemakorn / support-tools

Automatically exported from code.google.com/p/support-tools
Apache License 2.0
0 stars 0 forks source link

github_issue_converter.py fails on deleted issue #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generated the Google Takeout JSON file
2. Followed the export instructions for GitHub
3. Ran github_issue_converter.py,which failed with RuntimeError: Google Code 
and GitHub issue nos mismatch at #50 (got 49)
4. Deleted some issues from project
5. Ran script again, and got the following error:

RuntimeError: Unable to find Google Code issue #150 '[deleted issue]'.
    Were issues added to GitHub since last export attempt?

The script should probably skip over deleted issues. I tried to regenerate the 
JSON Google Takeout file, but it has failed 6 consecutive times now. 

For your reference, the script is complaining about this deleted issue: 
https://code.google.com/p/gbif-providertoolkit/issues/detail?id=150

Complete output from both github_issue_converter.py runs attached. Thanks

Original issue reported on code.google.com by kyle.br...@gmail.com on 7 May 2015 at 1:58

Attachments:

GoogleCodeExporter commented 9 years ago
Yup, definitely a bug. I should be able to fix it today. Thank you for the 
report.

Original comment by chrsm...@google.com on 7 May 2015 at 3:42

GoogleCodeExporter commented 9 years ago
This should be fixed now (r47d28d8d6aa6). The exporter now keeps track of the 
last GitHub ID it created. (e.g. GitHub #149). When it tries to upload the next 
Google Code issue (e.g. Google Code #151) it creates a placeholder deleted 
issue so that the IDs will align. (e.g. GitHub #150).

If you haven't created any new GitHub issues, you ::knock on wood:: should just 
be able to sync your support-tools client and re-run the tool. It should detect 
all the existing GitHub issues and pick up where it left off.

If you run into issues please let me know.

Original comment by chrsm...@google.com on 7 May 2015 at 5:19

GoogleCodeExporter commented 9 years ago
Thank you for your quick response and for the fix. I'm happy to report the 
exporter succeeded in transferring all 1161 issues into a 'new' repository: 
https://github.com/kbraak/ipt

Unfortunately the original problem I reported isn't fixed, please let me 
explain. 

The GitHubExporter only transferred 150 out of 1161 issues, but succeeded in 
transferring all the commit history, branches, and releases into 
https://github.com/kbraak/gbif-providertoolkit

I had too many issues for the GitHubExporter to handle (I tried 7 times 
unsuccessfully), so I tried to use the issue exporter in order to populate this 
same repo with the missing issues but it failed with the error:

RuntimeError: Unable to find Google Code issue #150 '[deleted issue]'.
    Were issues added to GitHub since last export attempt?

I would have hoped the issue exporter would pick up at issue #151, recognising 
issues 1-150 have been created already even though they were created by 
GitHubExporter, not the issue exporter.

The end result, is that I now have all my code in one repo, and all my issues 
in another. Sadly there is no easy way I can find to move or copy 'all' issues 
from one GitHub repo to another. 

Can you please help me solve this? Thanks, Kyle

Original comment by kyle.br...@gmail.com on 12 May 2015 at 8:41

GoogleCodeExporter commented 9 years ago
Just to update you, I found a workaround and you can consider this issue 
closed. My workaround could benefit others that have large Google Code projects 
that had problems exporting to GitHub using the Export to GitHub tool. 
Therefore, I describe my workaround below for others: 

First I exported all my issues from Google Code to a new GitHub repo using the 
IssueExporterTool.

From the new GitHub repo (with only my exported issues), I ran GitHub's "import 
code from another repository" (see screenshot) to fetch all the code, branches 
and tags from Google Code. 

Lastly I needed to import the wiki. To do so, I ran the WikiToMarkdownTool to 
convert all my Google Code wiki pages to Markdown, and then committed these 
pages to the repo.

Original comment by kyle.br...@gmail.com on 15 May 2015 at 9:08

Attachments: