Merge commits confuse the version detection

Bug #1522153 reported by Matthew Treinish
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
reno
Fix Released
Medium
Doug Hellmann

Bug Description

When a patch is added with a merge commit where the original patch is authored before a tag, the version detection in reno will be confused and put any release notes

For example look at subunit2sql's commit: http://git.openstack.org/cgit/openstack-infra/subunit2sql/commit/?id=2a4e6c155d29ab9544e61b55e5a7449c173de9d1

This commit was merged after the 1.0.2 tag (as part of the 1.1.0 release) but the original commit's date puts it before the 1.0.2. The way reno does the git log with:

git log --pretty="%x00%H %d" --name-only

will pick up the file being added before the 1.0.2 (and therefore treat it as part of the 1.0.2 release) because it's looking at things via time vs what is actually in the tag. (this snippet from the log output shows that clearly http://paste.openstack.org/show/480683/ )

This results in the generated releasenotes being associated with the wrong release:

http://docs.openstack.org/releasenotes/subunit2sql/unreleased.html#id3

Revision history for this message
Matthew Treinish (treinish) wrote :

It's worth pointing out that if you do git logs per tag the log will indicate the proper thing. For example:

http://paste.openstack.org/show/480686/

So it might be better to loop over all the tags in this manner to collect the per tag release notes, and then at the end get the notes for unreleased changes.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :
Changed in reno:
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Doug Hellmann (doug-hellmann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to reno (master)

Reviewed: https://review.openstack.org/254372
Committed: https://git.openstack.org/cgit/openstack/reno/commit/?id=4b45743e496b861d1adf0959e00e846740d58edf
Submitter: Jenkins
Branch: master

commit 4b45743e496b861d1adf0959e00e846740d58edf
Author: Doug Hellmann <email address hidden>
Date: Mon Dec 7 20:18:41 2015 +0000

    fix notes appearing in releases older than they should

    Use topological sort instead of date sort so that release notes appear
    in the release where they are merged, rather than the one closest to the
    same commit time, which might be much older.

    In order to support listing tags on versions of git with different
    output formats, we also limit the tags we care about to things that look
    like version numbers (some sequence of digits, dots, and maybe "a" or
    "b" for alpha & beta).

    Change-Id: I95278eab25f331262a4c9eeac2260ca7290b5421
    Closes-Bug: #1522153

Changed in reno:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/reno 1.3.0

This issue was fixed in the openstack/reno 1.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.