Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prior Version no longer calculates correctly, resets when New Version is updated #174

Open
Cheddam opened this issue Jun 22, 2020 · 1 comment

Comments

@Cheddam
Copy link
Member

Cheddam commented Jun 22, 2020

In December we shipped #143, and for the release cycle we first used it in this appeared to work well, but lately we've been hitting issues again:

  • The Prior Version always seems to calculate to x.y.z-1 (where x.y.z is the New Version value)
  • This is recalculated every time the New Version is changed unless it is manually set during the change

These issues result in significant toil during CWP releases in particular, as they incur a massive effort to manually set and review every module version.

To me, the expected behaviour of this feature is the following:

  • During initial release:plan (i.e. when a .cow.pat.json file is not found), Cow reads the recipe packages to populate the Prior Version field based on the module versions used in the last release (based on version, not time of release)
    • For RC1 / beta1 releases, this is based on the last stable release
    • For subsequent RC / beta releases, this is based on the last RC / beta
    • For stable releases, this is always based on the last stable release
  • During subsequent release:plan operations, the Prior Version field is static unless explicitly set by the user (e.g. changing the New Version should not trigger a recalculation of the Prior Version)
  • If a user attempts to set the New Version to a value that is lower than the Prior Version, an error is thrown. This still does not trigger a recalculation of the Prior Version.

Open to feedback on these ACs prior to working on a fix.

@GuySartorelli
Copy link
Member

Steve created https://github.com/emteknetnz/cow-auto-pat/ to deal with this but it's silly that we have to use a separate tool and update the cow pat manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants