Skip to content
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

Migrate ULB and UDB Issues #197

Closed
jag3773 opened this issue Jun 14, 2017 · 13 comments
Closed

Migrate ULB and UDB Issues #197

jag3773 opened this issue Jun 14, 2017 · 13 comments
Assignees

Comments

@jag3773
Copy link
Contributor

jag3773 commented Jun 14, 2017

We need to migrate the ULB and UDB source repositories from Github to DCS.

Locations

The key here is that we want to migrate the issues. I setup a DCS migration for the ULB which worked fine, but we need to get the issues migrated.

Relevant upstream issue is closed, gogs/gogs#809, but it doesn't look like it has been implemented.

Possibly https://github.com/mruschmann/migrate-gitlab-gogs could be modified to read from Github and push over into DCS?

@jag3773
Copy link
Contributor Author

jag3773 commented Jun 14, 2017

@ethantkoenig Let me know what your thoughts are on this. We will need to schedule the actual migration time so that the content team can pause work on Github and shift over to DCS. In the meantime any work we can do upfront to make that migration window small would be great.

@ethantkoenig
Copy link
Contributor

ethantkoenig commented Jun 14, 2017

@jag3773 Probably a just writing our own Python script would be easiest; we're basically just need to make calls to the Github API and our DCS/gitea API.

A few questions:

  • Which of the following must be preserved during migrations?
    • labels
    • comments
    • assignees
      • EDIT: if assignees should be preserved, how to figure out which DCS user corresponds to the assigned Github user for a issue? Should I assume that the user has the same username on Github and DCS? Same email on Github and DCS?
    • milestones
  • Will the repos have already been created on DCS before we migrate issues? If not, then whoever runs this script will need all of the credentials so that the repos will belong to the correct user(s).

@ChrisJarka
Copy link

@neutrinog - I believe that there is a resounding YES to these -

Which of the following must be preserved during migrations?

  • labels
  • comments
  • assignees
  • milestones

@pohlig
Copy link

pohlig commented Jun 15, 2017

I agree with Chris; we want all those things if it can possibly be done.
Thanks

@jag3773
Copy link
Contributor Author

jag3773 commented Jun 15, 2017

@ethantkoenig Yes, we want that information. I've created both repos as listed in the OP. This task is strictly for migrating the Issues.

There are no milestones in either of the source repositories.

For users, can you please create a mapping? Most of the usernames are probably similar, but if there are any that you can't find a match for, post them here and we will get you a match.

@jag3773
Copy link
Contributor Author

jag3773 commented Jun 22, 2017

@ethantkoenig How is this coming? When do you expect to have a script functional? We are moving from Github to DCS on Friday. The issues can transfer later if you're not ready yet.

@ethantkoenig
Copy link
Contributor

@jag3773 I've haven't been able to spend much time on this yet, I should be able to make more progress sometime this week or weekend.

@jag3773 jag3773 changed the title Migrate ULB and UDB Migrate ULB and UDB Issues Jun 22, 2017
@jag3773
Copy link
Contributor Author

jag3773 commented Jun 22, 2017

@ethantkoenig Just FYI that I disabled the Issue queues in DCS so that no one manually creates issues in those repos. The hope is that when you copy the issues over from Github they will have the same issue number in DCS, which should preserve any relationships based on issue numbers.

Once you have the script ready, make sure to enable the Issue trackers in DCS before you run it.

@ethantkoenig
Copy link
Contributor

@jag3773 A few questions:

  1. Unless the runner of the script has everyone's DCS credentials, we won't be able to preserve who created issues (i.e. unless I have user X's DCS credentials, I cannot create a DCS issue that will be attributed to user X). The best we can do is to prepend userXYZ open this issue at <timestamp>: to each issue description (and something similar for comments). It this acceptable?
  2. Can I assume label names are the same in Github and DCS. If not, how do I associate Github labels with their DCS counterparts?
  3. What if there is a Github label for which a DCS counterpart does not exist? I cannot create a label for a DCS repo unless I have write-access to that repo. (This could be solved if the script is run with admin credentials instead of mine).

@jag3773
Copy link
Contributor Author

jag3773 commented Jun 23, 2017

  1. That's ok, prepend the statement as you suggested.

2-3. I'll give you write access to the repo. They are brand new so all the labels will need created.

@ethantkoenig
Copy link
Contributor

ethantkoenig commented Jun 24, 2017

There is a bug in the API for adding labels to issues. I've made a fix (go-gitea/gitea#2048), but unfortunately I won't be able to run my script until the fix makes it way to our DCS instance. We should make sure this fix is a part of the #203 release.

@ethantkoenig
Copy link
Contributor

@jag3773 Also, do any of the Github repos have pull-requests? If so, should I create dummy issues so that issue numbers are preserved?

@jag3773
Copy link
Contributor Author

jag3773 commented Jun 24, 2017

Good point, yes, they both have prs and dummy issues are a great idea.

@jag3773 jag3773 closed this as completed Jul 12, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants