|
| 1 | +PEP: 581 |
| 2 | +Title: Using GitHub Issues for CPython |
| 3 | +Version: $Revision$ |
| 4 | +Last-Modified: $Date$ |
| 5 | +Author: Mariatta Wijaya < [email protected]> |
| 6 | +Discussions-To: ``#pep581`` stream in zulip |
| 7 | +Status: Draft |
| 8 | +Type: Process |
| 9 | +Content-Type: text/x-rst |
| 10 | +Created: 20-Jun-2018 |
| 11 | + |
| 12 | + |
| 13 | +Abstract |
| 14 | +======== |
| 15 | + |
| 16 | +This PEP outlines the steps required to migrate Python's issue tracker |
| 17 | +from Roundup to using GitHub Issues. |
| 18 | + |
| 19 | + |
| 20 | +Rationale |
| 21 | +========= |
| 22 | + |
| 23 | +CPython's development moved to GitHub on February 2017. All other projects within |
| 24 | +The PSF's organization are hosted on GitHub and are using GitHub issues. |
| 25 | +CPython is still using Roundup as the issue tracker in bugs.python.org (bpo) [1]_. |
| 26 | + |
| 27 | +Why GitHub |
| 28 | +---------- |
| 29 | + |
| 30 | +GitHub has a lot of nice features readily available out of the box, that are not |
| 31 | +currently available in Roundup / bpo. |
| 32 | + |
| 33 | +- APIs we can use to build integrations and automations. There are various existing |
| 34 | + integrations and applications available from GitHub Marketplace to help with |
| 35 | + our workflow. New applications are easily installed and enabled. In addition, |
| 36 | + we've had great success with building our own GitHub bots, like miss-islington [14]_, |
| 37 | + bedevere [15]_, and the-knights-who-say-ni [16]_. |
| 38 | + |
| 39 | +- Ability to embed/drag and drop screenshots, debug log files into GitHub pull |
| 40 | + requests and issues. |
| 41 | + |
| 42 | +- Administrators and core developers can edit issues comments and pull requests. |
| 43 | + |
| 44 | +- Ability to reply to issues and pull request conversations via email. |
| 45 | + |
| 46 | +- It supports two factor authentication. |
| 47 | + |
| 48 | +- It supports markdown and emoji. |
| 49 | + |
| 50 | +- It has a preview tab, so we can see how our comment will be rendered, before |
| 51 | + actually posting. |
| 52 | + |
| 53 | +- It supports voting (reactions). |
| 54 | + |
| 55 | +- It supports permalink [2]_, allowing us to quote and copy paste |
| 56 | + source code easily. |
| 57 | + |
| 58 | +- Core developers don't have to maintain the issue infrastructure/site, giving |
| 59 | + us more time to focus on the development of Python. |
| 60 | + |
| 61 | +- We can automatically close issues when a PR has been merged [3]_. |
| 62 | + |
| 63 | +- Lowers the barrier to contribution. With more than 28 million users, an open |
| 64 | + source contributor is more likely to already have an account, and familiar |
| 65 | + with GitHub interface, making it easier to start contributing. |
| 66 | + |
| 67 | +- Email notifications contain metadata [4]_, integrated with GMail, and |
| 68 | + allows you to systematically filter emails. |
| 69 | + |
| 70 | +- Provides additional privacy such as offering the user a choice to hide an |
| 71 | + email address yet still allow communication with the user through @-mentions. |
| 72 | + |
| 73 | +Issues with bpo / Roundup |
| 74 | +------------------------- |
| 75 | + |
| 76 | +- Less than five people maintain bpo. Some of them are core developers. |
| 77 | + |
| 78 | +- It is in Mercurial. Without any CI available, it puts heavy burden on existing |
| 79 | + (few) maintainers in terms of reviewing, testing, and applying patches. |
| 80 | + |
| 81 | +- At its current state, it is not equipped to accept lots of contributions from |
| 82 | + people who aren't already familiar with the code base. |
| 83 | + |
| 84 | +- The upstream Roundup is in Mercurial. There is an open discussion about |
| 85 | + moving the source code of bpo to GitHub [5]_. If the source code of |
| 86 | + bpo does move to GitHub, it will become difficult to update patches from |
| 87 | + upstream. But as long as it is in Mercurial, it is be difficult to maintain |
| 88 | + and onboard new contributors. |
| 89 | + |
| 90 | +- The user interface needs update and redesign. It will require UX/UI research |
| 91 | + to keep it up to date with current web standards, including accessibility. |
| 92 | + |
| 93 | +- Email address is exposed. There is no choice to mask it. |
| 94 | + |
| 95 | +- There is no REST API available. There is an open issue in Roundup for adding |
| 96 | + REST API [6]_. Last activity was in 2016. |
| 97 | + |
| 98 | +- It sends a number of unnecessary emails and notifications, and it is difficult, |
| 99 | + if not impossible, to configure. An example is the nosy email, where we get |
| 100 | + email notification whenever someone added themselves as "nosy". |
| 101 | + An issue has been filed in upstream Roundup about this since 2012 with |
| 102 | + little traction [7]_. |
| 103 | + |
| 104 | +- Creating an account has been a hassle. We've had reports when people have |
| 105 | + trouble creating accounts or logging in. |
| 106 | + |
| 107 | +Why not GitLab |
| 108 | +-------------- |
| 109 | + |
| 110 | +Had we migrated to GitLab instead of GitHub in 2017, this PEP would have been |
| 111 | +titled "Using GitLab Issues for CPython". |
| 112 | + |
| 113 | +Why not other issue tracker |
| 114 | +--------------------------- |
| 115 | + |
| 116 | +Using another issue tracker will require yet another learning curve, of having |
| 117 | +to learn and get used to a different interface. We'll also need to learn and |
| 118 | +figure out how to build the integrations with GitHub. |
| 119 | + |
| 120 | +By using GitHub issues, where the CPython source code is currently hosted, where |
| 121 | +pull requests are taking place, we'll be providing consistent experience to |
| 122 | +contributors and maintainers, and not having to jump from one interface to another. |
| 123 | + |
| 124 | +Why not focus on improving Roundup / bpo |
| 125 | +---------------------------------------- |
| 126 | + |
| 127 | +GitHub has many features we like that are already available. We still need to |
| 128 | +build out additional integrations and update our bots, but this is something |
| 129 | +we already know how to do. |
| 130 | + |
| 131 | +In order to really improve Roundup / bpo, it needs to first migrate to GitHub, |
| 132 | +add CI and bots. As I understand it, there is hesitation because upstream Roundup |
| 133 | +is still in Mercurial. Someone more familiar with Roundup / bpo needs |
| 134 | +to champion this effort. (I'm not volunteering, I'm sorry). |
| 135 | + |
| 136 | +I believe the effort of creating and maintaining GitHub integrations and bots |
| 137 | +is much less than the effort needed to get Roundup up to speed and then to continue |
| 138 | +maintaining it. |
| 139 | + |
| 140 | + |
| 141 | +Migration Plan |
| 142 | +============== |
| 143 | + |
| 144 | +Backup of GitHub data |
| 145 | +--------------------- |
| 146 | + |
| 147 | +This effort has been started and being tracked as an issue in core-workflow |
| 148 | +[8]_. We're using GitHub Migrations API [9]_ |
| 149 | +to download GitHub data for CPython on daily basis. The archives will be |
| 150 | +dropped in an S3 bucket. |
| 151 | + |
| 152 | +Thanks to Ernest W. Durbin III for working on this. |
| 153 | + |
| 154 | +Update the CLA host |
| 155 | +------------------- |
| 156 | + |
| 157 | +At the moment the CLA is hosted within bpo. It needs to be updated such that |
| 158 | +signing the CLA does not require a bpo account, and it should be hosted outside |
| 159 | +of the bpo. |
| 160 | + |
| 161 | +The current CLA process itself is not ideal. Currently contributors to |
| 162 | +devguide, peps, and core-workflow need to sign a CLA, and it requires a bpo |
| 163 | +account. A bpo account should not be required for those projects. |
| 164 | + |
| 165 | +Currently the CLA process involves real human to manually check the records. |
| 166 | +Question: Will it be possible to completely automate the CLA process, so |
| 167 | +it does not require human intervention? |
| 168 | + |
| 169 | +Create labels for issue triage |
| 170 | +------------------------------ |
| 171 | + |
| 172 | +In bpo, we currently have the following fields for each issues: |
| 173 | + |
| 174 | +Type: behavior, crash, compile error, resource usage, security, performance, enhancement. |
| 175 | +Components: 2to3, Argument Clinic, asyncio, Build, Cross-build, ctypes, ... |
| 176 | +Priority: release blocker, deferred blocker, critical, high, normal, low |
| 177 | + |
| 178 | +We will create the corresponding labels:: |
| 179 | + |
| 180 | + type-behavior, type-crash, type-compile error, type-resource usage, ... |
| 181 | + |
| 182 | + components-2to3, components-argument clinic, components-asyncio, ... |
| 183 | + |
| 184 | + priority-release blocker, priority-deferred blocker, priority-critical, ... |
| 185 | + |
| 186 | +In addition, we'll create ``needs triage`` label. |
| 187 | + |
| 188 | +Create issue templates |
| 189 | +---------------------- |
| 190 | + |
| 191 | +We will create an issue template and add the following headers:: |
| 192 | + |
| 193 | + --- |
| 194 | + Type: behavior | crash | compile error | resource usage (choose one) |
| 195 | + Components: 2to3 | Argument Clinic | asyncio | Build | ... (can select more than one) |
| 196 | + Priority: release blocker | deferred blocker | critical | ... |
| 197 | + Needs backport to: 2.7 | 3.6 | 3.7 |
| 198 | + --- |
| 199 | + |
| 200 | +The idea is to allow the issue creator to help us triage the issue. |
| 201 | +The above values are pre-filled in the template. Issue creator will remove texts |
| 202 | +that do not apply to their issue. |
| 203 | + |
| 204 | +Based on the above headers, bedevere-bot can apply the necessary labels to the |
| 205 | +issue. If issue creator did not supply the above headers, the bot will apply |
| 206 | +``needs triage`` label. At that point it will require a core developer to |
| 207 | +properly label the issue. |
| 208 | + |
| 209 | +We can also take advantage of GitHub's multiple issue template feature. |
| 210 | + |
| 211 | +Updates to bedevere |
| 212 | +------------------- |
| 213 | + |
| 214 | +Bedevere-bot will need to be updated to recognize the issue headers described above, |
| 215 | +and apply the proper labels. |
| 216 | + |
| 217 | +Bedevere-bot can also copy over the labels to pull requests that correspond to |
| 218 | +the issue. |
| 219 | + |
| 220 | +Update the devguide |
| 221 | +------------------- |
| 222 | + |
| 223 | +Provide explanation in the devguide about new issue workflow and triage labels. |
| 224 | + |
| 225 | +Add a button in bpo to migrate the issue to GitHub |
| 226 | +-------------------------------------------------- |
| 227 | + |
| 228 | +This will require actual update to the bpo. But I believe this effort needed |
| 229 | +is much less than a complete overhaul. |
| 230 | + |
| 231 | +We will create a button in bpo, that will copy over the issue description |
| 232 | +and associated comments into a GitHub issue. |
| 233 | + |
| 234 | +We should not be moving all open issues to GitHub. Issues with little or no |
| 235 | +activity should just be closed. Issues with no decision made for years should |
| 236 | +just be closed. |
| 237 | + |
| 238 | +If a core developer is still interested in the issue, they can indicate so in |
| 239 | +the bpo issue, and later use the button to migrate it over to GitHub. |
| 240 | + |
| 241 | +Make bpo readonly |
| 242 | +----------------- |
| 243 | + |
| 244 | +This should be the final step. Once we start using GitHub issues, make bpo |
| 245 | +readonly, not shut it down. |
| 246 | +Do not accept new registrations. Do not allow comments or issues to be created. |
| 247 | + |
| 248 | + |
| 249 | +TBD and additional concerns |
| 250 | +=========================== |
| 251 | + |
| 252 | +Expert index |
| 253 | +------------ |
| 254 | + |
| 255 | +At the moment, there is a mechanism to add people in expert index automatically |
| 256 | +added to the nosy list. We need to replicate this functionality. |
| 257 | + |
| 258 | +A GitHub account should not be a requirement |
| 259 | +-------------------------------------------- |
| 260 | + |
| 261 | +Back when it was discussed about moving the CPython codebase from Mercurial |
| 262 | +to GitHub [10]_ and [11]_, it was brought up that |
| 263 | +we need to still allow uploading patches in bpo, and that a GitHub account should |
| 264 | +not be a requirement in order to contribute to Python. |
| 265 | + |
| 266 | +If bpo is made readonly, we'll need to come up with a different solution to allow |
| 267 | +folks to contribute when they don't own a GitHub account. |
| 268 | + |
| 269 | +One solution is to create a new "python-issues" mailing list, similar to |
| 270 | +[email protected] [ 12]_ mailing list, to allow people to submit their issues |
| 271 | +there. |
| 272 | + |
| 273 | +Related to this, since the migration to GitHub in 2017, I recall one case |
| 274 | +[13]_ where we had one contributor who submitted patch to Mercurial, and |
| 275 | +refused to create a GitHub account. Because of this, our bot is unable to detect |
| 276 | +whether the have signed CLA. Another person had volunteered to upload his |
| 277 | +patch to GitHub. But we still require both people to sign the CLA. |
| 278 | + |
| 279 | +That particular situation was complicated. It took up five core developers time |
| 280 | +to investigate and manually check the CLA, causing confusion. |
| 281 | + |
| 282 | +Trim off the "Components" list |
| 283 | +------------------------------ |
| 284 | + |
| 285 | +Is the current "components" list still making sense and relevant? |
| 286 | +Can we shorten the list? |
| 287 | + |
| 288 | +Priority list |
| 289 | +------------- |
| 290 | + |
| 291 | +Is the current "priority" list useful? Nick Coghlan noted that perhaps only |
| 292 | +``release blocker`` and ``deferred blocker`` are useful. |
| 293 | + |
| 294 | +Further questions and discussions |
| 295 | +--------------------------------- |
| 296 | + |
| 297 | +There is a dedicated `#pep581 <https://python.zulipchat.com/#narrow/stream/130206-pep581>`_ |
| 298 | +stream in python.zulipchat.com. |
| 299 | + |
| 300 | + |
| 301 | +Acknowledgements |
| 302 | +================ |
| 303 | + |
| 304 | +Thanks to Guido van Rossum, Brett Cannon, and Nick Coghlan who were consulted |
| 305 | +in the early stage and research of this PEP. Their feedback, concerns, input, |
| 306 | +and ideas have been valuable. |
| 307 | + |
| 308 | + |
| 309 | +References |
| 310 | +========== |
| 311 | + |
| 312 | +.. [1] bugs.python.org |
| 313 | + (https://bugs.python.org/) |
| 314 | +
|
| 315 | +.. [2] Getting permanent links to files |
| 316 | + https://help.github.com/articles/getting-permanent-links-to-files/ |
| 317 | +
|
| 318 | +.. [3] Closing issues using keywords |
| 319 | + (https://help.github.com/articles/closing-issues-using-keywords/) |
| 320 | +
|
| 321 | +.. [4] About GitHub email notifications |
| 322 | + (https://help.github.com/articles/about-email-notifications/) |
| 323 | +
|
| 324 | +.. [5] Consider whether or not to migrate bugs.python.org source code |
| 325 | + to GitHub repo |
| 326 | + https://github.com/python/bugs.python.org/issues/2 |
| 327 | +
|
| 328 | +.. [6] Roundup issue 2550734 Expose roundup via a RESTful interface |
| 329 | + (http://issues.roundup-tracker.org/issue2550734) |
| 330 | +
|
| 331 | +.. [7] Roundup issue 2550742 Do not send email by default when adding |
| 332 | + or removing oneself from the Nosy list |
| 333 | + (http://issues.roundup-tracker.org/issue2550742) |
| 334 | +
|
| 335 | +.. [8] Backup GitHub information |
| 336 | + (https://github.com/python/core-workflow/issues/20) |
| 337 | +
|
| 338 | +.. [9] GitHub Migrations API |
| 339 | + (https://developer.github.com/v3/migrations/orgs/) |
| 340 | +
|
| 341 | +.. [10] Python-committers email |
| 342 | + (https://mail.python.org/pipermail/python-committers/2015-December/003642.html) |
| 343 | +
|
| 344 | +.. [11] Python-committers email |
| 345 | + (https://mail.python.org/pipermail/python-committers/2015-December/003645.html) |
| 346 | +
|
| 347 | +.. [12] docs mailing list |
| 348 | + (https://mail.python.org/mailman/listinfo/docs) |
| 349 | +
|
| 350 | +.. [13] CPython GitHub Pull request 1505 |
| 351 | + (https://github.com/python/cpython/pull/1505) |
| 352 | +
|
| 353 | +.. [14] miss-islington |
| 354 | + (https://github.com/python/miss-islington) |
| 355 | +
|
| 356 | +.. [15] bedevere |
| 357 | + (https://github.com/python/bedevere) |
| 358 | +
|
| 359 | +.. [16] the-knights-who-say-ni |
| 360 | + (https://github.com/python/the-knights-who-say-ni) |
| 361 | +
|
| 362 | +
|
| 363 | +Copyright |
| 364 | +========= |
| 365 | + |
| 366 | +This document has been placed in the public domain. |
| 367 | + |
| 368 | + |
| 369 | + |
| 370 | +.. |
| 371 | + Local Variables: |
| 372 | + mode: indented-text |
| 373 | + indent-tabs-mode: nil |
| 374 | + sentence-end-double-space: t |
| 375 | + fill-column: 70 |
| 376 | + coding: utf-8 |
| 377 | + End: |
0 commit comments