pipecd icon indicating copy to clipboard operation
pipecd copied to clipboard

The release note generated by action-gh-release includes older changes than the selected version

Open ffjlabo opened this issue 1 year ago • 4 comments

What happened:

When I use action-gh-release, some older changes exist.

For example, I released v0.46.0 from v0.45.4. I expected the release note to include changes from v0.45.4 to HEAD commit, but there were some changes created at older than v0.45.4.

https://github.com/pipe-cd/pipecd/pull/4775#issuecomment-1928719219

Release_v0_46_0_by_ffjlabo_·_Pull_Request__4775_·_pipe-cd_pipecd

Maybe it looks like changes from v0.45.0 to HEAD commit because the last one is the next to the merged commit for v0.45.0. https://github.com/pipe-cd/pipecd/commits/master/?after=49627aa0e3dcd29c30d3f251813ac36f077ebb25+104

Commits_·_pipe-cd_pipecd

What you expected to happen:

We hope to include the correct changes like from v0.45.4 to v0.46.0.

How to reproduce it:

Environment:

  • piped version:
  • control-plane version:
  • Others:

ffjlabo avatar Feb 07 '24 01:02 ffjlabo

let me try 🤾

t-kikuc avatar Sep 26 '24 01:09 t-kikuc

Investigation Result

The cause

The list contains from v0.N.0, which is the common ancestor of release-v0.N.x and master. (e.g. v0.49.0...c0392f596b8e50b05cf896a8b1707d70614120c7 for v0.49.3)

  • The tool lists commits of <previous-tag>...<head> in the master branch. (e.g. v0.49.2...c0392f596b8e50b05cf896a8b1707d70614120c7 for v0.49.3 release)

    https://github.com/pipe-cd/pipecd/blob/c2bf91d0e02165e1dbeff671d2f9d10d8a2bfda5/tool/actions-gh-release/release.go#L172-L173

  • Patch release tags are put to release-v0.N.x, not master,

Why not happened previously?

Previously, this problem did not exist because the release flow was different. The feature of automatically creating a Release was turned off in #3701 (The reason is not sure...). At that time, the release flow of release-v0.N.x did not exist.

Solution (not full answer)

  • We need to change the release flow. The tool should list commits in release-v0.N.z AFTER cherry-picking.
  • Listing commits in master branch is NOT enough because it contains several commits which would not be released as patch (e.g. pipedv1-related).

t-kikuc avatar Nov 10 '24 15:11 t-kikuc

This problem does not happen when releasing minor versions. The reason is the same as I mentioned above.

t-kikuc avatar Nov 11 '24 01:11 t-kikuc

Let me postpone this issue. The reasons are:

  1. Prioritize developing the plugin
  2. We need to change the release flow after releasing the plugin arch

t-kikuc avatar Nov 22 '24 08:11 t-kikuc