Merge commits confuse the version detection

Bug #1522153 reported by Matthew Treinish on 2015-12-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
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:

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 )

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

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:

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.

Doug Hellmann (doug-hellmann) wrote :
Changed in reno:
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Doug Hellmann (doug-hellmann)

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

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  Edit
Everyone can see this information.

Other bug subscribers