|
|
Subscribe / Log in / New account

Rant about unprofessional workflow

Rant about unprofessional workflow

Posted Nov 2, 2016 10:58 UTC (Wed) by NAR (subscriber, #1313)
Parent article: A discussion on stable kernel workflow issues

I worked on projects where the rule was that no commit should go into the main repository without a reference to the bug or task tracker. All commits should be either fixes for bugs (in this case the reference should point to the bug in question) or implementation of new feature (in this case the reference should point to the task tracker describing the new feature). Code cleanups, refactorings, etc. were considered "new feature" for this purpose. There was a field on the bug tracker ("introduced at") where the developer who fixed the bug had to state which version introduced the bug. This helped greatly the decision when we needed to backport a fix or not. Also the bug description obviously described if this is a severe bug (e.g. crash, security problem, etc.) or not.

Granted, this needs discipline. No cowboy-style commit-and-forget programming. For example if a developer finds a bug during code review or implementing some other feature, he had to create the bug report and go through the process - but in the long run it was really useful. I guess the kernel developers don't think that there's a bug or issue tracker that can cope with their workloads (hint: write one).


to post comments

Rant about unprofessional workflow

Posted Nov 4, 2016 16:22 UTC (Fri) by imMute (guest, #96323) [Link] (7 responses)

>Granted, this needs discipline. No cowboy-style commit-and-forget programming. For example if a developer finds a bug during code review or implementing some other feature, he had to create the bug report and go through the process - but in the long run it was really useful.

And here's where people would just sit on uncommitted code because its too much work having to fill out a bug report on code that is still on a feature branch. If it's a bug found by the second set of eyes to see the code, then I don't think a bug report is worth it - it's just needless paperwork.

Rant about unprofessional workflow

Posted Nov 6, 2016 14:36 UTC (Sun) by NAR (subscriber, #1313) [Link] (6 responses)

It should not be much work to submit a bug report. Less than 5 minutes. And it usually helps to see the bug description in text, because the developer might realize what else is affected (or it's not a bug at all or some logs are missing, etc.). And it really helps a year later when somebody tries to find out why that particular change went into the codebase.

I don't really understand the comment about feature branch: if it's a bug in the new (not yet released) feature, then there should be already an entry in the issue tracker about that feature. If it's a bug in an old (already released) feature, then it should be present on the "main" branch too, so it warrants a new bug entry.

Rant about unprofessional workflow

Posted Nov 7, 2016 12:19 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (5 responses)

Every substantive change, sure, maybe a mention in an issue tracker is important, but for issues like malloc/delete mismatches, whitespace fixes, doc typo fixes, and the like, it is just extra work. That's why "every commit requires an issue" is block headed. Maybe every topic/merge request, but certainly not every commit.

Rant about unprofessional workflow

Posted Nov 7, 2016 14:34 UTC (Mon) by excors (subscriber, #95769) [Link] (1 responses)

If you require every commit to reference an issue, then for trivial commits it might take a couple of minutes to copy a few lines from the commit message into the issue tracker which nobody will ever look at again, so it's wasted time. (For multiple closely-related commits you could combine them into a single issue, like "Fix coding style in xyzzy driver", so it's really an overhead per group of related work, not per commit.)

But if you don't require every commit to reference an issue (and enforce that requirement), someone will occasionally make an important substantive commit without an issue, which will turn out to introduce some bugs or need backporting or need some documentation written about its rationale etc, and someone will have to spend hours searching through mailing lists and LWN articles trying to find all the possibly-years-old discussions about that commit (earlier versions, code reviews, related bug reports, etc). That's also wasted time, which could have been saved if the discussion about the commit had been tracked in a single place (even just as a collection of links to mailing list threads).

If you require only substantive commits to reference an issue, you'll waste time deciding and then arguing with people over whether a commit is really substantive (e.g. a malloc/free bug could be a serious security vulnerability so surely that counts?), and you'll still sometimes fail to track a commit that should have been tracked.

I think it's unclear which approach wastes the most time overall, but the most predictable is to require an issue for every commit - it's a mildly irritating overhead when writing patches, but it's easy to get into the habit of using the issue tracker for everything, and it can save some rare but substantial headaches in the future.

Rant about unprofessional workflow

Posted Nov 7, 2016 18:03 UTC (Mon) by bronson (subscriber, #4806) [Link]

Furthermore, if you're iterating so fast that creating a tracker entry is an unbearable overhead... I'm not sure your work belongs in the stable branch.

Rant about unprofessional workflow

Posted Nov 7, 2016 16:31 UTC (Mon) by NAR (subscriber, #1313) [Link] (2 responses)

Whitespace, typo fixes, merge errors - they don't warrant issue tracker entries. The malloc/delete mismatches could be real, user facing errors (e.g. destructor not called), these should be tracked.

Rant about unprofessional workflow

Posted Nov 7, 2016 17:27 UTC (Mon) by madscientist (subscriber, #16861) [Link] (1 responses)

Merge errors should be tagged with the tracker entry which introduced the merge error, so that an attempt to cherry-pick the broken commit has a chance of noticing the commit that fixes the error as well.

For whitespace cleanups and typos, you can have a catch-all tracker entries (as mentioned above) for "whitespace cleanup" and "comment typos" that is just used for all those types of issues. It incentivizes people to break these out into separate commits anyway, which is a good thing.

When I introduced a similar requirement locally (using Git hooks on the server to reject pushes where the comment didn't provide the proper information) I originally thought it would be good to have an "out" where you could use a special tag like "trivial" or something and avoid creating a tracker entry. Others in the team were against this and wanted to require a real tracker entry for every commit so that's what we did, and it has been fine.

Rant about unprofessional workflow

Posted Nov 10, 2016 18:02 UTC (Thu) by Wol (subscriber, #4433) [Link]

The trouble is, (a) managing the kernel is like herding cats, and (b) many of them are blind :-) Without a spec it's too easy to make a mistake, and nobody wants to specify or document what *should* happen, so all too often it doesn't ...

Cheers,
Wol


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds