2011-05-27 10:49:47 +00:00
|
|
|
================
|
|
|
|
Triaging tickets
|
|
|
|
================
|
|
|
|
|
2011-07-19 13:16:09 +00:00
|
|
|
Django uses Trac_ for managing the work on the code base. Trac is a
|
|
|
|
community-tended garden of the bugs people have found and the features people
|
|
|
|
would like to see added. As in any garden, sometimes there are weeds to be
|
|
|
|
pulled and sometimes there are flowers and vegetables that need picking. We need
|
|
|
|
your help to sort out one from the other, and in the end we all benefit
|
|
|
|
together.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Like all gardens, we can aspire to perfection but in reality there's no such
|
|
|
|
thing. Even in the most pristine garden there are still snails and insects.
|
2011-07-19 13:16:09 +00:00
|
|
|
In a community garden there are also helpful people who -- with the best of
|
|
|
|
intentions -- fertilize the weeds and poison the roses. It's the job of the
|
2011-05-27 10:49:47 +00:00
|
|
|
community as a whole to self-manage, keep the problems to a minimum, and
|
|
|
|
educate those coming into the community so that they can become valuable
|
|
|
|
contributing members.
|
|
|
|
|
|
|
|
Similarly, while we aim for Trac to be a perfect representation of the state
|
|
|
|
of Django's progress, we acknowledge that this simply will not happen. By
|
|
|
|
distributing the load of Trac maintenance to the community, we accept that
|
|
|
|
there will be mistakes. Trac is "mostly accurate", and we give allowances for
|
|
|
|
the fact that sometimes it will be wrong. That's okay. We're perfectionists
|
|
|
|
with deadlines.
|
|
|
|
|
|
|
|
We rely on the community to keep participating, keep tickets as accurate as
|
|
|
|
possible, and raise issues for discussion on our mailing lists when there is
|
|
|
|
confusion or disagreement.
|
|
|
|
|
|
|
|
Django is a community project, and every contribution helps. We can't do this
|
2014-07-13 17:42:06 +00:00
|
|
|
without **you**!
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Triage workflow
|
2016-01-03 10:56:22 +00:00
|
|
|
===============
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Unfortunately, not all bug reports and feature requests in the ticket tracker
|
|
|
|
provide all the :doc:`required details<bugs-and-features>`. A number of
|
|
|
|
tickets have patches, but those patches don't meet all the requirements of a
|
|
|
|
:ref:`good patch<patch-style>`.
|
|
|
|
|
|
|
|
One way to help out is to *triage* tickets that have been created by other
|
2016-11-25 19:03:11 +00:00
|
|
|
users.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Most of the workflow is based around the concept of a ticket's
|
|
|
|
:ref:`triage stages <triage-stages>`. Each stage describes where in its
|
|
|
|
lifetime a given ticket is at any time. Along with a handful of flags, this
|
|
|
|
attribute easily tells us what and who each ticket is waiting on.
|
|
|
|
|
|
|
|
Since a picture is worth a thousand words, let's start there:
|
|
|
|
|
2012-12-22 18:01:55 +00:00
|
|
|
.. image:: /internals/_images/triage_process.*
|
2013-04-08 17:49:08 +00:00
|
|
|
:height: 501
|
|
|
|
:width: 400
|
2011-05-27 10:49:47 +00:00
|
|
|
:alt: Django's ticket triage workflow
|
|
|
|
|
|
|
|
We've got two roles in this diagram:
|
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Committers: people with commit access who are responsible for making the
|
|
|
|
final decision to merge a patch.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Ticket triagers: anyone in the Django community who chooses to
|
|
|
|
become involved in Django's development process. Our Trac installation
|
|
|
|
is intentionally left open to the public, and anyone can triage tickets.
|
|
|
|
Django is a community project, and we encourage :ref:`triage by the
|
|
|
|
community<how-can-i-help-with-triaging>`.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
By way of example, here we see the lifecycle of an average ticket:
|
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Alice creates a ticket and sends an incomplete pull request (no tests,
|
|
|
|
incorrect implementation).
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Bob reviews the pull request, marks the ticket as "Accepted", "needs tests",
|
|
|
|
and "patch needs improvement", and leaves a comment telling Alice how the
|
|
|
|
patch could be improved.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Alice updates the pull request, adding tests (but not changing the
|
2011-05-27 10:49:47 +00:00
|
|
|
implementation). She removes the two flags.
|
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Charlie reviews the pull request and resets the "patch needs improvement"
|
|
|
|
flag with another comment about improving the implementation.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Alice updates the pull request, fixing the implementation. She removes the
|
|
|
|
"patch needs improvement" flag.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Daisy reviews the pull request and marks the ticket as "Ready for checkin".
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Jacob, a committer, reviews the pull request and merges it.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Some tickets require much less feedback than this, but then again some tickets
|
|
|
|
require much much more.
|
|
|
|
|
|
|
|
.. _triage-stages:
|
|
|
|
|
|
|
|
Triage stages
|
2016-01-03 10:56:22 +00:00
|
|
|
=============
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Below we describe in more detail the various stages that a ticket may flow
|
|
|
|
through during its lifetime.
|
|
|
|
|
|
|
|
Unreviewed
|
2016-01-03 10:56:22 +00:00
|
|
|
----------
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
The ticket has not been reviewed by anyone who felt qualified to make a
|
|
|
|
judgment about whether the ticket contained a valid issue, a viable feature,
|
|
|
|
or ought to be closed for any of the various reasons.
|
|
|
|
|
|
|
|
Accepted
|
2016-01-03 10:56:22 +00:00
|
|
|
--------
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2014-03-02 15:00:30 +00:00
|
|
|
The big gray area! The absolute meaning of "accepted" is that the issue
|
2011-05-27 10:49:47 +00:00
|
|
|
described in the ticket is valid and is in some stage of being worked on.
|
|
|
|
Beyond that there are several considerations:
|
|
|
|
|
|
|
|
* **Accepted + No Flags**
|
|
|
|
|
|
|
|
The ticket is valid, but no one has submitted a patch for it yet. Often this
|
2013-04-10 05:39:36 +00:00
|
|
|
means you could safely start writing a patch for it. This is generally more
|
|
|
|
true for the case of accepted bugs than accepted features. A ticket for a bug
|
|
|
|
that has been accepted means that the issue has been verified by at least one
|
|
|
|
triager as a legitimate bug - and should probably be fixed if possible. An
|
|
|
|
accepted new feature may only mean that one triager thought the feature would
|
|
|
|
be good to have, but this alone does not represent a consensus view or imply
|
|
|
|
with any certainty that a patch will be accepted for that feature. Seek more
|
|
|
|
feedback before writing an extensive patch if you are in doubt.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
* **Accepted + Has Patch**
|
|
|
|
|
|
|
|
The ticket is waiting for people to review the supplied patch. This means
|
|
|
|
downloading the patch and trying it out, verifying that it contains tests
|
|
|
|
and docs, running the test suite with the included patch, and leaving
|
|
|
|
feedback on the ticket.
|
|
|
|
|
2013-04-08 17:49:08 +00:00
|
|
|
* **Accepted + Has Patch + Needs ...**
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
This means the ticket has been reviewed, and has been found to need further
|
|
|
|
work. "Needs tests" and "Needs documentation" are self-explanatory. "Patch
|
|
|
|
needs improvement" will generally be accompanied by a comment on the ticket
|
|
|
|
explaining what is needed to improve the code.
|
|
|
|
|
|
|
|
Ready For Checkin
|
2016-01-03 10:56:22 +00:00
|
|
|
-----------------
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
The ticket was reviewed by any member of the community other than the person
|
|
|
|
who supplied the patch and found to meet all the requirements for a
|
2014-07-13 17:42:06 +00:00
|
|
|
commit-ready patch. A committer now needs to give the patch a final
|
2011-05-27 10:49:47 +00:00
|
|
|
review prior to being committed. See the
|
|
|
|
:ref:`New contributors' FAQ<new-contributors-faq>` for "My ticket has been in
|
|
|
|
RFC forever! What should I do?"
|
|
|
|
|
|
|
|
Someday/Maybe
|
2016-01-03 10:56:22 +00:00
|
|
|
-------------
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
This stage isn't shown on the diagram. It's used sparingly to keep track of
|
|
|
|
high-level ideas or long term feature requests.
|
2013-04-08 17:49:08 +00:00
|
|
|
|
|
|
|
These tickets are uncommon and overall less useful since they don't describe
|
2011-05-27 10:49:47 +00:00
|
|
|
concrete actionable issues. They are enhancement requests that we might
|
|
|
|
consider adding someday to the framework if an excellent patch is submitted.
|
2013-04-08 17:49:08 +00:00
|
|
|
They are not a high priority.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Other triage attributes
|
2016-01-03 10:56:22 +00:00
|
|
|
=======================
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
A number of flags, appearing as checkboxes in Trac, can be set on a ticket:
|
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
Has patch
|
2016-01-03 10:56:22 +00:00
|
|
|
---------
|
2011-10-14 00:12:01 +00:00
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
This means the ticket has an associated
|
|
|
|
:doc:`patch<writing-code/submitting-patches>`. These will be reviewed
|
|
|
|
to see if the patch is "good".
|
2011-10-14 00:12:01 +00:00
|
|
|
|
2013-10-10 20:42:30 +00:00
|
|
|
The following three fields (Needs documentation, Needs tests,
|
2013-07-08 04:17:10 +00:00
|
|
|
Patch needs improvement) apply only if a patch has been supplied.
|
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
Needs documentation
|
2016-01-03 10:56:22 +00:00
|
|
|
-------------------
|
2011-10-14 00:12:01 +00:00
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
This flag is used for tickets with patches that need associated
|
|
|
|
documentation. Complete documentation of features is a prerequisite
|
|
|
|
before we can check them into the codebase.
|
2011-10-14 00:12:01 +00:00
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
Needs tests
|
2016-01-03 10:56:22 +00:00
|
|
|
-----------
|
2013-04-11 00:11:26 +00:00
|
|
|
|
|
|
|
This flags the patch as needing associated unit tests. Again, this
|
|
|
|
is a required part of a valid patch.
|
|
|
|
|
|
|
|
Patch needs improvement
|
2016-01-03 10:56:22 +00:00
|
|
|
-----------------------
|
2013-04-11 00:11:26 +00:00
|
|
|
|
|
|
|
This flag means that although the ticket *has* a patch, it's not quite
|
|
|
|
ready for checkin. This could mean the patch no longer applies
|
|
|
|
cleanly, there is a flaw in the implementation, or that the code
|
|
|
|
doesn't meet our standards.
|
|
|
|
|
|
|
|
Easy pickings
|
2016-01-03 10:56:22 +00:00
|
|
|
-------------
|
2013-04-11 00:11:26 +00:00
|
|
|
|
|
|
|
Tickets that would require small, easy, patches.
|
|
|
|
|
|
|
|
Type
|
2016-01-03 10:56:22 +00:00
|
|
|
----
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Tickets should be categorized by *type* between:
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* New Feature
|
|
|
|
For adding something new.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Bug
|
|
|
|
For when an existing thing is broken or not behaving as expected.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Cleanup/optimization
|
|
|
|
For when nothing is broken but something could be made cleaner,
|
|
|
|
better, faster, stronger.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
Component
|
2016-01-03 10:56:22 +00:00
|
|
|
---------
|
2013-04-11 00:11:26 +00:00
|
|
|
|
|
|
|
Tickets should be classified into *components* indicating which area of
|
2011-05-27 10:49:47 +00:00
|
|
|
the Django codebase they belong to. This makes tickets better organized and
|
|
|
|
easier to find.
|
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
Severity
|
2016-01-03 10:56:22 +00:00
|
|
|
--------
|
2013-04-11 00:11:26 +00:00
|
|
|
|
2011-05-27 10:49:47 +00:00
|
|
|
The *severity* attribute is used to identify blockers, that is, issues which
|
|
|
|
should get fixed before releasing the next version of Django. Typically those
|
|
|
|
issues are bugs causing regressions from earlier versions or potentially
|
|
|
|
causing severe data losses. This attribute is quite rarely used and the vast
|
|
|
|
majority of tickets have a severity of "Normal".
|
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
Version
|
2016-01-03 10:56:22 +00:00
|
|
|
-------
|
2013-04-11 00:11:26 +00:00
|
|
|
|
|
|
|
It is possible to use the *version* attribute to indicate in which
|
2011-05-27 10:49:47 +00:00
|
|
|
version the reported bug was identified.
|
|
|
|
|
2013-04-11 00:11:26 +00:00
|
|
|
UI/UX
|
2016-01-03 10:56:22 +00:00
|
|
|
-----
|
2013-04-11 00:11:26 +00:00
|
|
|
|
|
|
|
This flag is used for tickets that relate to User Interface and User
|
|
|
|
Experiences questions. For example, this flag would be appropriate for
|
|
|
|
user-facing features in forms or the admin interface.
|
|
|
|
|
|
|
|
Cc
|
2016-01-03 10:56:22 +00:00
|
|
|
--
|
2013-04-11 00:11:26 +00:00
|
|
|
|
|
|
|
You may add your username or email address to this field to be notified when
|
|
|
|
new contributions are made to the ticket.
|
|
|
|
|
|
|
|
Keywords
|
2016-01-03 10:56:22 +00:00
|
|
|
--------
|
2013-04-11 00:11:26 +00:00
|
|
|
|
|
|
|
With this field you may label a ticket with multiple keywords. This can be
|
2013-06-22 20:30:44 +00:00
|
|
|
useful, for example, to group several tickets of a same theme. Keywords can
|
|
|
|
either be comma or space separated. Keyword search finds the keyword string
|
|
|
|
anywhere in the keywords. For example, clicking on a ticket with the keyword
|
|
|
|
"form" will yield similar tickets tagged with keywords containing strings such
|
|
|
|
as "formset", "modelformset", and "ManagementForm".
|
2013-04-11 00:11:26 +00:00
|
|
|
|
2011-05-27 10:49:47 +00:00
|
|
|
.. _closing-tickets:
|
|
|
|
|
|
|
|
Closing Tickets
|
2016-01-03 10:56:22 +00:00
|
|
|
===============
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
When a ticket has completed its useful lifecycle, it's time for it to be
|
|
|
|
closed. Closing a ticket is a big responsibility, though. You have to be sure
|
|
|
|
that the issue is really resolved, and you need to keep in mind that the
|
|
|
|
reporter of the ticket may not be happy to have their ticket closed (unless
|
|
|
|
it's fixed, of course). If you're not certain about closing a ticket, just
|
|
|
|
leave a comment with your thoughts instead.
|
|
|
|
|
|
|
|
If you do close a ticket, you should always make sure of the following:
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Be certain that the issue is resolved.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Leave a comment explaining the decision to close the ticket.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* If there is a way they can improve the ticket to reopen it, let them know.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* If the ticket is a duplicate, reference the original ticket. Also
|
|
|
|
cross-reference the closed ticket by leaving a comment in the original one
|
|
|
|
-- this allows to access more related information about the reported bug
|
|
|
|
or requested feature.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Be polite.** No one likes having their ticket closed. It can be
|
|
|
|
frustrating or even discouraging. The best way to avoid turning people
|
|
|
|
off from contributing to Django is to be polite and friendly and to offer
|
|
|
|
suggestions for how they could improve this ticket and other tickets in
|
|
|
|
the future.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
A ticket can be resolved in a number of ways:
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* fixed
|
2016-11-25 19:03:11 +00:00
|
|
|
Used once a patch has been rolled into Django and the issue is fixed.
|
2011-10-14 00:12:01 +00:00
|
|
|
|
|
|
|
* invalid
|
|
|
|
Used if the ticket is found to be incorrect. This means that the
|
|
|
|
issue in the ticket is actually the result of a user error, or
|
|
|
|
describes a problem with something other than Django, or isn't
|
|
|
|
a bug report or feature request at all (for example, some new users
|
|
|
|
submit support queries as tickets).
|
|
|
|
|
|
|
|
* wontfix
|
2016-11-25 19:03:11 +00:00
|
|
|
Used when a someone decides that the request isn't appropriate for
|
|
|
|
consideration in Django. Sometimes a ticket is closed as "wontfix" with a
|
|
|
|
request for the reporter to start a discussion on the |django-developers|
|
|
|
|
mailing list if they feel differently from the rationale provided by the
|
|
|
|
person who closed the ticket. Other times, a mailing list discussion
|
|
|
|
precedes the decision to close a ticket. Always use the mailing list to
|
|
|
|
get a consensus before reopening tickets closed as "wontfix".
|
2011-10-14 00:12:01 +00:00
|
|
|
|
|
|
|
* duplicate
|
|
|
|
Used when another ticket covers the same issue. By closing duplicate
|
|
|
|
tickets, we keep all the discussion in one place, which helps
|
|
|
|
everyone.
|
|
|
|
|
|
|
|
* worksforme
|
|
|
|
Used when the ticket doesn't contain enough detail to replicate
|
|
|
|
the original bug.
|
|
|
|
|
|
|
|
* needsinfo
|
|
|
|
Used when the ticket does not contain enough information to replicate
|
|
|
|
the reported issue but is potentially still valid. The ticket
|
|
|
|
should be reopened when more information is supplied.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
If you believe that the ticket was closed in error -- because you're
|
|
|
|
still having the issue, or it's popped up somewhere else, or the triagers have
|
|
|
|
made a mistake -- please reopen the ticket and provide further information.
|
2016-11-25 19:03:11 +00:00
|
|
|
Again, please do not reopen tickets that have been marked as "wontfix" and
|
|
|
|
bring the issue to |django-developers| instead.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
.. _how-can-i-help-with-triaging:
|
|
|
|
|
|
|
|
How can I help with triaging?
|
2016-01-03 10:56:22 +00:00
|
|
|
=============================
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2013-04-08 17:49:08 +00:00
|
|
|
The triage process is primarily driven by community members. Really,
|
|
|
|
**ANYONE** can help.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2013-04-08 17:49:08 +00:00
|
|
|
To get involved, start by `creating an account on Trac`_. If you have an
|
|
|
|
account but have forgotten your password, you can reset it using the `password
|
|
|
|
reset page`_.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
Then, you can help out by:
|
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Closing "Unreviewed" tickets as "invalid", "worksforme", or "duplicate", or
|
|
|
|
"wontfix".
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2013-05-19 13:23:11 +00:00
|
|
|
* Closing "Unreviewed" tickets as "needsinfo" when the description is too
|
2014-02-28 16:44:03 +00:00
|
|
|
sparse to be actionable, or when they're feature requests requiring a
|
2013-10-03 22:51:22 +00:00
|
|
|
discussion on |django-developers|.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Correcting the "Needs tests", "Needs documentation", or "Has patch"
|
|
|
|
flags for tickets where they are incorrectly set.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Setting the "`Easy pickings`_" flag for tickets that are small and
|
|
|
|
relatively straightforward.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2013-04-08 17:49:08 +00:00
|
|
|
* Set the *type* of tickets that are still uncategorized.
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Checking that old tickets are still valid. If a ticket hasn't seen
|
|
|
|
any activity in a long time, it's possible that the problem has been
|
|
|
|
fixed but the ticket hasn't yet been closed.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2013-11-21 23:46:35 +00:00
|
|
|
* Identifying trends and themes in the tickets. If there are a lot of bug
|
2011-10-14 00:12:01 +00:00
|
|
|
reports about a particular part of Django, it may indicate we should
|
|
|
|
consider refactoring that part of the code. If a trend is emerging,
|
|
|
|
you should raise it for discussion (referencing the relevant tickets)
|
2013-10-03 22:51:22 +00:00
|
|
|
on |django-developers|.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2013-11-21 23:46:35 +00:00
|
|
|
* Verify if patches submitted by other users are correct. If they are correct
|
|
|
|
and also contain appropriate documentation and tests then move them to the
|
|
|
|
"Ready for Checkin" stage. If they are not correct then leave a comment to
|
|
|
|
explain why and set the corresponding flags ("Patch needs improvement",
|
2011-10-14 00:12:01 +00:00
|
|
|
"Needs tests" etc.).
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
The `Reports page`_ contains links to many useful Trac queries, including
|
|
|
|
several that are useful for triaging tickets and reviewing patches as
|
|
|
|
suggested above.
|
|
|
|
|
|
|
|
You can also find more :doc:`new-contributors`.
|
|
|
|
|
2012-03-13 17:53:31 +00:00
|
|
|
.. _Reports page: https://code.djangoproject.com/wiki/Reports
|
2011-05-27 10:49:47 +00:00
|
|
|
|
|
|
|
However, we do ask the following of all general community members working in
|
|
|
|
the ticket database:
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* Please **don't** promote your own tickets to "Ready for checkin". You
|
|
|
|
may mark other people's tickets which you've reviewed as "Ready for
|
|
|
|
checkin", but you should get at minimum one other community member to
|
|
|
|
review a patch that you submit.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2016-11-25 19:03:11 +00:00
|
|
|
* Please **don't** reverse a decision without posting a message to
|
|
|
|
|django-developers| to find consensus.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* If you're unsure if you should be making a change, don't make the
|
|
|
|
change but instead leave a comment with your concerns on the ticket,
|
2013-10-03 22:51:22 +00:00
|
|
|
or post a message to |django-developers|. It's okay to be unsure,
|
2011-10-14 00:12:01 +00:00
|
|
|
but your input is still valuable.
|
2011-05-27 10:49:47 +00:00
|
|
|
|
2012-03-13 17:53:31 +00:00
|
|
|
.. _Trac: https://code.djangoproject.com/
|
|
|
|
.. _`easy pickings`: https://code.djangoproject.com/query?status=!closed&easy=1
|
|
|
|
.. _`creating an account on Trac`: https://www.djangoproject.com/accounts/register/
|
|
|
|
.. _password reset page: https://www.djangoproject.com/accounts/password/reset/
|
2015-02-17 19:36:29 +00:00
|
|
|
|
|
|
|
Bisecting a regression
|
2016-01-03 10:56:22 +00:00
|
|
|
======================
|
2015-02-17 19:36:29 +00:00
|
|
|
|
|
|
|
.. highlight:: console
|
|
|
|
|
|
|
|
A regression is a bug that's present in some newer version of Django but not in
|
|
|
|
an older one. An extremely helpful piece of information is the commit that
|
|
|
|
introduced the regression. Knowing the commit that caused the change in
|
|
|
|
behavior helps identify if the change was intentional or if it was an
|
|
|
|
inadvertent side-effect. Here's how you can determine this.
|
|
|
|
|
|
|
|
Begin by writing a regression test for Django's test suite for the issue. For
|
|
|
|
example, we'll pretend we're debugging a regression in migrations. After you've
|
|
|
|
written the test and confirmed that it fails on the latest master, put it in a
|
|
|
|
separate file that you can run standalone. For our example, we'll pretend we
|
|
|
|
created ``tests/migrations/test_regression.py``, which can be run with::
|
|
|
|
|
|
|
|
$ ./runtests.py migrations.test_regression
|
|
|
|
|
|
|
|
Next, we mark the current point in history as being "bad" since the test fails::
|
|
|
|
|
|
|
|
$ git bisect bad
|
|
|
|
You need to start by "git bisect start"
|
|
|
|
Do you want me to do it for you [Y/n]? y
|
|
|
|
|
|
|
|
Now, we need to find a point in git history before the regression was
|
|
|
|
introduced (i.e. a point where the test passes). Use something like
|
2015-02-20 12:26:16 +00:00
|
|
|
``git checkout HEAD~100`` to checkout an earlier revision (100 commits earlier,
|
|
|
|
in this case). Check if the test fails. If so, mark that point as "bad"
|
2015-02-17 19:36:29 +00:00
|
|
|
(``git bisect bad``), then checkout an earlier revision and recheck. Once you
|
|
|
|
find a revision where your test passes, mark it as "good"::
|
|
|
|
|
|
|
|
$ git bisect good
|
|
|
|
Bisecting: X revisions left to test after this (roughly Y steps)
|
|
|
|
...
|
|
|
|
|
|
|
|
Now we're ready for the fun part: using ``git bisect run`` to automate the rest
|
|
|
|
of the process::
|
|
|
|
|
2016-11-21 11:55:03 +00:00
|
|
|
$ git bisect run tests/runtests.py migrations.test_regression
|
2015-02-17 19:36:29 +00:00
|
|
|
|
|
|
|
You should see ``git bisect`` use a binary search to automatically checkout
|
|
|
|
revisions between the good and bad commits until it finds the first "bad"
|
|
|
|
commit where the test fails.
|
|
|
|
|
|
|
|
Now, report your results on the Trac ticket, and please include the regression
|
|
|
|
test as an attachment. When someone writes a fix for the bug, they'll already
|
|
|
|
have your test as a starting point.
|