python-peps/pep-0581.rst

399 lines
14 KiB
ReStructuredText
Raw Normal View History

PEP: 581
Title: Using GitHub Issues for CPython
Version: $Revision$
Last-Modified: $Date$
Author: Mariatta Wijaya <mariatta@python.org>
2018-08-15 15:20:47 -04:00
Discussions-To: ``#pep581`` stream in Zulip
Status: Draft
Type: Process
Content-Type: text/x-rst
Created: 20-Jun-2018
Abstract
========
This PEP outlines the steps required to migrate Python's issue tracker
2018-08-15 15:20:47 -04:00
from Roundup to GitHub issues.
Rationale
=========
2018-08-15 15:20:47 -04:00
CPython's development moved to GitHub on February 2017. All other projects
within the PSF's organization are hosted on GitHub and are using GitHub issues.
CPython is still using Roundup as the issue tracker on bugs.python.org (bpo) [#]_.
Why GitHub
----------
2018-08-15 15:20:47 -04:00
GitHub has a lot of nice features, readily available out of the box, that are
not currently available on Roundup / bpo.
2018-08-15 15:20:47 -04:00
- APIs that can be used to build integrations and automations. There are various
existing integrations and applications available from GitHub Marketplace to
help with the workflow. New applications are easily installed and enabled.
In addition, we've had great success with building our own GitHub bots, like
miss-islington [#]_, bedevere [#]_, and the-knights-who-say-ni [#]_.
2018-08-15 15:20:47 -04:00
- Ability to embed/drag and drop screenshots and debug log files into GitHub
pull requests and issues.
2018-08-15 15:20:47 -04:00
- Administrators and core developers can edit issues, comments, and pull requests.
2018-08-15 15:20:47 -04:00
- Ability to reply to issue and pull request conversations via email.
2018-08-15 15:20:47 -04:00
- Support for two factor authentication.
2018-08-15 15:20:47 -04:00
- Support for markdown and emoji.
2018-08-15 15:20:47 -04:00
- Preview tab, showing how a comment will be rendered, prior to
actually posting.
2018-08-15 15:20:47 -04:00
- Support for voting via reactions.
- Support for permalinks [#]_, allowing easy quoting and copying & pasting of
2018-08-15 15:20:47 -04:00
source code.
- Core developers don't have to maintain the issue infrastructure/site, giving
us more time to focus on the development of Python.
- Ability to automatically close issues when a PR has been merged [#]_.
2018-08-15 15:20:47 -04:00
- Lower barrier to contribution. With more than 28 million users, an open
source contributor is more likely to already have an account and be familiar
with GitHub's interface, making it easier to start contributing.
- Email notifications containing metadata [#]_, integrated with Gmail, allowing
2018-08-15 15:20:47 -04:00
systematic filtering of emails.
2018-08-15 15:20:47 -04:00
- Additional privacy, such as offering the user a choice to hide an
email address, while still allowing communication with the user through @-mentions.
2018-08-15 15:20:47 -04:00
Issues with Roundup / bpo
-------------------------
- Less than five people maintain bpo. Some of them are core developers.
2018-08-15 15:20:47 -04:00
- It is in Mercurial. Without any CI available, it puts heavy burden on the few
existing maintainers in terms of reviewing, testing, and applying patches.
- At its current state, it is not equipped to accept lots of contributions from
people who aren't already familiar with the code base.
- The upstream Roundup is in Mercurial. There is an open discussion about
moving the source code of bpo to GitHub [#]_. If the source code of
bpo does move to GitHub, it will become difficult to update patches from
2018-08-15 15:20:47 -04:00
upstream. But as long as it is in Mercurial, it is difficult to maintain
and onboard new contributors.
- The user interface needs update and redesign. It will require UX/UI research
to keep it up to date with current web standards, including accessibility.
- Email address is exposed. There is no choice to mask it.
- There is no REST API available. There is an open issue in Roundup for adding
REST API [#]_. Last activity was in 2016.
2018-08-15 15:20:47 -04:00
- It sends a number of unnecessary emails and notifications, and it is
difficult, if not impossible, to configure. An example is the nosy email,
where email notifications are sent whenever someone adds themselves as "nosy".
An issue has been filed in upstream Roundup about this since 2012 with
little traction [#]_.
2018-08-15 15:20:47 -04:00
- Creating an account has been a hassle. There have been reports of people
having trouble creating accounts or logging in.
Why not GitLab
--------------
Had we migrated to GitLab instead of GitHub in 2017, this PEP would have been
titled "Using GitLab Issues for CPython".
2018-08-15 15:20:47 -04:00
Why not another issue tracker
-----------------------------
2018-08-15 15:20:47 -04:00
Using another issue tracker will require yet another learning curve, for having
to learn and get used to a different interface. We'll also need to learn and
figure out how to build the integrations with GitHub.
2018-08-15 15:20:47 -04:00
By using GitHub issues, where the CPython source code is currently hosted and where
pull requests are taking place, we'll be providing consistent experience to
2018-08-15 15:20:47 -04:00
contributors and maintainers, while not having to jump from one interface to another.
Why not focus on improving Roundup / bpo
----------------------------------------
GitHub has many features we like that are already available. We still need to
build out additional integrations and update our bots, but this is something
we already know how to do.
2018-08-15 15:20:47 -04:00
In order to really improve Roundup / bpo, it needs to first migrate to GitHub
and add CI and bots. As I understand it, there is hesitation because upstream
Roundup is still in Mercurial. Someone more familiar with Roundup / bpo needs
to champion this effort. (I'm not volunteering, I'm sorry).
I believe the effort of creating and maintaining GitHub integrations and bots
2018-08-15 15:20:47 -04:00
is much less than the effort needed to get Roundup up to speed and then to
continue maintaining it.
Migration Plan
==============
Backup of GitHub data
---------------------
2018-08-15 15:20:47 -04:00
This effort has been started and is being tracked as an issue in core-workflow
[#]_. We're using GitHub's Migrations API [#]_ to download GitHub data for
2018-08-15 15:20:47 -04:00
CPython on a daily basis. The archives will be dropped in a S3 bucket.
Thanks to Ernest W. Durbin III for working on this.
Update the CLA host
-------------------
2018-08-15 15:20:47 -04:00
At the moment, the CLA is hosted within bpo. It needs to be updated such that
signing the CLA does not require a bpo account, and it should be hosted outside
of the bpo.
2018-08-15 15:20:47 -04:00
The current CLA process itself is not ideal. Currently, contributors to
devguide, peps, and core-workflow need to sign a CLA, and it requires a bpo
account. A bpo account should not be required for those projects.
2018-08-15 15:20:47 -04:00
Currently, the CLA process requires personnel to manually check the records.
Question: Will it be possible to completely automate the CLA process, so
it does not require human intervention?
Create labels for issue triage
------------------------------
2018-08-15 15:20:47 -04:00
In bpo, we currently have the following fields for each issue:
2018-08-15 15:20:47 -04:00
Types: behavior, crash, compile error, resource usage, security, performance, enhancement.
Components: 2to3, Argument Clinic, asyncio, Build, Cross-build, ctypes, ...
Priority: release blocker, deferred blocker, critical, high, normal, low
We will create the corresponding labels::
type-behavior, type-crash, type-compile error, type-resource usage, ...
components-2to3, components-argument clinic, components-asyncio, ...
priority-release blocker, priority-deferred blocker, priority-critical, ...
2018-08-15 15:20:47 -04:00
In addition, we'll create a ``needs triage`` label.
Create issue templates
----------------------
We will create an issue template and add the following headers::
---
Type: behavior | crash | compile error | resource usage (choose one)
Components: 2to3 | Argument Clinic | asyncio | Build | ... (can select more than one)
Priority: release blocker | deferred blocker | critical | ...
Needs backport to: 2.7 | 3.6 | 3.7
---
The idea is to allow the issue creator to help us triage the issue.
2018-08-15 15:20:47 -04:00
The above values are pre-filled in the template. The issue creator will remove
texts that do not apply to their issue.
Based on the above headers, bedevere-bot can apply the necessary labels to the
2018-08-15 15:20:47 -04:00
issue. If the issue creator did not supply the above headers, the bot will apply
the ``needs triage`` label. At that point, it will require a core developer to
properly label the issue.
We can also take advantage of GitHub's multiple issue template feature, and the
ability to automatically set issue assignee and labels by using issue templates.
Updates to bedevere
-------------------
2018-08-15 15:20:47 -04:00
Bedevere-bot will need to be updated to recognize the issue headers described
above and apply the proper labels.
Bedevere-bot can also copy over the labels to pull requests that correspond to
the issue.
Update the devguide
-------------------
Provide explanation in the devguide about new issue workflow and triage labels.
Add a button in bpo to migrate the issue to GitHub
--------------------------------------------------
2018-08-15 15:20:47 -04:00
This will require the bpo to be updated. But I believe the effort needed for
this is much less than a complete overhaul.
We will create a button in bpo, that will copy over the issue description
and associated comments into a GitHub issue.
We need to add a new status: "moved" with the url of the GitHub issue.
We should not be moving all open issues to GitHub. Issues with little or no
activity should just be closed. Issues with no decision made for years should
just be closed.
If a core developer is still interested in the issue, they can indicate so in
the bpo issue, and later use the button to migrate it over to GitHub.
Migrated issues
---------------
When an issue is marked as "moved", this issue should be in read-only mode. bpo
should forbid the edition of the issue.
2018-08-15 15:20:47 -04:00
Make bpo read-only
------------------
This should be the final step. Once we start using GitHub issues, make bpo
2018-08-15 15:20:47 -04:00
read-only, instead of shutting it down.
Do not accept new registrations. Do not allow comments or issues to be created.
Mapping between issues from bpo and GitHub
------------------------------------------
Usually when we reference an issue from bpo, we use bpo-XYZ but with Github, we
will have a new reference with this format https://github.com/python/cpython/issue/XYZ.
Because we will migrate the issues from bpo to GitHub, we need to have a new
field on bpo for the reference to the issues on GitHub, and the same thing on
Github for the 'eventual' reference from bpo.
For GitHub, we need to add "origin: https://bugs.python.org/issueXYZ".
For bpo, add a new field "moved to: https://github.com/python/cpython/issue/XYZ"
TBD and additional concerns
===========================
2018-08-15 15:20:47 -04:00
Experts index
-------------
2018-08-15 15:20:47 -04:00
At the moment, there is a mechanism to automatically add people in the experts
index to the nosy list. We need to replicate this functionality.
A GitHub account should not be a requirement
--------------------------------------------
2018-08-15 15:20:47 -04:00
Back when moving the CPython codebase from Mercurial to GitHub was being
discussed [#]_ [#]_, it was brought up that we still needed to allow uploading
2018-08-15 15:20:47 -04:00
of patches on bpo, and that a GitHub account should not be a requirement in
order to contribute to Python.
2018-08-15 15:20:47 -04:00
If bpo is made read-only, we'll need to come up with a different solution to
allow people to contribute when they don't have a GitHub account.
2018-08-15 15:20:47 -04:00
One solution is to create a new "python-issues" mailing list, similar to the
docs@python.org [#]_ mailing list, to allow people to submit their issues
there.
Related to this, since the migration to GitHub in 2017, I recall one case
[#]_ where there was a contributor, who submitted a patch to Mercurial and
2018-08-15 15:20:47 -04:00
refused to create a GitHub account. Because of this, our bot was unable to
detect whether they had signed the CLA. Another person had volunteered to upload
their patch to GitHub. But it was still required that both people sign the CLA.
2018-08-15 15:20:47 -04:00
That particular situation was complicated. It took up five core developers' time
to investigate and manually check the CLA, causing confusion.
Trim off the "Components" list
------------------------------
Is the current "components" list still making sense and relevant?
2018-08-15 15:20:47 -04:00
Can the list be shortened?
Priority list
-------------
Is the current "priority" list useful? Nick Coghlan noted that perhaps only
``release blocker`` and ``deferred blocker`` are useful.
Further questions and discussions
---------------------------------
There is a dedicated `#pep581 <https://python.zulipchat.com/#narrow/stream/130206-pep581>`_
stream in python.zulipchat.com.
Acknowledgements
================
2018-08-15 15:20:47 -04:00
Thanks to Guido van Rossum, Brett Cannon, and Nick Coghlan, who were consulted
in the early stage and research of this PEP. Their feedback, concerns, input,
and ideas have been valuable.
References
==========
.. [#] bugs.python.org
(https://bugs.python.org/)
.. [#] miss-islington
(https://github.com/python/miss-islington)
.. [#] bedevere
(https://github.com/python/bedevere)
.. [#] the-knights-who-say-ni
(https://github.com/python/the-knights-who-say-ni)
.. [#] Getting permanent links to files
2018-08-15 15:20:47 -04:00
(https://help.github.com/articles/getting-permanent-links-to-files/)
.. [#] Closing issues using keywords
(https://help.github.com/articles/closing-issues-using-keywords/)
.. [#] About GitHub email notifications
(https://help.github.com/articles/about-email-notifications/)
.. [#] Consider whether or not to migrate bugs.python.org source code
to GitHub repo
2018-08-15 15:20:47 -04:00
(https://github.com/python/bugs.python.org/issues/2)
.. [#] Roundup issue 2550734: Expose roundup via a RESTful interface
(http://issues.roundup-tracker.org/issue2550734)
.. [#] Roundup issue 2550742: Do not send email by default when adding
or removing oneself from the Nosy list
(http://issues.roundup-tracker.org/issue2550742)
.. [#] Backup GitHub information
(https://github.com/python/core-workflow/issues/20)
.. [#] GitHub's Migrations API
(https://developer.github.com/v3/migrations/orgs/)
.. [#] Python-committers email
(https://mail.python.org/pipermail/python-committers/2015-December/003642.html)
.. [#] Python-committers email
(https://mail.python.org/pipermail/python-committers/2015-December/003645.html)
.. [#] docs mailing list
(https://mail.python.org/mailman/listinfo/docs)
.. [#] CPython GitHub pull request 1505
(https://github.com/python/cpython/pull/1505)
Copyright
=========
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End: