Comments (11)
I encountered this issue today attempting to migrate CherryPy with a missing issue.
from bitbucket-issue-migration.
This is a legit problem--example: https://bitbucket.org/zzzeek/sqlalchemy/issues/2479
from bitbucket-issue-migration.
Added a test to catch this in 0dc1824
from bitbucket-issue-migration.
As noted in #70 (comment), can't just use track the offset here for fix_links()
because of the following scenario:
- issue 1 created
- issue 2 created
- issue 3 created, and then issue 1 edited to include a reference to issue 3.
- issue 2 deleted.
If I just track an offset, when the link in issue 1 to issue 3 is converted, the way the script is currently written means it won't be aware of the offset created by issue 2 being deleted. Could do a mapping, but that feels a bit overblown.
So probably the most pragmatic solution is still to insert blank placeholder issue.
from bitbucket-issue-migration.
I just wanted to point out that it's possible for issues to be non-contiguous even if no issues were deleted; for example, when we originally migrated from Launchpad to BitBucket, we kept the Launchpad bug numbers for everything. Since Launchpad bug numbers are global (a single bug can be associated with multiple projects), our bug numbers start at a high number (#433605), and have lots and lots of holes (latest issue is #1228543).
from bitbucket-issue-migration.
@mithrandi thanks, I was ignorant of that--definitely affects the proposed solution here. Likely I'll need to instead just make the link converter function optional, so that it can be disabled for these scenarios.
Did Bitbucket support specifying the issue ID when you imported over from Launchpad?
from bitbucket-issue-migration.
It's been a while since we did the migration to BitBucket (and I can't find the script we wrote to do it), but I believe it was done by preparing the data in a suitable format for the Import/Export feature, documented here. I don't think you can create an issue through the API with an arbitrary issue ID, but you can specify it in the import data.
By the looks of things, the GitHub issues import API does not support this, and creating hundreds of thousands of placeholder issues is obviously not a great idea. Perhaps they would add it if we ask nicely? On the other hand, at least in our particular case, we probably don't care too much about keeping the issue IDs, we mainly did it in the LP→BB migration because we could, not because it was important. (If it wasn't clear, we're looking to migrate from BB→GH now).
from bitbucket-issue-migration.
Aha, found it the script: https://bitbucket.org/jonathanj/lp2bb
from bitbucket-issue-migration.
@mithrandi the GitHub issue import API uses a task queue to process/import tasks, they're not immediately created. So I doubt they'd add support for specifying IDs, as it'd likely require changing their whole infrastructure underlying issue importing.
Given the wide range of holes for issue IDs from Launchpad, sounds like actually best to create a mapping of issue IDs in BB to expected ID in GitHub. This mapping should also account for existing issues in the GH destination repo (#70). Then run the import (and hope that nobody files a new issue during the import process... probably add a note to the docs encouraging folks who really care to start with blank repo, and only migrate the code if the issues migrate successfully, otherwise to redo the issue import).
This will require fetching all issues & issue comments from BB before starting to import anything into GitHub so that they can all be processed in one go once the mapping is finished. Currently comments are fetched as an issue is imported.
Also could make fix_links()
controlled by an optional flag on teh command line, defaulting to enabled, but that way people disable if desired. Personally, I think it's extremely convenient to run fix_links()
for updating crosslinks between issues.
from bitbucket-issue-migration.
You should probably include the original BB ID somewhere in the migrated issue at least, since this may appear elsewhere (eg. in VCS commits that were migrated).
from bitbucket-issue-migration.
@jaraco Thanks for your work on filling gaps, work beautifully :)
from bitbucket-issue-migration.
Related Issues (20)
- Support for attachments? HOT 12
- Repeated failures verifying github issue import HOT 6
- Proposal: Truncate all labels to 50 characters HOT 1
- dry-run crashes in milestone code HOT 1
- shorter/prettier style for gh issues HOT 5
- Doesn't work for private Github repos HOT 3
- Cannot install dependencies because venv tool deprecated. HOT 1
- KeyError assuming "username" key HOT 3
- Failed to POST due to unexpected HTTP status code: 410 HOT 2
- Import crashes due to name clash between default labels and imported labels HOT 1
- Github rejects comments where the body is just a newline
- Creates invalid BitBucket user links for users without username HOT 2
- Read user mapping from file HOT 1
- Properly attribute comments to users HOT 3
- Permission denied if issues are private HOT 3
- Support bitbucket priorities
- Does not support images within issue comments
- No such file or directory: '' HOT 3
- Older issues that reference newer issues don't automatically link
- Create new filee HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitbucket-issue-migration.