You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And refactor the legacy upgrade constraint semantics behind the interface as described in the RFC
Solver
The solver needs to be able to switch between upgrade constraint semantics based on rules defined above (see Fig 1).
Note that no matter the positions of ForceSemverUpgradeConstraints feature gate and value of .spec.upgradeConstraintPolicy we still need to apply Operator’s other constraints. This means that .spec.channel and .spec.version need to be taken into account during the resolution process, if these fields were set:
If the .spec.version field specifies a version or range, resolution must choose from a version that falls with that version or range
If the .spec.channel field specifies a channel, resolution must choose from a version that is a member of that channel
Refactoring of existing support of legacy semantics
In preparation of introducing of semver we need to:
Define an interface common for all the semantics
Refactor existing code which provides support of legacy semantics to match the interface
The idea is that there will be a function with roughly the following signature:
typeSuccessorsfunc(currentBundlestring) []string
Where currentBundle uniquely identifies the currently installed bundle and the return value is a slice uniquely identifying possible successors.
For the legacy semantics possible successors will be bundles according to the replaces/skips/skipRange.
In case of errors during the resolution - issues must be reported via status update of the Operator. This applies to all semantics and all positions of the feature gate.
Operator is expected to set or update the condition of type Resolved to False with Reason set to ResolutionFailed and provide a meaningful error message.
m1kola
changed the title
Update solver to enable switching between semver and legacy upgrade constraint semantics
Refactor legacy upgrade constraint semantics behind an interface
Sep 7, 2023
Please read RFC for better formatting and full scope. The excerpt below is just to indicate the scope covered by this specific issue.
We need to
Reporting resolution issues must also happen as described in the RFC:
The text was updated successfully, but these errors were encountered: