NASA-PDS / roundup-action

Do a "roundup", a/k/a PDS-style continuous integration and delivery
Apache License 2.0
1 stars 4 forks source link

Tagging a release branch for release overwrites main commit #76

Closed jordanpadams closed 1 year ago

jordanpadams commented 2 years ago

šŸ› Describe the bug

https://github.com/NASA-PDS/roundup-action/blob/f8de50f8cd63f5fa2de8974c0e0be7aa65f69983/src/pds/roundup/util.py#L116

On registry-api-service, @tloubrieu-jpl tried to do a patch of a tagged release by cherry picking commits from main, purposefully ignoring new features added to the main branch. However, looks like roundup then took that patch and overwrite the commit history with what was the patch branch.

šŸ“œ To Reproduce

Steps to reproduce the behavior:

  1. Tag release vX.X.0
  2. have fun and continue development on main
  3. bug pops up where need a quick patch
  4. Fix bug by merging some change Y into main
  5. Checkout tagged release vX.X.0
  6. Cherry pick change Y
  7. Push to new branch release/vX.X.1
  8. See that main now loses all the fun development that happened in step 2 above

šŸ•µļø Expected behavior

Main commit history should not be overwritten.

Workaround

Manually tag and release all patches for the time being.


āš™ļø Engineering Details

Not sure what the best solution is here because the push back to main is needed for the requirements and changelog, but we also can't lose all those changes on main for hot fixes like this.

Maybe for hotfixes we should just develop a script to do this instead of using roundup? That is probably the best option...

jordanpadams commented 1 year ago

Can we test this with both Python and Java repos to make sure we don't overwrite any history.