| 1 | = RFC 71: Migration to GitHub = |
| 2 | |
| 3 | || Author: || Even Rouault || |
| 4 | || Contact: || even.rouault@spatialys.com || |
| 5 | || Started: || March 2018 || |
| 6 | || Status: || Development || |
| 7 | |
| 8 | == Summary == |
| 9 | |
| 10 | It is proposed that the GDAL source tree and ticket database moves from |
| 11 | the OSGeo hosted Subversion repository/Trac database to GitHub. |
| 12 | Full source code history will be preserved. To make the migration simpler, |
| 13 | existing tickets will remain in OSGeo Trac and will not be migrated to GitHub. |
| 14 | New tickets will have to be opened in GitHub. |
| 15 | |
| 16 | == Motivations == |
| 17 | |
| 18 | 1) It is considered that most developers interested by GDAL development |
| 19 | are nowadays more used to git than Subversion, and the use of Subversion |
| 20 | as the main source control management makes contributions less attractive. |
| 21 | 2) The https://github.com/OSGeo/gdal mirror has existed since 2012 and has |
| 22 | over time become the prefered way for contributors without direct SVN access |
| 23 | (or even those with SVN access) to submit their contributions, in particular |
| 24 | because of the coupling with the continuous integratations services of Travis-CI |
| 25 | and AppVeyor that enable maintainers to check that the contribution doesn't |
| 26 | introduce known regressions + the friendly way of commenting a pull request. |
| 27 | However the manual porting of GitHub pull requests to Trac is a bit painful |
| 28 | for GDAL maintainers. |
| 29 | 3) GitHub has become the de-facto hosting platform for a lot of open-source |
| 30 | projects. |
| 31 | |
| 32 | == Details of the migration == |
| 33 | |
| 34 | 0. The existing GitHub git repository will be pushed to |
| 35 | https://github.com/OSGeo/gdal_svn_mirror_backup (eventually removed once we are |
| 36 | confident further steps have not messed things up) |
| 37 | 1. As GitHub also uses the syntax "#1234" to link commit messages to its issues |
| 38 | that was also used in Trac, currently when following links in GitHub that point to a Trac |
| 39 | ticket, one ends up to a non-existing or unrelated GitHub issue/pull request. |
| 40 | So the commit messages of the current GitHub mirror will be rewritten by |
| 41 | a "git filter-branch --msg-filter 'python rewrite.py' -- --all" command to |
| 42 | replace "#1234" with "https://trac.osgeo.org/gdal/ticket/1234" |
| 43 | 2. The git 'trunk' branch will be renamed 'master' to follow git best practices |
| 44 | 3. The existing 'tag/x.y.z' branches will be replaced by proper git tags. |
| 45 | 4. This modified repository will be forced push to https://github.com/OSGeo/gdal |
| 46 | This will have the consequence of invalidating existing pull request or |
| 47 | forks of repository that will have to be rebased to the new one. |
| 48 | From that point, "svn commit" should be avoided and changes should go to the |
| 49 | git repository. |
| 50 | 5. The cron job on the OSGeo server that refreshes the website from sources |
| 51 | will be modified to pull from GitHub rather than SVN. |
| 52 | 6. Ticket creation permissions will be removed in Trac. Modification or closing of |
| 53 | existing open tickets will be still possible. From that point, if closing a |
| 54 | Trac ticket, one will have manually to reference the github commit. |
| 55 | 7. The settings of the GDAL GitHub repository will be changed allow tickets to |
| 56 | be filed. Labels and Milestones will be populated with relevant content |
| 57 | |
| 58 | Further actions required, in no particular order, and for which help from |
| 59 | other GDAL developers/contributors would be welcome: |
| 60 | |
| 61 | * Most visible Trac wiki documentation will have to be revised to point to GitHub |
| 62 | * HOWTO-RELEASE will have to be revised. |
| 63 | * Existing SVN committers still interested in the project will have to request |
| 64 | commit access to the GitHub repo. |
| 65 | * Some support from OSGeo SAC will be needed to turn the GDAL SVN repository to |
| 66 | read-only (other option would be to rename it to gdal_historical so that |
| 67 | people pulling from the old one are well aware of the migration) |
| 68 | * Some guidelines on how we intend to use git/GitHub features will have to be |
| 69 | rewritten. |
| 70 | |
| 71 | == Exit strategy == |
| 72 | |
| 73 | GitHub is a closed platform. In case it would close or would start askin to pay |
| 74 | unreasonable fees, some backup strategy of the tickets would be needed. The |
| 75 | solutions might be: |
| 76 | * https://github.com/josegonzalez/python-github-backup |
| 77 | * GitLab has an import module from GitHub. |
| 78 | Although some experimentation has been done with those, this RFC does *not* cover |
| 79 | setting up those solutions as a regular backup system. |
| 80 | |
| 81 | == Not covered by this RFC == |
| 82 | |
| 83 | * Should we migrate Trac wiki content to GitHub wiki ? |
| 84 | |
| 85 | == Previous related discussions == |
| 86 | |
| 87 | * https://lists.osgeo.org/pipermail/gdal-dev/2018-March/048240.html |
| 88 | * https://lists.osgeo.org/pipermail/gdal-dev/2017-September/047060.html |