Eliminate merge conflicts on ChangeLog.md
Nine months ago (October 2023), in Stork, we refactored how we deal with the Changelog updates to avoid merge conflicts on this file in every merge request. The solution was designed and implemented here: stork#1120 (closed) .
After nine months, we agreed that the solution works, doesn't require additional effort from the developers, and is almost transparent for the release engineers.
There are mixed opinions about whether it boosted our productivity, but it seems beneficial to adopt the same approach in Kea.
What does it involve in short
The developers no longer update a single Changelog file. Instead, they put the new Changelog entries in separate files in the changelog_unreleased
directory. Every file has a unique name that is achieved by including the ticket number in it.
The content of the Changelog entry looks almost the same as that which was prepended to the Changelog file. The only difference is that it doesn't include the entry number.
During the release, the files from the change_unreleased
are merged and prepended to the Changelog file. The entry numbers are assigned now. Then, the entry files are deleted. It may be done in a single MR together with bumping the version. The proper entry order is achieved by sorting the entries by the committed date.