-
Notifications
You must be signed in to change notification settings - Fork 68
Description
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.