opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[meta] how to close real design issues

Open sriyerg opened this issue 7 years ago • 9 comments

When a bug is found, often DV users add workarounds to allow the test(s) to progress further and possibly flush more bugs elsewhere in the DUT. Often, such workarounds are captured as TODO items, which unfortunately are not tracked well enough.

Eventually, when the designers get to fixing the bug, they add 'Fixes #bug' in the description of the PR, and when the PR is merged, the issue gets automatically closed. This is potentially problematic since the workarounds / TODOs are left un-addressed and untracked, and ultimately forgotten. Also, at times, the bug fix even ends up uncovering more bugs elsewhere in the design or the fix does not fully address all stimulus corner cases (typically uncovered by more random seeds).

The general practice in the industry (Google included) is for the designers to mark the issue as fixed without closing it and reassign it back to DV so that they can remove workarounds / enhance the stimulus further as needed. Typically, if more closely related bugs are found, the bug ownership switches back and forth between the designer and DV before it is ultimately closed by DV after all stimulus scenarios / seeds / tests are passing.

There does not appear to be a good way to handle this in GitHub. Seeking thoughts / opinions in how do we standardize this.

sriyerg avatar Jul 16 '19 17:07 sriyerg

Interesting issue, thanks for raising it Sri. I can see how this differs vs a typical software development flow, where you might hope a bug reporter to check a PR and report back if it fixes things for them, but changes to tests etc are usually done by the person writing the code.

Possible approaches include:

  • Creating a new issue when workarounds are added to DV, which references the issue but is closed separately
  • Ensuring that PRs don't close bugs unless a DV reports back that the bug is closed and there is no other follow-up work. Commit messages can just say "Works to address #NNN" or similar - which won't close the issue, but will mean GitHub picks up the reference.

In the case where a bug fix uncovers more bugs elsewhere in the design, that sounds like it really should be a separate issue though unless they're very closely related.

asb avatar Jul 16 '19 18:07 asb

Judicious use of GitHub task lists might also help here. e.g. a bug which is likely to span across more than 1 PR (say design changes and DV changes) might include:

  • [ ] RTL implementation
  • [ ] DV changes
  • [ ] [Potentially more...]

asb avatar Jul 16 '19 18:07 asb

I agree - workarounds / TODOs if added should be clearly documented. GitHub task list sounds like a good idea - that should capture all the work required to close the bug, including design, DV and other fixes. Design fix PRs should reference a bug #, but it should not automatically close it. Designer only checks the design fix work item captured in the bug. If more new, unrelated bugs are found, then they are filed as separate issue. If they are closely related to the original bug, then perhaps more task items could be added to the list as needed. The bug can be closed only when all task items are complete. This is one possible solution, or maybe a part of the solution. I think we still need to find a way to enforce this as a standard / practice.

sriyerg avatar Jul 16 '19 19:07 sriyerg

i like this idea. Should we look into something like a template?https://help.github.com/en/articles/creating-issue-templates-for-your-repository for bugs?

As Sri suggested, maybe the template itself will have the task list for all things needed for closure, and we simply don't close it until all things are checked. We won't be able to enforce the bug is not closed until all items are checked off, but at least we will be able to see very quickly whether all the work was done.

tjaychen avatar Jul 16 '19 22:07 tjaychen

Not automatically closing the PR is good to me. Sorry for making confusions. I will remind to not close the issue when only design is fixed.

eunchan avatar Jul 17 '19 01:07 eunchan

@asb, I like Tim's suggestion of creating an Issue template with includes the a task list. Seems only repo admin can create it. Can you create one? Thanks.

aytong avatar Jul 18 '19 18:07 aytong

@aytong, as discussed via email, you should have sufficient permissions to try and add one one yourself. Thanks for offering to take the lead on that

asb avatar Jul 19 '19 05:07 asb

On a mission to clean up old issues, scraping from stalest to freshest.

@aytong or @sriyerg any update on thinking on this tracking issue?

sjgitty avatar Dec 05 '19 02:12 sjgitty

This one can be closed. The Issue template is tracked under #456

aytong avatar Dec 27 '19 23:12 aytong