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

Bug Tracking #4

Merged
merged 24 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions 02-getting_started.Rmd

This file was deleted.

29 changes: 0 additions & 29 deletions 04-lifecycle_of_a_Patch.Rmd

This file was deleted.

150 changes: 127 additions & 23 deletions 11-bug_tracking.Rmd
Original file line number Diff line number Diff line change
@@ -1,23 +1,127 @@
# Bug Tracking

## Using the Bug Tracker (Bugzilla)

### Checking if a bug already exists

### Reporting a bug

### Understanding the issue’s progress and status

## Disagreement With a Resolution on the Bug Tracker

## Helping Triage Issues

### Classifying Reports

### Reviewing Patches

### Finding an Issue You Can Help With

## Gaining the “Developer” Role on the Bug Tracker

## The Meta Tracker
# Bug Tracking

## What is a bug in $\textsf{R}$ ?

You may find a bug in $\textsf{R}$ if:


1. The $\textsf{R}$ session terminates unexpectedly, or there is a segmentation fault, it might be a bug, unless you have written your own call to compiled code or an internal function (via `.C` or `.Internal`). The error may look like this:
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

```{r, results='hide'}
## *** caught segfault ***
## address (nil), cause 'memory not mapped'
```

2. If the code does not do what the documentation says it should, then either the code or the documentation is wrong. Report either of which needs to be fixed.

$\textbf{Note}$:
When you are in doubt that there is a bug:

1. Make sure whether the bug appears in a clean session of $\textsf{R}$. Many a times, there are variables/commands/functions stored in history which might causes issues. Hence, check in a clean session. To do so, launch $\textsf{R}$ from the command line with the `--vanilla` option.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

2. At times the code that is written is very complicated, has numerous package and file dependencies, has many function calls, etc.. In such scenarios it is quite common that the code throws an error and you are not able to solve it. You may tend to think that there is a bug that needs to be reported. Before doing so, try to produce a minimum working example of the code for the section where the error occurred. Add only those package and files which are required by that section, and see if the error appears still. Using this approach shall solve most of the errors.

## What may not be a bug?
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

1. In case the code is doing something unexpected, it may not necessarily be a bug. Carefully review the documentation of the function being called, and check whether the behaviour being exhibited on calling this function is the same as it was designed to do.

2. Issues with $\textit{seemingly}$ identical numbers not being equal (especially floating point numbers) are usually not bugs.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

3. If $\textsf{R}$ is running slower than expected, then also it may not be a bug. Ask someone else to review your code in such a case.

4. If some function is working, but it is not defined in the best generalised way, then consult some to look over your code. This may perhaps not be a bug, instead it might be an alternative way of writing the function.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

## Checking if a bug is already reported

The first step before filing a bug report is to see whether the problem has already been reported. Checking if the bug is reported will:

1. Save time for you and the developers

2. Help you see if the bug is already fixed for the next release

3. Lead you to learn what needs to be done to fix it

4. Determine if any additional information is needed

The sections that follow discuss where to check whether a bug is already reported.

## Levels of contributing to bug / What do you do when you find a bug?

