go-utils icon indicating copy to clipboard operation
go-utils copied to clipboard

Remove duplicated and older dependency bumps on generation

Open inFocus7 opened this issue 1 year ago • 0 comments

Changes

Added code to only generate the latest dependency bumps on release.

When following semantic versioning v[MAJOR][.MINOR][.PATCH], we only get the latest bump in the list of dependency bumps. When not following semantic versioning, we display all bumps done within the release.

Context

We've previously had instance on release, where we see multiple dependency bumps for the same dependency, for example:

** DEPENDENCY BUMPS **
- solo-io/gloo has been upgraded to v1.15.0-beta7
- solo-io/gloo has been upgraded to v1.15.0-beta8
- solo-io/gloo has been upgraded to v1.15.0-beta9

In order to mitigate this, developers have to manually remove older reference bumps within the same release version - which is easy to forget.

Other possible path(s) forward

  • In the comment of issue #510

TODO / NOTES

  • What about when dependencies get downgraded for whatever reason?
    • Ex.: Code merges Monday and bumps gloo to 1.15.0. On Tuesday we decide we want to downgrade to 1.14.0-rc5.
    • Currently, we will only show the bump to 1.15.0 on the release changelog, since it's the greater of both. BUT the downgrade was the latest and most important...
  • How can we handle the case where we have a patch postfix on a tag, and then bump to rc?
    • semver.Compare just compares the postfixes as strings, so patch is a "newer" release than an rc.

These are probably not super likely scenarios, but still technically possible.

inFocus7 avatar Jul 17 '23 02:07 inFocus7