[Starlingx-discuss] FYI: Linking commits/reviews to Launchpad bugs

Penney, Don Don.Penney at windriver.com
Tue May 7 19:12:00 UTC 2019


Hi all,

I've learned a bit more this afternoon about how Gerrit updates Launchpad bugs based on the commit messages in reviews and thought I should share and clarify some things for folks.

As noted on the wiki:
https://wiki.openstack.org/wiki/StarlingX/CodeSubmissionGuidelines

if you're working on a Launchpad bug, you need to specify one or more tags in the commit message for Closes-Bug, Partial-Bug, or Related-Bug with the Launchpad bug number, such as:
Closes-Bug: 123456

We've also seen that it appears this tag must be in the final section of your commit message, ie. no blank lines following it... so the following is good:

This commit fixes the typos.

Change-Id: If46f03a5d042f949db9359d6ddd7f69790ccaf4f
Closes-Bug: 1827326
Signed-off-by: Don Penney <don.penney at windriver.com>

whereas the following would appear to be ignored (I'm not sure why, yet):

This commit fixes the typos.

Closes-Bug: 1827326

Change-Id: If46f03a5d042f949db9359d6ddd7f69790ccaf4f
Signed-off-by: Don Penney <don.penney at windriver.com>


Two things will happen when the tag is processed correctly:

1.       Gerrit will mark the Launchpad bug as "In Progress" (or different status for merged or abandoned, of course)

2.       Gerrit will add a comment to the bug indicating "Fix proposed" ... BUT ONLY ON THE INITIAL PATCHSET

The note on that second point is important... If you do not set the tag correctly on the initial review creation, Gerrit WILL NOT add a comment linking back to your review. In which case, you should probably do this manually yourself. (I suspect this is intended to avoid adding a comment every time the review is updated.)

When you create your review, you can click on the bug link in Gerrit and should see the state change and comment in Launchpad. If you don't see that, Gerrit did not process your tag correctly.

Cheers,
Don.


Don Penney, Developer, Wind River


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20190507/4ebf2e44/attachment.html>


More information about the Starlingx-discuss mailing list