1. [Report](#ReportBug) the bug (if it is not already reported).


2. [Test](provide hyperlink to the section/chapter which discusses this) the bug.

3. [Fix](hyperlink to the chapter on the lifecycle of a patch) the bug: Fixing a bug might require relatively more time. You may start a conversation about it either on BugZilla (link here) or on the GitHub mirror (link here). This would require engagement with $\textsf{R}$ Core team.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

## What are some places where you may find a bug?

You may find a bug in:

1. The [documentation of this guide](#GuideDocBug).

2. In the [$\textsf{R}$ Core-supported packages and/or their documentations](#RCorePkgBug).

3. In the [$\textsf{R}$ language](#RLangBug).

4. In [packages and/or their documentations which are not supported by the $\textsf{R}$ Core](#nonRCorePkgBug).

## How to report a bug? {#ReportBug}

Once you are confirmed that there is a bug, you need to submit a report so that it gets fixed.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

### Bug in the documentation of this guide {#GuideDocBug}

1. If there is a bug in the documentation of this guide, then please report it as an issue at https://github.com/forwards/rdevguide/issues.

2. Please go through the $\textit{closed}$ issues to check if the bug is already reported and fixed. Otherwise, please check in the $\textit{open}$ issues to see if it is reported. If it is not recorded at either of these places, then please submit a new issue.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

### Bug in the $\textsf{R}$ Core-supported packages and/or their documentations {#RCorePkgBug}

1. Packages that are supported by the $\textsf{R}$ Core are labelled with `Maintainer: R Core Team <R-core@r-project.org>`. You can check this label either by running `maintainer("package_name")` or by looking at the `Maintainer` field in the output when the command `packageDescription("package_name")` is run in $\textsf{R}$.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

2. The bug report for $\textsf{R}$ Core-supported packages and/or their documentations can be submitted either to $\textsf{R}$'s [Bugzilla](https://bugs.r-project.org/bugzilla/) or as an issue to the [GitHub Mirror of R svn server](https://github.com/r-devel/r-svn/issues).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the impression that the repo r-devel/r-svn was not officially supported as a place to report bugs. It is only a community effort to make it easier to submit patches. Has this changed? Is there any reference to support this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is still a community effort to make submitting patches and/or issues easier.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I would change the wording to something like:

  1. The bug report for $\textsf{R}$ Core-supported packages and/or their documentations must be submitted to $\textsf{R}$'s Bugzilla.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @llrs, I definitely do not feel that this guide should suggest reporting, tracking, or commenting on bugs in R via the github mirror. My understanding is the same as his.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. The bug report for $\textsf{R}$ Core-supported packages and/or their documentations can be submitted either to $\textsf{R}$'s [Bugzilla](https://bugs.r-project.org/bugzilla/) or as an issue to the [GitHub Mirror of R svn server](https://github.com/r-devel/r-svn/issues).
2. The bug report for $\textsf{R}$ Core-supported packages and/or their documentations can be submitted either to $\textsf{R}$'s [Bugzilla](https://bugs.r-project.org/bugzilla/). In the future, we hope to have an option to report an issue to the [GitHub Mirror of R svn server](https://github.com/r-devel/r-svn/issues).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good way to mention the GitHub Mirror of R svn server. Let's see what more suggestions come for this point.


3. If you want to submit the bug report using Bugzilla, please ensure that you have a Bugzilla account. To get a Bugzilla account, please send an e-mail to `bug-report-request@r-project.org` from the address that you want to use as your login. In this e-mail, briefly explain why you need an account. A volunteer shall then create a Bugzilla account and add you to $\textsf{R}$'s Bugzilla members.

4. Please ensure whether the bug is already fixed (in the upcoming changes in R) or reported (search for it from those already reported on Bugzilla, either on [search existing bug reports](https://bugs.r-project.org/bugzilla/query.cgi), may use the [advanced search](https://bugs.r-project.org/bugzilla/query.cgi?format=advanced) option here, or [show open bugs new-to-old](https://bugs.r-project.org/bugzilla/buglist.cgi?bug_file_loc_type=allwordssubstr&bug_status=NEW&bug_status=ASSIGNED&bug_status=CONFIRMED&bug_status=REOPENED&bug_status=UNCONFIRMED&bugidtype=include&chfieldto=Now&cmdtype=doit&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field0-0-0=noop&long_desc_type=substring&order=bugs.delta_ts%20desc&query_format=advanced&short_desc_type=allwordssubstr&type0-0-0=noop)). If you are submitting the report as an issue on the GitHub Mirror, then please check the currently $\textit{open}$ and $\textit{closed}$ issues first, to find if it is already reported or resolved. Do not submit a report in such a case.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

### Bug in the $\textsf{R}$ Language {#RLangBug}

1. If there is a bug in the $\textsf{R}$ language itself, then you need to report using the same procedure and precautions as explained [above](#RCorePkgBug).
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

### Bug in the non $\textsf{R}$ Core-supported packages and/or their documentations {#nonRCorePkgBug}

1. For packages that are not maintained by the $\textsf{R}$ Core, the bug reports are usually submitted to their maintainer(s). You can find who is the package maintainer by running either of the commands `maintainer("package_name")` or `packageDescription("package_name")`.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

2. In $\textsf{R}$ the running function `bug.report(package = "package_name")` shall direct you to either the GitHub issue tracker of the package, or to the bug tracking web page, or towards composing an e-mail to the package maintainer. This function `bug.report` is disabled in $\textbf{RStudio}$.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

3. Please ensure that your bug is not already reported or fixed before reporting it in any of the ways suggested above.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this paragraph is for #nonRCorePkgBug, #RCorePkgBug and the #RLangBug section it should be on a different section or out of this. Perhaps it could be expanded to explain how to ensure that the bug is not already reported or fixed and what to do in those occasions that it is already solved/reported. Some suggestions, search error or function name not the whole code.


## Good practices in reporting bugs / Expectations of a (good) bug report

If you follow the practices given below, you will come up with a good bug report which might make it easier for the Maintainer(s) to fix the bug.

1. Include a minimal reproducible example of the bug in your report. The maintainer should be able to quickly reproduce the bug on using the minimal example that you provide.

SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved
2. Mention the software architecture on which the bug occurred.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section seems only for #RCorePkgBug and the #RLangBug, perhaps it would be better to add a note at the beginning of the section? (Not that for some other packages this information is not relevant but as the links just point to r-project better to be explicit)


In addition to the above, here are the [bug writing guidelines](https://bugs.r-project.org/bugzilla/page.cgi?id=bug-writing.html) on Bugzilla. The [bug reporting](https://www.r-project.org/bugs.html#writing-a-good-bug-report) documentation in R also the discusses practices to write a good bug report.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

Once you have successfully reported a bug, you will likely receive an update each time an action is taken on the bug. On Bugzilla, the report may be given one of the following status: New, Assigned, Confirmed, Reopened, Unconfirmed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I first submitted a bug I didn't know the Severity to give to a bug or the Component to use, perhaps some paragraphs about each element of a bug report will make it easier for people to understand how to make a good bug report on Bugzilla

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This would be good to discuss e.g. at the RCWG and get input from R core members.

## Disagreement with a resolution on the bug tracker

As humans, there might be differences of opinions from time to time. What needs to be considered here is that, we are respectful of the fact that care, thought, and volunteer time has gone into the resolution of the issue or bug.

If you take some time, then on reflection, the resolution steps may seem more reasonable than you initially thought. If you still feel that the resolution is incorrect, then raise a thoughtful question to the person who resolved it. If the issue was carefully thought about in the first place then is less likely to win any conversion of thought.

As a reminder, issues closed by a core developer on the GitHub Mirror have already been carefully considered. Please do not reopen a closed issue.
SaranjeetKaur marked this conversation as resolved.
Show resolved Hide resolved

## See also

1. [Reporting a bug](https://www.r-project.org/bugs.html)

2. [R FAQ on bugs](https://mac.r-project.org/man/R-FAQ.html#R-Bugs)

3. [Bugzilla guidelines of reporting a bug](https://bugs.r-project.org/bugzilla/page.cgi?id=bug-writing.html)
Binary file modified rdevguide.rds
Binary file not shown.