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

Improve failure status message when attempting to upgrade across major versions or downgrade #538

Open
everettraven opened this issue Nov 13, 2023 · 0 comments

Comments

@everettraven
Copy link
Contributor

everettraven commented Nov 13, 2023

As part of #533 we highlight the new spec.upgradeConstraintPolicy behavior and how when it is set to Enforce semver is followed and upgrades across a major version are not able to be performed.

Stepping through the process, I found the status message that is displayed when attempting to do this is:

  - lastTransitionTime: "2023-11-13T14:43:09Z"
    message: 'constraints not satisfiable: coastal package uniqueness permits at most
      1 of coastal-coastal-coastal.v2.0.0, coastal-coastal-coastal.v1.1.0; installed
      package coastal is mandatory; installed package coastal requires at least one
      of coastal-coastal-coastal.v1.1.0; required package coastal is mandatory; required
      package coastal requires at least one of coastal-coastal-coastal.v2.0.0'
    observedGeneration: 4
    reason: ResolutionFailed
    status: "False"
    type: Resolved
  - lastTransitionTime: "2023-11-13T14:43:09Z"
    message: installation has not been attempted as resolution is unsatisfiable
    observedGeneration: 4
    reason: InstallationStatusUnknown
    status: Unknown
    type: Installed

(the inverse is displayed when attempting a downgrade)

While I could grok from installed package coastal requires at least one of coastal-coastal-coastal.v1.1.0 followed by required package coastal requires at least one of coastal-coastal-coastal.v2.0.0 that it was trying to inform me I could not upgrade across major versions I don't think this message is very user friendly. I'm not sure I would have easily discerned that this is saying "I can't upgrade across major versions" if I wasn't explicitly exercising this functionality.

If possible, I think we should try to improve this message and have it explicitly highlight that the resolution failure is because of major version boundaries or a downgrade is being attempted. If we want to keep the resolution failure message this verbose, that is fine by me but we should at least convey a more useful message in the Installed condition message.

Instead of installation has not been attempted as resolution is unsatisfiable I'm thinking something more along the lines of:

Installation has not been attempted as resolution is unsatisfiable. 
Attempting to { cross major version boundaries || downgrade } from vX.Y.Z to vX.Y.Z, which is not allowed when spec.upgradeConstraintPolicy=Enforce. 
To force this behavior, set spec.upgradeConstraintPolicy=Ignore. 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant